标签:openssl run des test 错误 必须 service gcc list
yum -y install gcc gcc-c++yum -y install zlib zlib-devel openssl openssl-devel pcre-devel
在Ubuntu 下, 对应openssl-devel的包是 libssl-dev
groupadd -r nginx # -r 表示创建的是系统组 useradd -s /sbin/nologin -g nginx -r nginx # -r 表示创建的是系统用户 id nginx # 即使用其他用户启动nginx, 也必须创建nginx用户和用户组, 否则会出现 nginx: [emerg] getpwnam("nginx") failed 错误
./configure --prefix=/opt/nginx/nginx-1.14.0 --user=nginx --group=nginx --with-http_gzip_static_module --with-pcre --with-http_ssl_module --with-http_flv_module --with-stream --with-stream_ssl_module --with-http_stub_status_module make make install
建立latest目录和软链, 方便将来替换为新版本
cd /opt/nginx/ ln -s nginx-1.14.0 latest
将nginx加入系统服务
cd /lib/systemd/system/ vi nginx.service # 内容 [Unit] Description=The NGINX HTTP and reverse proxy server After=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/var/run/nginx.pid ExecStartPre=/opt/nginx/latest/sbin/nginx -t -c /opt/nginx/latest/conf/nginx.conf ExecStart=/opt/nginx/latest/sbin/nginx ExecReload=/opt/nginx/latest/sbin/nginx -s reload ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target # 内容结束 systemctl enable nginx.service
firewall-cmd --zone=public --list-all firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload # 启动nginx systemctl start nginx
标签:openssl run des test 错误 必须 service gcc list
原文地址:https://www.cnblogs.com/milton/p/9693836.html