nginx sets system service startup

nginx sets system service startup

  1. To download nginx, just download it directly from the official website

  2. Baidu nssm
    Insert image description here

  3. After downloading and unzipping, I put nssm and nginx in the same folder.
    Insert image description here

  4. Unzip nssm. Depending on your system, if it is 32-bit, copy nssm.exe from the win32 folder. If it is 64-bit, copy nssm.exe from the win64 folder. I copied it to nginx.Insert image description here

  5. cmd, switch to the nginx pathInsert image description here

  6. Run the command in this directory: nssm install My_Nginx
    Insert image description here
    path: is the path of nginx.exe, directory: is the path of the nginx folder;
    here I should write path: F:\nginx\nginx-1.16.1\nginx.exe;
    directory:F:\nginx\nginx-1.16.1

  7. When the install service button is clicked, the following image will pop up, indicating that the installation is successful.Insert image description here

  8. Enter the command at the command lineservices.msc

  9. Display on the service list page: Insert image description here
    and set startup, right-click Properties -> Set Automatic

  10. Delete nginx service commandsc delete 服务名称

Guess you like

Origin blog.csdn.net/weixin_44021888/article/details/108493414