2012. 12. 12. 13:16

아파치 서버

# apachectl start

# apachectl stop

# apachectl restart


APM 설치(우분투 12.04기준)

http://kimoppa.tistory.com 참조

사전 작업

# apt-get update


아파치 서버 설치

# apt-get install apache2


MySQL 인증 모듈 및 서버/클라이언트 설치

# apt-get install libapache2-mod-auth-mysql

# apt-get install mysql-server mysql-client

 

dpkg 관련 오류 날 경우

# apt-get update

# apt-get dist-upgrade

혹은

https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/984688

 


php설치

# apt-get install php5 php5-cli memcached php5-curl php5-gd php5-memcache php5-mysql php-apc php5-xsl php5-imap libssh2-php libapache2-mod-php5 php5-xmlrpc php5-intl


아파치 서버 재시작

# /etc/init.d/apache2 restart


MySQL 작동 상태 확인

# netstat -tap | grep mysql

# /etc/init.d/mysql restart


아파치 및 MySQL 디폴트 트렉토리

Apache configuration : /etc/apache2/apache2.conf

Apache root location : /etc/apache2/sites-available/default

MySQL configuration : /etc/mysql/my.cnf

Default Web root : /var/www


phpMyAdmin 설치

http://kimoppa.tistory.com 참조

설치

# apt-get install phpmyadmin


설정파일 수정(다음 두줄 추가)

# vim /etc/apache2/apache2.conf

#Enable phpMyAdmin

Include /etc/phpmyadmin/apache.conf


아파치 서버 재시작

# /etc/init.d/apache2 restart


삭제

# apt-get autoremove phpmyadmin


접속

http://localhost/phpmyadmin



sftp 설치 및 설정

# apt-get install vsftpd

# service vsftpd start



디렉토리 권한

# chmod -R 755 directory

(소유자 rwx 421)(그룹 rwx 421)(방문자 rwx 421)


# chown -R [소유그룹:소유자] [파일명or디렉토리]



데이터베이스

# mysql -uroot -pmypasswd



계정

# userdel -r userid

# adduser userid

# users

# passwd 계정


히스토리 삭제

# history -c

# logout


압축

gzip

# tar cvfz some.tar.gz some

# tar xvfz some.tar.gz


bzip2

# tar cvfj some.tar.bz2 some

# tar xvfj some.tar.bz2



메일 설정

# apt-get install ssmtp

# vim /etc/ssmtp/ssmtp.conf

mailhub=smtp.gmail.com:587

hostname=user@example.com

AuthUser=메일주소

AuthPass=메일비밀번호

UseSTARTTLS=yes

UseTLS=yes

FromLineOverride=yes




'linux' 카테고리의 다른 글

[펌]zlilb, libpng 등 설치..  (0) 2013.01.03
ftp 보안  (0) 2012.12.19
ubuntu 우분투 한글  (0) 2012.08.16
vim suspend ctrl-z ^z  (0) 2012.08.03
vim 소스코드 자동정렬  (0) 2011.11.01
Posted by Нуеоп