# 用systemctl启动Nginx服务,并查看状态 [root@localhost nginx-1.14.0]# systemctl start nginx [root@localhost nginx-1.14.0]# systemctl status nginx ● nginx.service - nginx - high performance web server Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled) Active: active (running) since 日 2019-05-05 23:05:38 CST; 5s ago Docs: http://nginx.org/en/docs/ Process: 10466 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS) Process: 10464 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS) Main PID: 10469 (nginx) CGroup: /system.slice/nginx.service ├─10469 nginx: master process /usr/sbin/nginx └─10470 nginx: worker process
5月 05 23:05:38 centos7 systemd[1]: Starting nginx - high performance web ..... 5月 05 23:05:38 centos7 nginx[10464]: nginx: the configuration file /usr/l...ok 5月 05 23:05:38 centos7 nginx[10464]: nginx: configuration file /usr/local...ul 5月 05 23:05:38 centos7 systemd[1]: Failed to read PID from file /usr/loca...nt 5月 05 23:05:38 centos7 systemd[1]: Started nginx - high performance web s...r. Hint: Some lines were ellipsized, use -l to show in full.