Installing Apache, php, Mysql from source and systemd?
Hi,
Till now I used CentOS 6.x with SysV and there wasnt prob with services. But in CentOS 7.x is used Systemd and I dont know how to setup services for Apache, php, Mysql installed from source. Can you guide me plz? Thx! |
Why not install them via package management? systemd supports SysV scripts in /etc/init.d as well. Otherwise, see the man pages (man systemd) and look to the "See also" sections for references to other man pages and man page levels for further reading.
|
use yum to install the software group
Code:
su - |
I dont want want to use versions of apps supplied by yum.
I want specific versions. Thats why I compiled from source but this systemd makes my crasy! |
then use slack or LFS
you are using CentOS ( aka RHEL) for a reason it is DEAD STABLE and almost never crashes it is very WELL tested and very stable AND DOSE NOT CRASH have you read the redhat documentation https://access.redhat.com/documentat...h_systemd.html you will have to manually make the needed files |
Most server software nowadays comes with .service files for systemd, just copy them to /etc/systemd/system and enable them using systemctl. Alternatively, use the distribution provided .service files, you can extract them from the respective RPMs.
|
Hi TobiSGD,
Thx for reply. I've already did that. I put tthe httpd.service and edited to point to binaries. Enabled the service. But I still cant start the service via systemctl |
Which error messages do you get?
|
CentOS 7 - httpd and systemd problem!
Hi guys.
I have problems with Apache v2.2.29 build from source and systemd. My /usr/lib/systemd/system/httpd.service Quote:
But the web server is not available trough internet. systemctl status httpd.service gives: Quote:
And where should be set the path to httpd.conf? Couse if I start it with: /usr/local/apache2/bin/apachectl start Apache starts w/o problem and all is OK. Waiting for your hints guys. Edit1: Actually the web is working but cant connect to mysql when is started with systemctl Mysql is again build from source Still investigating... Edit2: Just saw in phpinfo (when started with systemctl) that a lot things missing from Environment section. |
Hi
I have little progress after reading about 200 pages but still have probs. Thats why I made a new thread in CentOS forum: http://www.linuxquestions.org/questi...em-4175538543/ |
Systemd runs as root so its likely able to read the apache configuration fine. Is the pidfile directive in the service configuration the same as in httpd configuration?
For MySQL, what errors are seen? Are you able to connect to the DB on the command line from the same system? |
Hi mate,
I'm not sure why it gives warning about pidfile but httpd start/reboot/stop ok with systemd. Now the problem with mysql still exist. When httpd is ran via systemd I see environment that mysql missing from the PATH: Quote:
Quote:
Thx! |
I tried add export PATH=$PATH:/usr/local/mysql/bin
to /usr/lib/systemd/system/httpd.service But still I'm getting: Connection failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Quote:
|
Anyone?
|
Sorry I've been away sick... so very sick.
Couple things to check: Is the socket actually in that location? Seems a little off to me, usually under /var/run/mysql If it is there, is it readable by the user that runs Apache? |
All times are GMT -5. The time now is 09:08 AM. |