LNMP

 

1.1.1 创建www用户

useradd -s /sbin/nologin -M www

 

1.1.2 编译安装(三部曲)

./configure --prefix=/application/nginx-1.10.2 --user=www --group=www --with-http_stub_status_module  --with-http_ssl_module

make  && make  install

 

1.1.3 创建软链接

ln  -s  /application/nginx-1.10.2  /application/nginx

 

1.1.4 修改配置文件

vim /application/nginx/conf/nginx.conf

server {

     listen       80;

     server_name  blog.xzy.org;

     location / {

         root   html;

         index  index.html index.htm;

     }

 

1.1.5 启动相关(启动、关闭、重启)

检查配置文件

/application/nginx/sbin/nginx -t

启动

/application/nginx/sbin/nginx

平滑重启、关闭

/application/nginx/sbin/nginx -s  reload | stop

 

 

1.2 测试

posted @ 2018-01-19 09:53  小学生-XZY  阅读(170)  评论(0编辑  收藏  举报