环境
CentOS Linux release 7.9.2009
下载
wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz
安装
解压压缩包
tar -xvzf tengine-2.3.2.tar.gz
进入解压后的目录
cd tengine-2.3.2
配置安装的路径 (可自行修改)
./configure --prefix=/usr/apps/nginx
①报错./configure: error: the HTTP rewrite module requires the PCRE library.
yum install -y pcre pcre-devel
②报错./configure: error: SSL modules require the OpenSSL library.
yum install -y openssl-devel
开始安装
make
make install
启动/停止
进入安装目录的sbin目录下
cd /usr/apps/nginx/sbin
启动服务
./nginx
启动完成后用浏览器打开 http://ip/
停止服务
./nginx -s quit
重载配置
./nginx -s reload
配置文件
配置文件位于安装目录的conf文件夹下 nginx.conf
Comments | NOTHING