linux启动、关闭、重启网络服务的两种方式

2025-02-26 04:40:26
推荐回答(4个)
回答1:

第一种就是楼上说的直接service 服务名称 start/restart/stop
第二种可以直接进入/etc/init.d目录,服务的脚本文件都存放在此目录中,可以直接执行对其start/restart/stop如:
[root@localhost ~]# cd /etc/init.d
[root@localhost init.d]# ./ntpd restart
关闭 ntpd: [确定]
启动 ntpd: [确定]
[root@localhost init.d]#

回答2:

serivce network start
service network stop
service network restart

回答3:

试试
service httpd start
service vsftpd start
另外,虚机团上产品团购,超级便宜

回答4:

service network stop
ifconfig eth0 up
/etc/init.d/network stop