yum install httpd -y
yum install mysql mysql-server -y
yum install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo -y --skip-broken
yum install nginx -y
設定mysql root密碼:
/usr/bin/mysql_secure_installation
nginx配置:
server {
listen 80;
server_name www.DOMAIN.com DOMAIN.com;
location / {
root /work/www/www.DOMAIN.com;
index index.html index.htm index.php;
}
location ~ \.php$ {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}