这种启动会报此类错误,正确执行指令是完整写全路径,可能还会报错,因为80,443被占用
先查看已经起来的服务,有没有占用的服务:
systemctl list-unit-files --type=service | grep enabled
发现有httpd服务起来,要关闭httpd服务,避免占用80端口
systemctl stop httpd.service
此时再启动nginx就好了
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf