CentOS 6.4使用yum快速搭建LAMP環境

來源:互聯網
上載者:User

標籤: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環境

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.