【运维】linux下快速安装nginx服务器

一、安装依赖

yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install gcc-c++
yum install -y openssl openssl-devel

二、执行命令

cd /
mkdir nginx
cd nginx
wget  https://nginx.org/download/nginx-1.16.1.tar.gz
tar --zxvf nginx-1.16.1.tar.gz
cd nginx-1.16.1.tar.gz
./configure
make
make install
whereis nginx
cd /usr/local.nginx
cd sbin
./nginx

三、其他

修改 conf 后需要重启

./nginx -s reload

四、参考文档

参考链接地址

posted @ 2020-03-02 11:45  今年十六岁  阅读(305)  评论(0编辑  收藏  举报