1.安装mysql
yum install mysql-server –y
2.安装apache
yum install httpd –y
3.安装php模块
yum install php-mysql php-gd php-imap php-odbc php-pear php-xml php-xmlrpc php-mcrypt php-mbstring –y
4.配置apache
vi /etc/httpd/conf/httpd.conf
directoryindex index.php index.html index.html.var
5.配置php
vi /etc/php.ini
memory_limit=128m
post_max_size=8m
upload_max_filesize=2m
6.mysql、apache2自动启动
chkconfig mysqld on
chkconfig httpd on
7.启动mysql、apache2
service mysqld start
service httpd start
8.停止mysql、apache2
service mysqld stop
service httpd stop
mysql修改密码
mysqladmin -uroot password root