nginx-1.8.1下载地址http://nginx.org/download/nginx-1.8.1.tar.gz

yum install gcc gcc-c++ automake pcre pcre-devel zlip zlib-devel openssl openssl-devel

./configure --user=nginx --group=nginx --prefix=/usr/local/nginx  --with http_gzip_static_module --with-http_stub_status_module  --with-http_ssl_module

make && make install

/usr/local/nginx/sbin/nginx                      //启动nginx

/usr/local/nginx/sbin/nginx -t                   //检查nginx配置文件

/usr/local/nginx/sbin/nginx -v                   // 查看版本

/usr/local/nginx/sbin/nginx -V                   // 查看编译参数

/usr/local/nginx/sbin/nginx -s reload            // 重新载入配置文件

/usr/local/nginx/sbin/nginx -s reopen            // 重启 Nginx

/usr/local/nginx/sbin/nginx -s stop             // 停止 Nginx






https://dev.mysql.com/downloads/mysql/5.6.html#downloads

mysql二进制发布包 http://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz

解压后复制到/usr/local/mysql

useradd mysql

chown -R mysql:mysql mysql/

chmod -R 777 mysql/



./mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --user=mysql

cd mysql/support-files/

cp mysql.server /etc/init.d/mysqld

chkconfig --add mysqld

chkconfig mysqld on


[root@VM_21_183_centos mysql]# cat /etc/my.cnf 

[mysqld]

datadir=/usr/local/mysql/data

basedir=/usr/local/mysql

socket=/tmp/mysql.sock

user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid


ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql

/etc/init.d/mysqld start



php-5.5.38下载地址http://cn.php.net/distributions/php-5.5.38.tar.gz

yum install libxml2-devel bzip2-devel libxml2

yum install libjpeg libpng freetype libjpeg-devel libpng-devel freetype-devel -y

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath

make && make install
cp php.ini-production /usr/local/php/etc/php.ini
ln -s /usr/local/php/etc/php.ini /etc/php.ini

chmod 775 -R php

chown nginx:nginx -R php

vi /usr/local/php/etc/php-fpm.conf #编辑

user = nginx #设置php-fpm运行账号为nginx

group = nginx #设置php-fpm运行组为nginx

pid = run/php-fpm.pid #取消前面的分号

忘记安装GD了