LNMP搭建流程

首先搭建Nginx服务

 

用本地yum仓库安装依赖包

yum install -y pcre-devel openssl-devel gcc gcc-c++ make automake

下载软件源码包:

wget -q http://nginx.org/download/nginx-1.10.2.tar.gz 
没有wget命令需要手动安装 
yum -y install wget

创建程序用户

useradd -s /sbin/nologin -M www

编译和安装ngnix:

tar xf nginx-1.10.2.tar.gz -C /usr/src/

cd /usr/src/nginx-1.10.2.tar.gz

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

make && make install

Nginx软链接

ln -s /usr/local/nginx/sbin/* /usr/local/sbin

                                                         

                        

猜你喜欢

转载自www.cnblogs.com/creater-wei/p/9929781.html