上传nginx-1.18.0.tar.gz
mv nginx-1.18.0.tar.gz /usr/local/
#解压
tar -zxvf nginx-1.18.0.tar.gz
#安装
cd nginx-1.18.0
#安装依赖包
apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgeoip-dev openssl libgd-dev
编译安装
./configure \
--sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-threads \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_xslt_module \
--with-http_image_filter_module \
--with-http_geoip_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_degradation_module \
--with-http_slice_module \
--with-http_stub_status_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
--with-stream_geoip_module \
--with-stream_ssl_preread_module \
--with-compat \
--with-pcre-jit&& make && make install
设置软链接
ln -s /usr/local/nginx/nginx /usr/local/bin/nginx
启动
nginx
浏览器查看-安装成功文章来源:https://www.toymoban.com/news/detail-793754.html
文章来源地址https://www.toymoban.com/news/detail-793754.html
到了这里,关于ubuntu nginx安装部署的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!