Nginx 安装
Windows 安装
Linux 安装
rpm 包方式(推荐)
源码编译方式
安装编译工具及库文件
安装 Nginx
Linux 开机自启动
rpm 包方式
源码编译方式
脚本
安装说明
使用方法
参考资料
最后更新于
最后更新于
cd C:
cd C:\nginx-0.8.54 start nginx$ wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm$ rpm -ivh nginx-*.rpm$ yum install nginx$ firewall-cmd --zone=public --add-port=80/tcp --permanent
$ firewall-cmd --reload$ yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-develwget -O /opt/pcre/pcre-8.35.tar.gz http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
cd /opt/pcre
tar zxvf pcre-8.35.tar.gzcd /opt/pcre/pcre-8.35
./configure
make && make installwget -O /opt/nginx/nginx-1.12.2.tar.gz http://nginx.org/download/nginx-1.12.2.tar.gz
cd /opt/nginx
tar zxvf nginx-1.12.2.tar.gzcd /opt/nginx/nginx-1.12.2
./configure --with-http_stub_status_module --with-http_ssl_module --with-pcre=/opt/pcre/pcre-8.35$ firewall-cmd --zone=public --add-port=80/tcp --permanent
$ firewall-cmd --reload$ systemctl enable nginx.servicecurl -o- https://gitee.com/turnon/linux-tutorial/raw/master/codes/linux/soft/nginx-install.sh | bash
wget -qO- https://gitee.com/turnon/linux-tutorial/raw/master/codes/linux/soft/nginx-install.sh | bashsh nginx-install.sh [version]