標籤:lamp
CentOS 6.4使用yum快速搭建LAMP環境
安裝apache
[[email protected] ~]# yum -y install httpd
開機啟動
[[email protected] ~]# chkconfig httpd on
開啟服務
[[email protected] ~]# service httpd start
安裝一些擴充
[[email protected] ~]# yum install -y httpd-manual mod_ssl mod_perl mod_auth_mysql
查看下連接埠是否啟動
[[email protected] ~]# netstat -lnpt
在瀏覽器訪問
http://ip地址
安裝mysql資料庫
用戶端服務端開發庫
[[email protected] ~]# yum install mysql mysql-server mysql-devel -y
開機啟動
[[email protected] ~]# chkconfig mysqld on
開啟mysql服務
[[email protected] ~]# service mysqld start
看mysql運行連接埠
[[email protected] ~]# netstat -nlpt |grep mysql
安裝php
為了讓PHP支援MySQL,我們可以安裝php-mysql軟體包;也可使用以下命令搜尋可用的php模組
[[email protected] ~]# yum install php php-mysql -y
安裝php常用擴充
[[email protected] ~]# yum search php
[[email protected] ~]# yum -y install gd php-gd gd-devel php-xml php-common php-mbstring php-ldap php-pear php-xmlrpc php-imap
重啟httpd
[[email protected] ~]# service httpd restart
寫測試頁面
[[email protected] ~]# cd /var/www/html/
[[email protected] html]# vim index.php
<?php
phpinfo();
?>
瀏覽器 http://本機IP測試
安裝配置phpMyAdmin
官網下載最新版本:http://www.phpmyadmin.net/home_page/
本文出自 “技術革命生活” 部落格,請務必保留此出處http://6769120.blog.51cto.com/6759120/1562183
CentOS 6.4使用yum快速搭建LAMP環境