Ubuntu16 安装nginx

1.安装gccg++的依赖库

apt-getinstallbuild-essential

apt-getinstalllibtool

2.安装pcre依赖库

sudoapt-getupdate

sudoapt-getinstalllibpcre3libpcre3-dev

3.安装zlib依赖库

apt-getinstallzlib1g-dev

4.安装ssl依赖库

apt-getinstallopenssl

开始安装nginx

1.解压:tar-zxvfnginx-1.11.3.tar.gz

2.cdnginx-1.11.3

3.sudo./configure编译参数

4.sudomake编译

5.sudomakeinstall编译安装

6.cd/usr/local/nginx/sbin/

sudo./nginx启动nginx

7.cd/usr/local/nginx/sbin

./nginx-squit停止nginx

8.修改nginx.conf配置文件后./nginx-sreload重新加载

相关推荐