sudo mkdir -p /usr/local/nginx sudo tar xf nginx-built.tar.gz /usr/local/nginx cat < /etc/systemd/system/nginx.service [Unit] Description=The NGINX HTTP and reverse proxy server After=network.target [Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx -p /usr/local/nginx -c conf/nginx.conf ExecReload=/usr/local/nginx/sbin/nginx -p /usr/local/nginx -c conf/nginx.conf -s reload ExecStop=/usr/local/nginx/sbin/nginx -p /usr/local/nginx -c conf/nginx.conf -s quit PIDFile=/usr/local/nginx/logs/nginx.pid User=root Group=root Restart=always LimitNPROC=5000 LimitNOFILE=1000000 [Install] WantedBy=multi-user.target EOF