Last active
January 1, 2016 21:58
-
-
Save ipfans/8206547 to your computer and use it in GitHub Desktop.
初始化服务器配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get upgrade | |
groupadd www | |
useradd -s /sbin/nologin -g www www | |
mkdir -p /home/wwwroot/default | |
chmod +w /home/wwwroot/default | |
mkdir -p /home/wwwlogs | |
chmod 777 /home/wwwlogs | |
touch /home/wwwlogs/nginx_error.log | |
apt-get install -y mysql-server mysql-client vim | |
mysql_secure_installation | |
apt-get install php5-fpm php5-gd php5-mysql php5-curl php5-mcrypt | |
apt-get install build-essential libpcre3-dev libssl-dev libxml2-dev libxslt1-dev libgd2-xpm-dev | |
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6 | |
ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx | |
wget -O pma.tar.gz http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.3/phpMyAdmin-4.1.3-all-languages.tar.gz | |
vim /etc/php5/fpm/php-fpm.conf # 按需修改 | |
vim /etc/php5/fpm/pool.d/www.conf # 按需修改 | |
service php5-fpm start | |
vim /usr/local/nginx/conf/nginx.conf # 按需修改 | |
# 启动nginx | |
nginx | |
# 结束nginx | |
kill -INT `cat /var/run/nginx.pid` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment