루트 패스워드를 설정
# sudo passwd root
#apt-get update && apt-get upgrade
사용중인 서비스 확인
# lsof -i
사용자용 계정 추가
# useradd -b /home -s /bin/bash -m -p 패스워드 사용자아이디
# ls /home
FTP 서비스를 위해서 vsftpd 설치
# apt-get install vsftpd
# vi /etc/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
# touch /etc/vsftpd.chroot_list
MySQL 설치
# apt-get install mysql-server mysql-client
# mysql_secure_installation
NODEJS 설치
# apt-get install python-software-properties
# add-apt-repository ppa:chris-lea/node.js
# apt-get update
# apt-get install nodejs npm
nginx 설치
# apt-get install nginx
# /etc/init.d/nginx start
# ps -ef | grep nginx
# vi /etc/nginx/nginx.conf
[...]
worker_processes 4;
[...]
keepalive_timeout 2;
[...]
http {
# 인덱스 추가
index index.php index.html index.htm
아파치 Virtual Host 기능을 위해 서버블록 구문 추가
# vi /etc/nginx/sites-available/domain.com
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
root /home/domain/www;
server_name domain.com;
access_log /home/domain/logs/domain.com-access.log;
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^ /index.php last;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
nginx 재시작
# /etc/init.d/nginx restart
php5-fpm 설치
# apt-get install php5-fpm
php.ini 수정
# vi /etc/php5/fpm/php.ini
[...]
cgi.fix_pathinfo=0
[...]
Unix socket 설정
# vi /etc/php5/fpm/pool.d/www.conf
[...]
;listen = 127.0.0.1:9000
listen = /var/run/php5-fpm.sock
[...]
PHP 관련 설치를 위해 패키지 확인후 설치
# apt-cache search php5
# apt-get install php5-cli php-pear php5-gd php5-mcrypt php5-mysql php5-curl php5-memcache memcached
# /etc/init.d/php5-fpm reload
'OS > Ubuntu' 카테고리의 다른 글
Ubuntu Server 무선랜 IP설정 (0) | 2012.10.06 |
---|---|
우분투12.04 사용자 추가 - Ubuntu 12.04 useradd (0) | 2012.10.04 |