I just installed CentOS 7.1 on one server and I'm confused by how systemctl
works compared to service
.
On CentOS 6, I would get feedback when running service
, such as:
root@centos6 [~]# service mysql restart
Shutting down MySQL........................................[ OK ]
Starting MySQL.............................................[ OK ]
root@centos6 [~]# service mysql status
MySQL running (910285) [ OK ]
root@centos6 [~]#
However on CentOS 7, when I use systemctl
, I get nothing. I don't know what happened, or if something even happened:
root@centos7 [~]# systemctl restart mysql
root@centos7 [~]# /bin/systemctl restart mysql.service
# Nothing happened
And when I run service
on CentOS 7, this happens:
root@centos7 [~]# service mysql restart
Redirecting to /bin/systemctl restart mysql.service
What am I'm missing?
systemctl restart
. :-)