1. 安装apache
yum install httpd httpd-devel
service httpd start 启动
service httpd stop 停止
service httpd restart 重启
service httpd status 状态
chkconfig httpd on 将apache 设置为开机启动项
2.卸载apache
service httpd stop 停止
rpm -qa|grep httpd 列出相关程序包
rpm -e 程序包名 卸载相关程序包
3. 安装php
yum install php php-devel
service httpd restart 重启后生效
4. 安装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
安装成功后启动服务
service mysqld start 启动
service mysqld stop 停止
service mysqld restart 重启
service mysqld status 状态
安装成功后mysql没有密码
可通过
mysql -uroot
进入mysql进行修改密码
5.安装php扩展
yum
install
php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc