我的博客

Nginx安装

以Centos为例

Nginx安装

安装需要的环境

yum install gcc-c++
yum install pcre pcre-devel pcre-static
yum install zlib zlib-devel
yum install openssl openssl-devel
yum install geoip-devel

Nginx 安装命令

./configure --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module  --with-http_geoip_module 

make

make install

nginx 启动

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

nginx 重启

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

nginx 停止

ps -ef | grep nginx
posted @ 2021-04-10 19:17  姜道义  阅读(60)  评论(0编辑  收藏  举报