CentOS 6.5系统使用yum方式安装LAMP环境
#安装apache
yum -y install httpd httpd-devel
#安装mysql
yum -y install mysql mysql-devel mysql-server mysql-libs
#安装php
yum -y install php
#安装php扩展
yum -y install php-mysql php-gd php-imap php-ldap php-odbc php-mbstring php-devel php-soap php-cli php-pdo
yum -y install php-mcrypt php-tidy php-xml php-xmlrpc php-pear
添加可以远程访问的mysql用户
mysql>GRANT ALL PRIVILEGES ON *.* TO '用户名'@'IP地址(全部ip用%)' IDENTIFIED BY '密码' WITH GRANT OPTION;