歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu7.10下LAMP的安裝與配置

Ubuntu7.10下LAMP的安裝與配置

日期:2017/2/28 17:12:12   编辑:Linux教程

LAMPA(Linux+Apache+Mysql+Perl/PHP/Python)是基於Linux,Apache,MySQL和PHP的開放資源網絡開發平台,被喻為PHP開發的黃金組合。

1.Ubuntu7.10下安裝LAMP組件
系統->系統管理->新立得軟件包管理器, 打開新立得,編輯 –> 使用任務分組標記軟件包 –> 勾選 LAMP Server。

2.Ubuntu7.10下安裝phpmyadmin
系統->系統管理->新立得軟件包管理器,打開新立得搜索phpmyadmin,標記安裝。
或sudo apt-get install phpmyadmin

3.啟用 mod_rewrite 模塊
sudo a2enmod rewrite

4.讓apache支持.htm .html .php
sudo gedit /etc/apache2/apache2.conf
在文件後面加上
AddType application/x-httpd-php .php .htm .html
解決firefox顯示亂碼,還是這個文件,在後面加上
AddDefaultCharset UTF-8
這裡的 UTF-8 也可根據實際情況用 gb2312代替.

5.重啟apache
sudo /etc/init.d/apache2 restart

如果出現:
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

繼續sudo gedit /etc/apache2/apache2.conf

Copyright © Linux教程網 All Rights Reserved