Ubuntu安装Nginx

1、首先安装依赖库

sudo apt-get install libpcre3 libpcre3-dev

sudo apt-get install zlib1g zlib1g-dev

sudo apt-get install openssl

sudo apt-get install libssl-dev

2、下载nginx

cd /usr/local

sudo mkdir nginx

cd nginx

sudo wget http://nginx.org/download/nginx-1.16.0.tar.gz

sudo tar -xvf nginx-1.16.0.tar.gz

3、编译安装nginx

sudo ./configure --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module

sudo make

sudo make install

4、修改编译

./configure --help   查看想要编译的模块,然后再执行步骤3,不用在make install

你可能感兴趣的:(Ubuntu安装Nginx)