1 Installing MySQL
Yum-y Install Mariadb-server
Systemctl Start Mariadb.service
Systemctl Enable Mariadb.service
The default installation is 5.5.40-MARIADB, the personal favorite version, is no longer the one of the 5.1.
2 Installing Apache
Yum Install-y httpd
Systemctl Start Httpd.service
Systemctl Enable Httpd.service
Apache version is 2.4.6
3. Install PHP
Yum-y Install phpsystemctl Restart Httpd.service
php5.4
In fact, the installation and CENTOS6 version is no different. Some software upgrades were made, but the previous bash script under/ETC/INIT.D was discarded on startup. Instead, it uses the Systemctl command.
The relevant documents are under/usr/lib/systemd/system. Look, it's a lot simpler than the previous bash script. Like httpd's Systemctl file.
Cat/usr/lib/systemd/system/httpd.service [unit]description=the Apache HTTP Serverafter=network.target Remote-fs.target nss-lookup.target[service]type=notifyenvironmentfile=/etc/sysconfig/httpdexecstart=/usr/sbin/ httpd $OPTIONS-dforegroundexecreload=/usr/sbin/httpd $OPTIONS-K gracefulexecstop=/bin/kill-winch ${mainpid}# We want Systemd to give httpd some time-to-finish gracefully, but still want# it-kill httpd after timeoutstopsec if something W ent wrong during the# graceful stop. Normally, SYSTEMD sends SIGTERM signal right after the# execstop, which would kill httpd. We are sending useless sigcont this to give# httpd time to finish. Killsignal=sigcontprivatetmp=true[install]wantedby=multi-user.target
Or the previous chkconfig, also integrated in the Systemctl. Very concise systemctl enable httpd
Systemctl enable httpdln-s '/usr/lib/systemd/system/httpd.service '/etc/systemd/system/ Multi-user.target.wants/httpd.service '
The operation is actually a soft connection. Very intuitive. The operation of what direct feedback came back.
[[email protected] _local]# systemctl status httpdhttpd.service-the Apache HTTP Server loaded:loaded (/usr/lib/ Systemd/system/httpd.service; Enabled) Active:inactive (dead) Dec 04:19:54 Iz23f0gpuenz systemd[1]: Reloaded the Apache HTTP server.dec 14 14:49:32 Iz23f0gpuenz Systemd[1]: Stopping the Apache HTTP Server ... Dec 14:49:34 Iz23f0gpuenz systemd[1]: Starting the Apache HTTP Server ... Dec 14:49:34 Iz23f0gpuenz httpd[14550]: AH00558:httpd:Could not reliably determine the server ' s fully qualified Domai n name, using 10.168.19...S messagedec 14:49:34 Iz23f0gpuenz systemd[1]: Started the Apache HTTP server.dec 14 14:50:23 Iz23f0gpuenz Systemd[1]: Stopping the Apache HTTP Server ... Dec 14:50:24 Iz23f0gpuenz systemd[1]: Starting the Apache HTTP Server ... Dec 14:50:24 Iz23f0gpuenz httpd[14681]: AH00558:httpd:Could not reliably determine the server ' s fully qualified Domai n name, using 10.168.19...S messagedec 14:50:24 Iz23f0gpuenz systemd[1]: Started the ApAche http Server.dec 15:37:49 Iz23f0gpuenz systemd[1]: Stopping the Apache http Server ... Dec 15:37:50 Iz23f0gpuenz systemd[1]: Stopped the Apache HTTP Server.Hint:Some lines were ellipsized use-l to show I N Full.
Status is also done very hi, when the operation of HTTPD service is also at a glance.
CentOS 7 also made a further upgrade, such as the addition of firewall, built-in git and so on, did a very useful upgrade. More features are being explored.
Install Apache MySQL php phpmyadmin under Centos7.