restart apache centos7 code example Example: centos stop apache systemctl restart httpd.service systemctl start httpd.service systemctl stop httpd.service