centos-nginx安装

# 安装依赖
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++
yum -y install automake pcre pcre-devel zlib zlib-devel openssl-devel
# 上传 安装包
#
tar
-zxvf nginx-1.21.6.tar.gz cd nginx-1.21.6 ./configure --with-http_ssl_module make && make install

官网下载

开放80端口

/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

启动

cd /usr/local/nginx/sbin/

./nginx

 

posted @ 2022-06-07 21:35  wuzhp  阅读(38)  评论(0)    收藏  举报