conflict apache service file with yum and manual installation

Started by pejman.hkh, June 24, 2019, 07:30:19 AM

Previous topic - Next topic

pejman.hkh

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 /usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.conf but when rebuild apache in web panel should remake service files again ...

evansa

Apache is built from source on CWP servers.
There is no need to install from yum.this will cause conflict

pejman.hkh

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.

pejman.hkh

Should make httpd.service file in /etc/systemd/system/multi-user.target.wants


[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
systemctl daemon-reload
For reload service and then
service httpd start