nginx+mysql+php

nginx

安装依赖

yum -y install gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre pcre-devel

下载解压 nginx

wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
tar zxvf pcre-8.35.tar.gz

编译安装

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre --with-http_gzip_static_module --with-http_realip_module

make

make install

修改配置

启动

/usr/local/nginx/sbin/nginx

参考

nginx服务器安装及配置文件详解
Nginx 安装配置

mysql

yum install mysql-server

systemctl start mysql.service # 启动 MySQL server

PHP

yum install php-fpm php-mysql
systemctl start php-fpm