ubuntu16.04 下安装nginx

1.安装依赖项

安装openssl

sudo apt-get install openssl libssl-dev

安装pcre

sudo apt-get install libpcre3 libpcre3-dev

安装zlib

sudo apt-get install zlib1g-dev

2.将下载的linux版本nginx解压

tar -xvf nginx-1.14.2.tar.gz

mv /nginx-1.14.2 nginx

3.执行配置

./configure

4.编译安装(默认安装在/usr/local/nginx)

make

make install

5.启动nginx

/usr/local/nginx/sbin/nginx

6.访问nginx

http://IP:80

相关推荐