最方便的LAMP环境部署,前提是你的Linux能上网,且有yum环境(默认都有)

环境:CentOS 5.5 x86_64

步骤:

#yum -y install httpd httpd-devel mysql mysql-server mysql-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml    [用yum安装]

#service mysqld start    [开启mysql服务]

#service httpd start     [开启apache服务]

#chkconfig mysqld on     [开机自动启动mysql]
#chkconfig httpd on      [开机自动启动apache]

 

测试php

vim /var/www/html/test.php

 
  1. <?php 
  2.  
  3. phpinfo(); 
  4.  
  5. ?>