首先下載XAMPP:
XAMPP Linux 1.6.8a:
http://jaist.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.6.8a.tar.gz
相關Linux下安裝和配置XAMPP請參考官網:
http://www.apachefriends.org/zh_cn/xampp-linux.html
安裝之前首先確認你伺服器的80連接埠有沒被佔用
netstat -an|grep -w 80
如果被佔用了請先關閉相關服務,XAMPP啟動要用到80連接埠.
安裝XAMPP:
[root@localhost ~]#tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt
然後啟動(命令參數見XAMPP官網):
opt/lampp/lampp start
您應該能在螢幕上看到類似下面的提示資訊:
Starting XAMPP 1.6.8a...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.
好了。Apache 和 MySQL 正在運行中
只需在您的瀏覽器中輸入下面的連結即可:http://localhost
看到一些樣本程式的 XAMPP 開始頁面就表示XAMPP安裝成功了。接下來我們要配置XAMPP的安全性。
配置XAMPP安全性:
[root@localhost ~]# /opt/lampp/lampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] XAMPP: Do you want to set a password? [yes] yes
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Password protection active. Please use 'lampp' as user name!
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL...
XAMPP: Starting MySQL...
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password is still set to 'lampp'.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD...
XAMPP: Done.
並設定 XAMPP 隨系統自動啟動
[root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc3.d/S99lampp
[root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc4.d/S99lampp
[root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc5.d/S99lampp
自此,XAMPP已經配置好了!下面我們來配置BugFree:
下載BugFree2:
[root@localhost ~]# wget -chttp://www.bugfree.org.cn/download/bugfree2.tar.gz
解壓到Xampp下的htdocs文檔下:
[root@localhost ~]#tar xvfz bugfree2.tar.gz -C /opt/lampp/htdocs/
然後複製Include/Config.inc.Sample.php為Include/Config.inc.php,編輯並修改資料庫連結地址:
(複製命令CP和修改命令VI,這裡就不多介紹了)
/* 3. Define the username and password of the BugFree database. */
$_CFG['DB']['User'] = 'root'; // 資料庫登入使用者名稱
$_CFG['DB']['Password'] = 'password'; // 資料庫登入使用者密碼
$_CFG['DB']['Host'] = 'localhost'; // 資料庫伺服器地址
$_CFG['DB']['Database'] = 'bugfree'; // 指定BugFree資料庫名稱
$_CFG['DB']['TablePrefix'] = 'bf_'; // 資料庫表首碼,預設為bf_。除非有衝突,不建議修改或為空白
$_CFG['DBCharset'] = 'UTF8'; // 資料庫編碼設定,保留預設值
然後設定檔案目錄許可權:
[root@localhost ~]# cd /opt/lampp/htdocs/bugfree
[root@localhost bugfree]# chmod 777 Data/TplCompile/
[root@localhost bugfree]# chmod 777 BugFile/
[root@localhost bugfree]# chmod 777 Include/Config.inc.php
全部配置好就可以訪問BugFree了:
http://localhost/bugfree/設定新的資料庫
phpsql線上:
http://localhost/phpmyadmin/
可用PHPSQL操作Mysql資料或linux終端登入mysql
[root@ASP-WEB root]# /opt/lampp/bin/mysql -u root -p
至此,全部安裝完成!XAMPP平台真的是個好東西,省去了很多在Linux安裝的麻煩!