1.安裝Apache軟件
Apache軟件的軟件包名稱叫做httpd
[root@localhost ~]# yum install httpd
安裝完成后,Apache是以httpd服務(wù)的形式存在的。因此,要啟動Apache并將其設(shè)置為開機啟動磅网,就使用命令:
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl enable httpd.service
然后,檢查httpd服務(wù)狀態(tài):
[root@localhost ~]# systemctl status httpd.service
如上圖所示,“enabled”表示httpd服務(wù)已設(shè)為開機啟動喊崖,“active(running)”則表示httpd服務(wù)正在運行中。
2.安裝PHP
yum -y install php
3.安裝mariaDB數(shù)據(jù)庫
安裝:yum -y install mariadb-server mariadb
啟動:systemctl start mariadb.service
systemctl enable mariadb.service
配置:cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
4..安裝MariaDB數(shù)據(jù)庫
安裝:yum -y install mariadb-server mariadb
啟動:systemctl start mariadb.service
systemctl enable mariadb.service
配置:cp /usr/share/mysql/my-huge.cnf /etc/my.cnf? 覆蓋原配置就好了雇逞。
設(shè)置數(shù)據(jù)庫管理員密碼:mysql_secure_installation? y