1.安装apache
用/etc/init.d/httpd start 启动apache
apache默认的程序目录是/var/www/html
2.安装mysql
用/etc/init.d/mysqld start 启动mysql
mysql_secure_installation 按回车提示设置mysql密码,直到显示“thanks for using mysql!”
3.安装php
4.启动设置
service httpd start
service mysqld start
配置httpd、mysqld开机自启动
chkconfig mysqld on
chkconfig httpd on
5.测试
在/var/www/html/新建test.php
访问:localhost/test.php,显示正常则lamp环境安装成功
============================================
6.为了便于从web上去管理mysql,安装phpmyadmin
配置phpmyadmin
修改/etc/phpmyadmin/config.inc.php
将phpmyadmin的安装路径连接到httpd服务目录下
修改/etc/httpd/conf.d/phpmyadmin.conf,把"deny from all" 修改为"allow from all"
在浏览器地址栏中打开http://localhost/phpmyadmin
到此,phpmyadmin配置安装成功!