#!/bin/bash
echo "#############################install nginx-1.5.2########################" >> /root/install.txt
apt-get install -y build-essential libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssl-dev && echo "Basic packages install ok!" >> /root/install.txt || echo "Basic packages install failed !!!!!!!!!!1" >> /root/install.txt
cd /usr/local/src
ls nginx-1.5.2.tar.gz || wget http://nginx.org/download/nginx-1.5.2.tar.gz
rm -rf nginx-1.5.2
tar zxvf nginx-1.5.2.tar.gz
cd nginx-1.5.2
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-pcre &&make && make install && echo "nginx install ok!" >> /root/install.txt || echo "nginx install failed!!!!!!!!!!!!!!!" >> /root/install.txt
mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.bak
echo
debian一键安装nginx
最新推荐文章于 2024-07-12 13:29:58 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)