Centos 7에서는 서비스 명령이 작동하지 않습니다

Centos 7에서는 서비스 명령이 작동하지 않습니다

service나는 아래와 같이 centos 6.5에서 서비스를 다시 시작하고, 다시 로드하고, 상태를 확인하는 명령을 사용했습니다 .

$ sudo service nginx restart OK
$ sudo service nginx status OK

하지만 CentOS 7에서는 동일한 작업을 수행하면 이 알림을 받습니다.

[root@admin ~]# service nginx restart
Redirecting to /bin/systemctl restart  nginx.service
[root@admin ~]# 

질문:Centos7.5에서 nginx 서비스를 어떻게 시작합니까?

답변1

serviceCentOS 7에서는 더 이상 명령이 작동하지 않습니다. Redhat 기반 OS가 SysVinit 시스템에서 Systemd로 마이그레이션되었습니다.

당신은 사용해야합니다systemctl start nginx.service

sysVinit에서 systemd 치트시트를 보려면 다음 링크를 방문하세요. https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet

관련 정보