天天看點

LAMP

一、安裝apache

yum install httpd 

/etc/init.d/httpd start 

二、安裝mysql

1、安裝mysql

yum install mysql mysql-server 

/etc/init.d/mysqld start 

chkconfig mysqld on 

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf 

mysql_secure_installation

/etc/init.d/mysqld restart

三、安裝php5

yum install php

yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt

/etc/init.d/mysqld restart 

/etc/init.d/httpd restart

vi /etc/httpd/conf/httpd.conf 

cd /var/www/html

vi index.php

<?php

phpinfo();

?>

:wq! 

繼續閱讀