CentOS 6.6編譯安裝LAMP(Apache2+PHP+Mysql+PHPmyAdmin)

來源:互聯網
上載者:User

標籤:article   mil   防火牆   系統啟動   cookies   lin   rc.d   input   eve   

搭建好開發環境:Linux: CentOS 6.6(Final) x64
Apache:2.2.15
MySQL:5.1.52
PHP:5.3.2

步驟說明:1.MySQL

# yum install mysql mysql-server


# chkconfig --levels 235 mysqld on # MySQL 可以隨系統自己主動啟動


# /etc/init.d/mysqld start


# mysql_secure_installation # 設定 MySQL 資料 root 賬戶的password


# mysql -u root -p # 以root使用者啟動mysql資料庫



2.Apache


# yum install httpd


# chkconfig --levels 235 httpd on # Apache 隨系統啟動


# /etc/init.d/httpd start


# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT # centos的防火牆開放80連接埠


# /etc/rc.d/init.d/iptables save # 儲存


# /etc/init.d/iptables status # 確認檢查



3.PHP


# yum install php


# /etc/init.d/httpd restart


# yum search php # 搜尋模組


# yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc # 安裝相關模組


# /etc/init.d/httpd restart # 重新啟動 Apache



4.PHP-myAdmin


# cd /var/www/html


# wget http://nchc.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.10/phpMyAdmin-3.3.10-all-languages.tar.gz


# tar xvfz phpMyAdmin-3.3.10-all-languages.tar.gz # 解壓


# mv phpMyAdmin-3.3.10-all-languages phpmyadmin


# cd phpmyadmin


# cp config.sample.inc.php config.inc.php


# vim config.inc.php
      :
 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘http‘; # default is cookies

      :


# service httpd restart



5.配置監聽port


# cd /etc/httpd/conf


# vim httpd.conf


  Listen 5000






CentOS 6.6編譯安裝LAMP(Apache2+PHP+Mysql+PHPmyAdmin)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.