CentOS安装Apche+Mysql+PHP

第一步:安装Apache服务程序

 

yum install httpd -y

 

第二步:设置Apache开机启动

 

systemctl start httpd 

 

systemctl enable httpd 

 

第三步:重启Apache服务 

 

 systemctl restart httpd.service

 

第四步:打开浏览器输入服务器地址或本机地址127.0.0.1 

 

Apache常用目录地址

  

服务目录 /etc/httpd
配置文件 /etc/httpd/conf/httpd.conf
网站数据目录 /var/www/html
访问日志 /var/log/httpd/access_log
错误日志 /var/log/httpd/error_log

 

安装MysqL

 

 第一步:官网下载MysqL

wget http://dev.MysqL.com/get/MysqL-community-release-el7-5.noarch.rpm
rpm -ivh MysqL-community-release-el7-5.noarch.rpm
yum install MysqL-community-server

第二步:重启MysqL
service MysqLd restart

安装PHP

第一步:更改yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

第二步:安装PHP
yum -y install PHP72w PHP72w-cli PHP72w-common PHP72w-devel PHP72w-embedded PHP72w-fpm PHP72w-gd PHP72w-mbstring PHP72w-MysqLnd PHP72w-opcache PHP72w-pdo PHP72w-xml

第三步:安装PHP+MysqL 依赖

     
     
yum install PHP-MysqLi


至此就大功告成了,重启电脑

reboot 

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native