## page was renamed from nginx/1.25.4 == make == nginx/1.25.4について、ここに記述してください。 ## page was copied from DnsTemplate ##master-page:HelpTemplate <> <> [[../1.25.3]] conoha [[/1.25.4]] Building nginx from Sources https://nginx.org/en/docs/configure.html nginxインストール(ソースからビルド編)for RockyLinux8.4 nginx CentOS コンパイル 最終更新日 2021年10月22日 https://qiita.com/shadowhat/items/988c885a76eb7db54354 OpenSSLは、あらかじめコンパイルをしておきます。 また、includeの関係でソースが必要ですので、opensslのsrcディレクトリを指定します。 今回は「/usr/local/src/」に「openssl-1.1.1l.tar.gz」を回答したものを配置し、 そのディレクトリを「--with-openssl」で指定します。 OpenSSLに関しては、「OpenSSL(1.0.x)をインストールする(ソースからコンパイル)for CentOS 7.2」を参照してください。 cd nginx-1.21.3 {{{ ./configure --prefix=/etc/nginx \ --sbin-path=/usr/sbin/nginx \ --with-pcre-jit \ --with-http_addition_module \ --with-http_dav_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_sub_module \ --with-mail \ --with-mail_ssl_module \ --with-openssl=/usr/local/src/openssl-1.1.1l }}} --with-http_ssl_module == history == 起動スクリプトの配置 起動スクリプトは、CentOSのRPMから拝借しましょう。 nginx起動スクリプト配置先 /usr/lib/systemd/system/nginx.service nginx起動スクリプト cat > /usr/lib/systemd/system/nginx.service << EOF {{{ [Unit] Description=nginx - high performance web server Documentation=http://nginx.org/en/docs/ After=network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/etc/nginx/logs/nginx.pid ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/conf/nginx.conf ExecStart=/usr/sbin/nginx -c /etc/nginx/conf/nginx.conf ExecReload=/bin/kill -s HUP \$MAINPID ExecStop=/bin/kill -s QUIT \$MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target EOF }}} https://mogile.web.fc2.com/nginx/nginx1.15.0/configure.html ---- CategoryDns CategoryWatch CategoryTemplate