Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: pejman.hkh on June 24, 2019, 07:30:19 AM

Title: conflict apache service file with yum and manual installation
Post by: pejman.hkh on June 24, 2019, 07:30:19 AM
When i installed apache with yum the service file of apache config file seted to /etc/httpd and this cause to fail to start apache.
I started apache manually with
Code: [Select]
/usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.conf but when rebuild apache in web panel should remake service files again ...
Title: Re: conflict apache service file with yum and manual installation
Post by: evansa on June 24, 2019, 11:18:09 PM
Apache is built from source on CWP servers.
There is no need to install from yum.this will cause conflict
Title: Re: conflict apache service file with yum and manual installation
Post by: pejman.hkh on June 26, 2019, 12:37:12 PM
I know this cause conflict, but if anyone installed apache with yum apache service file will not work properly. can you give me apache service file here ? for centos 7.
Title: Re: conflict apache service file with yum and manual installation
Post by: pejman.hkh on June 30, 2019, 06:32:44 AM
Should make httpd.service file in /etc/systemd/system/multi-user.target.wants

Code: [Select]
[Unit]
Description=Web server Apache
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/apache/bin/apachectl start
ExecReload=/usr/local/apache/bin/apachectl graceful
ExecStop=/usr/local/apache/bin/apachectl graceful-stop
[Install]
WantedBy=multi-user.target

And after do
Code: [Select]
systemctl daemon-reloadFor reload service and then
Code: [Select]
service httpd start