http://os.51cto.com/art/201103/248678.htm
使用YUM安装LAMP。LAMP的意思是Linux-Apache-MySQL-PHP,LAMP网站架构是目前国际流行的Web框架,他具有Web资源丰富、轻量、快速开发等特点。如何使用YUM安装LAMP呢?
AD:
使用YUM安装LAMP:
apache
yum install httpd httpd-devel etc/init.d/httpd start 或者 service httpd start
mysql
yum install mysql mysql-server mysql-devel /etc/init.d/mysqld start 或者 service mysqld start
设置密码
mysql> USE mysql; mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root'; mysql> FLUSH PRIVILEGES; mysql> exit;
登陆
mysql -u root -p Enter Password:
创建一个用户管理数据库
mysql > create database demo mysql >GRANT ALL PRIVILEGES ON demo.* TO 'guest'@'localhost' IDENTIFIED BY 'guest'; mysql> UPDATE user SET Password=PASSWORD('guest') WHERE user='guest';
安装php
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml etc/init.d/httpd restart 或者 service httpd restart
设置开机启动
chkconfig httpd on chkconfig mysqld on
转载于:https://blog.51cto.com/57388/1545093