centos下安装lamp

1.centos安装lamp
yum install httpd

/etc/init.d/httpd start 启动apache
/etc/init.d/httpd status 查看状态
chkconfig httpd on 设置开机启动

yum install mysql-server mysql
/etc/init.d/mysqld start
chkconfig httpd on 设置开机启动

/etc/init.d/mysql restart 重新启动mysql

1.2.2 设置mysql密码
mysql>; USE mysql;
mysql>; UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql>; FLUSH PRIVILEGES;

yum install php php-mysql
yum install httpd php php-mysql mysql mysql-server

/var/www/html/
<?php phpinfo(); ?>

posted @ 2012-11-02 11:31  为了这有限的生命  阅读(169)  评论(0编辑  收藏  举报