Centos7部署lamp: httpd2.4(prefork)+module模式

安裝lamp(以Centos7的httpd2.4爲例):php

yum install -y httpd php php-mysql mariadb-servermysql

//額外安裝php,mysql驅動器以及數據(Centos 7下已改成mariadb)sql

wKioL1hqGaOBSQQYAAFF1nRukHA853.png

 

systemctl start mariadb.service       //啓動數據庫服務數據庫

wKiom1hqGbvR0ZQUAABPfMmbhZA327.png

 

 

vim /etc/httpd/conf.modules.d/00-mpm.conf        //修改httpd工做模式vim

wKioL1hqGdSTchDbAAIdLvtVSTI205.png

systemctl reload httpd.serviceide

wKiom1hqGeujdOroAABx0jy7D_U689.png

 

 

測試測試

vim /www/aaa/index.phpspa

wKiom1hqGf-w-hFvAAAehDy5x6E581.png

 

 

wKiom1hqGhLBe8E2AAHb8zocZ-A192.png

 

 

vim /www/aaa/testDb.php         //測試是否能夠正常鏈接數據庫3d

wKioL1hqGinDwrORAACrf7m5h68180.png

 

wKiom1hqGj7Qzh-HAAH8I4dc8rI448.png

相關文章
相關標籤/搜索