lamp安装
1、安装apache
[root@localhost Desktop]# yum install -y httpd
2、安装php
[root@localhost Desktop]# yum -y install php php-devel php-snmp php-gd php-mysql
3、安装mysql
[root@localhost Desktop]# yum install -y mysql mysql-server mysql-devel
4、开机启动
[root@localhost Desktop]# chkconfig httpd on
[root@localhost Desktop]# chkconfig mysqld on
[root@localhost Desktop]# service httpd start
[root@localhost Desktop]# service mysqld start
5、新建php验证页面
[root@localhost Desktop]# vi /var/www/html/index.php
<?php phpinfo(); ?>
6、设置mysql数据库root用户密码
[root@localhost Desktop]# mysqladmin -u root password '123456'