Author Topic: conflict apache service file with yum and manual installation  (Read 575 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
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 ...
« Last Edit: June 24, 2019, 07:32:21 AM by pejman.hkh »

Offline
*****
Re: conflict apache service file with yum and manual installation
« Reply #1 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

Offline
*
Re: conflict apache service file with yum and manual installation
« Reply #2 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.

Offline
*
Re: conflict apache service file with yum and manual installation
« Reply #3 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