一.查看apache服务器是否运行:
systemctl is-enabled httpd.service
service status httpd
//或者,不同版本Linux不一样
service httpd status
二.启动apache服务器
systemctl start httpd.service #启动apache(仅本次有效,关机后恢复原状态)
systemctl restart httpd.service #重启apache
systemctl enable httpd.service #设置apache(开机自动启动)
service httpd start #启动(仅本次有效,关机后回复原状态)
service httpd restart #重新启动
三.停止apache服务器
systemctl stop httpd.service #停止apache
systemctl disabled httpd.service #永久关停apache
service httpd stop #停止服务(仅本次,关机后恢复原状态)
四.查看Samba是否运行命令
service smb status
service nmb status
五.重启Samba命令
systemctl restart smb
systemctl restart nmb
六.Samba设置完/etc/Samba/sam.conf有效命令
每次修改完smb.conf文件以后,别忘了键入命令:
service smb reload
会停止samba 后再启用,重启:
service smb restart