ubuntu16.04编译安装nginx1.24.0

环境:

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.7 LTS
Release:	16.04
Codename:	xenial

 安装包:

pcre-8.45.tar.gz
nginx-1.24.0.tar.gz

开始安装:

安装pcre

tar -xzvf pcre-8.45.tar.gz
cd pcre-8.45
./configure --prefix=/usr/local/pcre 
make && make install 

安装nginx

tar -xvf nginx-1.24.0.tar.gz
./configure --prefix=/usr/local/nginx --with-pcre=/root/pcre-8.45 --with-http_stub_status_module --with-http_ssl_module
make && make install

安装完成测试

附1:nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"

 

执行这句解决:重新指定一下配置文件

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

 

posted @ 2023-08-02 09:48  xjournal  阅读(252)  评论(0编辑  收藏  举报