linux下bugfree的安裝

來源:互聯網
上載者:User

配置環境:

OS:linux FC7

xampp版本:xampp-linux-1.7.7.tar.gz

bugfree版本:v2.1.3

1.準備工作:

安裝之前確認伺服器的80連接埠是否被佔用,因為xampp啟動需要用到80連接埠,如果被佔用請先關閉服務。

netstat -an|grep -w 80

2.共用xampp和bugfree

win和linux進行檔案互動的方法很多,我這裡用的是檔案分享權限設定,把win下xampp和bugfree所在的檔案夾共用;在VMware中開啟linux,setting->options->Shared Folders中添加共用的檔案夾,添加成功後,在linux系統mnt/hgfs檔案夾下可以查看到共用的檔案內容。

3.安裝xampp

解壓xampp-linux-1.7.7.tar.gz到opt檔案夾下:

[root@localhost /]#tar xfz mnt/hgfs/xampp-linux/xampp-linux-1.7.7.tar.gz -C /opt

使用下面的命令開始運行xampp:

[root@localhost /]#opt/lampp/lampp/start

螢幕上看到類似下面的提示資訊:
Starting XAMPP 1.7.7...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.

說明Apache 和 MySQL 正在運行中。

查看是否可以正常運行:

[root@localhost /]# curl  http://localhost/

進階的啟動與停止參數:

參數 描述
start          啟動 XAMPP。
stop 停止 XAMPP。
restart 重新啟動 XAMPP。
startapache 只啟動 Apache。
startssl 啟動 Apache 的 SSL 支援。該命令將持續啟用 SSL 支援,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,SSL 仍將處於啟用狀態。
startmysql 只啟動 MySQL 資料庫。
startftp 啟動 ProFTPD 伺服器。通過 FTP,您可以上傳檔案到您的網路伺服器中(使用者名稱“nobody”,密碼“lampp”)。該命令將持續啟用 ProFTPD,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,FTP 仍將處於啟用狀態。
stopapache 停止 Apache。
stopssl 停止 Apache 的 SSL 支援。該命令將持續停止 SSL 支援,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,SSL 仍將處於停止狀態。
stopmysql 停止 MySQL 資料庫。
stopftp 停止 ProFTPD 伺服器。該命令將持續停止 ProFTPD,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,FTP 仍將處於停止狀態。
security 啟動一個小型安全檢查程式。

 例如:想啟用帶 SSL 支援的 Apache,只需輸入如下命令(以 root 身份):

[root@localhost /]#opt/lampp/lampp startssl
重要的檔案和目錄

檔案/目錄 用途
/opt/lampp/bin/ XAMPP 命令庫。例如 /opt/lampp/bin/mysql 可執行 MySQL 監視器。
/opt/lampp/htdocs/ Apache 主目錄。
/opt/lampp/etc/httpd.conf Apache 配製檔案。
/opt/lampp/etc/my.cnf MySQL 配製檔案。
/opt/lampp/etc/php.ini PHP 配製檔案。
/opt/lampp/etc/proftpd.conf ProFTPD 配製檔案。(從 0.9.5 版開始)
/opt/lampp/phpmyadmin/config.inc.php phpMyAdmin 配製檔案。

4.配置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就設定好了。

5.安裝bugfree

首先把bugfree壓縮包解壓到opt/lampp/htdocs下:

[root@localhost /]# unzip mnt/hgfs/xampp-linux/bugfree2.1.3.zip -d opt/lampp/htdocs

然後複製Include/Config.inc.Sample.php為Include/Config.inc.php,編輯並修改資料庫連結地址:

[root@localhost Include]# cp Include/Config.inc.Sample.php Include/Config.inc.php

修改Config.inc.php檔案:

[root@localhost Include]# vi Config.inc.php

/* 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';          // 資料庫編碼設定,保留預設值

note:按i鍵進行檔案修改,esc鍵回到一般模式下,輸入:wq即可儲存檔案並離開,輸入:q!不儲存修改的檔案並離開。

然後設定檔案目錄許可權:
[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已經配置好了,通過win下訪問bugfree設定新的資料庫。

http://ip/bugfree

登入bugfree,頁面出現:

在網上查看解決方案:修改opt/lampp/etc/php.ini檔案

 

allow_call_time_pass_reference = Off一行,將Off修改為On

重啟伺服器,問題解決。

相關文章

聯繫我們

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