我的centos下的/etc/init.d/目录下只有两个文件
cat README
You are looking for the traditional init scripts in /etc/rc.d/init.d,
and they are gone?
Here's an explanation on what's going on:
You are running a systemd-based OS where traditional init scripts have
been replaced by native systemd services files. Service files provide
very similar functionality to init scripts. To make use of service
files simply invoke "systemctl", which will output a list of all
currently running services (and other units). Use "systemctl
list-unit-files" to get a listing of all known unit files, including
stopped, disabled and masked ones. Use "systemctl start
foobar.service" and "systemctl stop foobar.service" to start or stop a
service, respectively. For further details, please refer to
systemctl(1).
Note that traditional init scripts continue to function on a systemd
system. An init script /etc/rc.d/init.d/foobar is implicitly mapped
into a service unit foobar.service during system initialization.
Thank you!
Further reading:
man:systemctl(1)
man:systemd(1)
http://0pointer.de/blog/projects/systemd-for-admins-3.html
https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
/bin/ls
----
独立服务的启动
1 /etc/init.d/httpd start stop restart
/etc/rc.d/init.d/httpd start
2 service httpd start stop status
/etc/init .d/ 查看rpm包服务
/etc/init .d/httpd start 启动apache stop reatart 停止 重启
service httpd status 查看apache是否启动
/etc/init.d/servicesName start|stop|status|restart
service serName start|stop|status|restart
service 是Redhat提供的命令,不代表所有Linux
独立服务的启动
/etc/init.d/独立服务名 start|stop|status|restart|
service 独立服务器名 start|stop|restart|status|
独立服务的启动
1: /etc/init.d/(/etc/rc.d/init.d/)独立服务名 start|stop|restart|status
2: service 独立服务名 start|stop|restart|status
init start
独立服务的启动方法
/ect/init.d/独立服务名
start|stop|restart|status 状态
service 独立服务名 start|stop|restart|status 状态
独立服务的启动
1. /etc/init.d/ 独立服务名 start|stop|restart|status
/etc/rc.d/init.d/ 独立服务名 start|stop|restart|status
2. service 独立服务名 start|stop|restart|status
/etc/init.d/ #RPM包的启动位置
vi /etc/init.d/httpd #脚本文件查看
/etc/init.d/httpd start #RPM包启动httpd
独立服务的启动方式
独立服务的启动
1: /etc/init.d/(/etc/rc.d/init.d/)独立服务名 start|stop|restart|status
2: service 独立服务名 start|stop|restart|status
独立服务的启动
1: /etc/init.d/(/etc/rc.d/init.d/)独立服务名 start|stop|restart|status
2: service 独立服务名 start|stop|restart|status
独立服务的启动
独立服务启动
独立服务的启动
独立服务的启动
独立服务的启动
1: /etc/init.d/独立服务名 start|stop|restart|status
2: service 独立服务名 start|stop|restart|status
#通过RPM包安装的独立的服务