# gcc -v
一般阿里云的centOS7里面是都有的,没有安装的话会提示命令找不到 # yum isntall -y gcc
# yum install -y pcre pcre-devel
# yum install -y zlib zlib-devel
# yum install -y openssl openssl-devel
# tar -zxvf nginx-1.17.8.tar.gz
# cd nginx-1.17.8
# ./configure --with-http_ssl_module
# make && make install
# mkdir -p /usr/local/nginx/cache
# mkdir -p /usr/local/nginx/cache_temp
# vi /lib/systemd/system/nginxd.service
[Unit] Description=nginx After=network.target
[Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/usr/local/nginx/sbin/nginx -s quit PrivateTmp=true
[Install] WantedBy=multi-user.target
# systemctl start nginxd
# systemctl enable nginxd
0 Comments
Leave a comment