3

Nginx安装步骤

 2 years ago
source link: https://wakzz.cn/2017/09/29/nginx/Nginx%E5%AE%89%E8%A3%85%E6%AD%A5%E9%AA%A4/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Nginx安装步骤

祈雨的博客
2017-09-29

一、准备文件

nginx-1.12.0.tar.gz

下载链接

二、解压源码包

$ tar –zxvf nginx-1.12.0.tar.gz

三、编译到指定路径

$ cd nginx-1.12.0.tar.gz/
$ ./configure --prefix=/opt/nginx
$ make & make install

四、修改配置文件

$ cd /opt/nginx
$ vi conf/nginx.conf

五、启动Nginx

$ ./sbin/nginx

六、关闭Nginx

$ ./sbin/nginx -s stop

七、非root用户使用80端口

$ sudo setcap cap_net_bind_service=+eip /opt/nginx/sbin/nginx
$ /opt/nginx/sbin/nginx

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK