**
实验一:部署LNMP环境
nginx源码编译模块:
–user=nginx --group=nginx --with-http_ssl_module
**
第一步:安装基础的依赖包并且源码编译
pcre-devel openssl-devel gcc
[root@localhost ~]# yum -y install gcc pcre-devel openssl-devel
[root@localhost ~]# useradd -s /sbin/nologin nginx
[root@localhost ~]# tar -xvf nginx-1.12.2.tar.gz
[root@localhost ~]# cd nginx-1.12.2
[root@localhost nginx-1.12.2]# ./configure --user=nginx --group=nginx --with-http_ssl_module
[root@localhost nginx-1.12.2]# make && make install
第二步:安装相应mysql及其php等相关软件
mariadb mariadb-server mariadb-devel php php-mysql php-fpm
[root@localhost nginx-1.12.2]# yum -y install mariadb mariadb-server mariadb-devel php php-mysql php-fpm
第三步:启动服务并设置为开机自启
[root@localhost nginx-1.12.