一、tengine
[plain] view plaincopyprint?
wget tengine.taobao.org/download/tengien-2.1.0.tar.gz
tar xf tengine-2.1.0.tar.gz
cd tengine-2.1.0
yum install pcre-devel openssl-devel jemalloc-devel -y
./configure --prefix=/usr/local/nginx --user=nobody --group=nobody --with-http_stub_status_module --without-http-cache --with-http_ssl_module --with-http_gzip_static_module --with-http_concat_module --with-jemalloc
[plain] view plaincopyprint?
ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx
[plain] view plaincopyprint?
nginx
二、php
[plain] view plaincopyprint?
yum install php php-fpm php-gd php-mbstring php-mcrypt php-mysql -y
[plain] view plaincopyprint?
cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.conf.bk
[plain] view plaincopyprint?
sed -i -r "s/(user|group)\ =.*/\1 = nobody/g" /etc/php-fpm.d/www.conf
[plain] view plaincopyprint?
/etc/init.d/php-fpm start
三、mysql
[plain] view plaincopyprint?
yum install mysql mysql-server -y
[plain] view plaincopyprint?
service mysqld start
[plain] view plaincopyprint?
/usr/bin/mysql_secure_installation(第一次回车,第二次输入Y回车,再输入两次数据root用户的密码,第三次输入Y回车以移除匿名用户,第四次输入Y回车以禁止root远程登录数据库,第五次输入Y回车以移除测试数据库,第六次输入Y回车以立即刷新权限)
[plain] view plaincopyprint?
mysql -u root -p(输入root的密码)
[plain] view plaincopyprint?
create database wordpress;(创建一个名为wordpress的数据库)
[plain] view plaincopyprint?
grant all privileges on wordpress.* to "newusername"@"localhost" identified by "newpassword";(创建一个用户名为"newusername"密码为"newpassword"的用户,并赋予该用户操作数据库"wordpress"的所有权限,并赋予该用户本地登录数据库的权利)
[plain] view plaincopyprint?
flush privileges;(刷新权限分配)
[plain] view plaincopyprint?
quit;(退出数据库)
四、wordpress
[plain] view plaincopyprint?
cd /usr/local/nginx/html
wget wordpress.org/latest.tar.gz
tar xf latest.tar.gz