最近重新升级了一下网站,记录下编译安装nginx的过程怕以后忘了:
shell# 安装依赖
sudo apt-get libpcre3 libpcre3-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install zlib1g-dev
# 下载编译安装
wget https://nginx.org/download/nginx-1.17.9.tar.gz
tar vxzf nginx-1.17.0.tar.gz
cd nginx-1.17.0
./config ----prefix=/usr/local/nginx --with-heep_stub_status_module --with-http_ssl_module -with-stream
make
make install
# 添加到系统环境变量方便调用
vim /etc/profile
# 在最后添加
export PATH=/usr/local/nginx/sbin:$PATH
# 导入
sudo source /etc/profile
# 记得权限问题
本文作者:mereith
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!