반응형

https://superuser.com/questions/91935/how-to-recursively-chmod-all-directories-except-files/91938#91938


폴더(디렉토리)만 755 퍼미션으로 변경하기

find /path/to/base/dir -type d -exec chmod 755 {} +


파일 만 644 퍼미션으로 변경하기

find /path/to/base/dir -type f -exec chmod 644 {} +





반응형

locale: LC_ALL? ?? ??? ??? ? ????: ?? ???? ????? ????


위와 같이 에러가 터미널에서 나와서 아래와 같이 처리했습니다.

export LANGUAGE=ko_KR.UTF-8


export LC_ALL=ko_KR.UTF-8


sudo locale-gen ko_KR.UTF-8


sudo dpkg-reconfigure locales







반응형

AWS를 사용하지 않을 이유를 특별한 이슈가 없다면 찾기 힘든것 같습니다..


몇년전에 free tier를 하다가 신경을 안썼는데 이번에 다시 웹서비스를 할 일이 생겨 12month Free tier를 생성해 보았습니다.


SSH접속을 하기 위해서 key를 생성했고 Privacy Key는 로컬로 다운로드 하였고 Public Key는 서버에 저장이 되더군요,

다운로드한 키는 퍼미션 400으로 수정 후 맥 터미널에서 아래 명령어를 이용해서 접속하면 됩니다.





  1. chmod 400 aws_linux.pem
  2. ssh -i "aws_linux.pem" ec2-user@<사용자별로 틀림>.ap-northeast-2.compute.amazonaws.com







반응형

http://egloos.zum.com/mcchae/v/10937316

반응형

아래 코드를 응용하여 cron에 등록하면 됩니다.



#!/bin/sh

cd /media/backupHDD/mysql_backup/

time=`date +%Y%m%d%H%M`

mysqldump -root -ppassword crmdb > $time".sql"

WEEKAGO=`date -d "7 days ago" +%Y%m%d`

rm /media/backupHDD/mysql_backup/$WEEKAGO*.sql


 crontab -l

00 08 * * * /media/backupHDD/mysql_backup/dbbackup.sh

30 12 * * * /media/backupHDD/mysql_backup/dbbackup.sh

00 20 * * * /media/backupHDD/mysql_backup/dbbackup.sh

반응형

wordpress 플러그인 또는 코어가 업데이트 되면 수동으로 업데이트 파일을 다운로드하여 업데이트 하는게 번거롭습니다.


ftp 데몬인 vsftp를 설치하여 wordpress 관리자 페이지에서 보다 쉽게 업데이트 하는 방법을 메모합니다.


먼저 터미널에서 sudo apt-get install 명령어로 vsftpd  vsftp 데몬을설치

wordpress 관리자 페이지에서 플러그인 또는 코어 업데이트를 클릭한 후 ftp정보를 입력

 - 내부 사설 ip를 입력

 - 로그인 계정

 - 로그인 비밀번호


Could Not Create Directory 에러가 발생하면 ..

chown -R www-data:www-data 워드프레스 홈 디렉토리 : chown명령어로 권한설정을 합니다.


출처 : http://publishingwithwordpress.com/how-to-solve-wordpress-could-not-create-directory/

1. Web Server Ownership
The first level is actually to make sure that your web server has ownership over the directories:
chown -R www-data:www-data your-wordpress-directory

2. Directory Permissions
The second level is also required – you must make sure that the directory permissions are properly set:
sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;

I’ve found that most solutions posted on the web show part two but skip the first part.


반응형

아래 파일을 수정하였다. 이 방법은 정확하지 않을 수 있습니다.


/etc/apache2/sites-available/000-default.conf 



<VirtualHost *:80>
    ServerAdmin admin@example.com
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


반응형

/etc/network/interfaces 를 편집합니다.



# The loopback network interface

auto lo

iface lo inet loopback


# The primary network interface

auto p32p1

iface p32p1 inet dhcp

                        


auto lo

iface lo inet loopback


# The primary network interface

auto p32p1

iface p32p1 inet static

 address 10.10.10.110

 netmask 255.255.255.0

 gateway 10.10.10.1  

 dns-nameservers 168.126.63.1  


 $sudo /etc/init.d/networking restart

+ Recent posts