nginx安装
【安装编译工具和库文件】
# yum -y install make zlib zlib-devel gcc-c++ openssl openssl-devel pcre*
【创建软件包目录】
# mkdir /opt/software
# cd /opt/software
【下载软件包】
http://nginx.org/en/download.html
nginx-1.16.0.tar.gz
【使用sftp上传到/opt/software】
【解压】
# tar -zxvf nginx-1.16.0.tar.gz -C /root
【编译安装】
# cd /root/nginx-1.16.0
# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre
# make && make install
【启动nginx】
# /usr/local/nginx/sbin/nginx
【检测】
# ps -ef | grep nginx
可以看到nginx进程
或者打开浏览器访问
nginx源码安装
最新推荐文章于 2023-03-29 16:49:46 发布