軟件準備:lnmp.tar、bugfree
1)把lnmp.tar傳到linux系統下,用tar -zxvf命令解壓文件。
2)進入解壓出來的文件,裏面有各版本的linux系統,選擇自己的系統版本,運行後綴名的sh文件。比如說我用的是centos,就選擇centos.sh
3)會提示輸入domain,可以默認回車,然後提示輸入mysql密碼,請牢記mysql密碼。
4)安裝大約需要半小時,出現以下提示說明安裝完畢。必須顯示Nginx,mysql,php都已經是running纔算lnmp安裝成功。
Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Nginx is runing!
php-fpm is runing!
MySQL running (16002) [確定]
=========================================================================
Nginx is runing!
php-fpm is runing!
MySQL running (16002) [確定]
LNMP相關目錄
nginx : /usr/local/nginx
mysql : /usr/local/mysql
php : /usr/local/php
網站目錄: /home/wwwroot/
Nginx日誌目錄:/home/wwwlogs/
nginx : /usr/local/nginx
mysql : /usr/local/mysql
php : /usr/local/php
網站目錄: /home/wwwroot/
Nginx日誌目錄:/home/wwwlogs/
5)把bugfree文件夾放到網站目錄: /home/wwwroot/下~
可能會出現如下錯誤:
File 'Include/Config.inc.php' cannot be found.
You can manually copy a new Include/Config.inc.php from Include/Config.inc.Sample.php.
解決方法:
解決方法:
只需複製home/wwwroot/bugfree/Include/Config.inc.sample.php爲Include/Config.inc.php
6)再次刷新,可能會出現新的錯誤提示:
No input file specified.
解決方法:
編輯Nginx的配置文件:/usr/local/nginx/conf/nginx.conf
找到下面這段信息,把server_name後面改成本機的localhost的ip,保存退出。
listen 80;
server_name localhost;
index index.html index.htm index.php;
root /home/wwwroot;
server_name localhost;
index index.html index.htm index.php;
root /home/wwwroot;
7)再刷新一次,出現數據庫連接失敗---->創建數據庫
BugFree 數據庫創建失敗:
ERROR OCCUR TO /bugfree/install.php:
The FULL SQL IS:
CREATE DATABASE bugfree2
ERROR OCCUR TO /bugfree/install.php:
The FULL SQL IS:
CREATE DATABASE bugfree2
解決辦法:編輯 /home/wwwroot/bugfree/Include/Config.inc.php,
這裏改成mysql的密碼:$_CFG['DB']['Password'] = 'mysqlpasswd',如果沒記住就糾結吧。
/* 3. Define the username and password of the BugFree database. */
$_CFG['DB']['User'] = 'root';
$_CFG['DB']['Password'] = 'mysqlpasswd';
$_CFG['DB']['Host'] = 'localhost';
$_CFG['DB']['Database'] = 'bugfree2';
$_CFG['DB']['TablePrefix'] = 'bf_';
$_CFG['DBCharset'] = 'UTF8';
$_CFG['DB']['User'] = 'root';
$_CFG['DB']['Password'] = 'mysqlpasswd';
$_CFG['DB']['Host'] = 'localhost';
$_CFG['DB']['Database'] = 'bugfree2';
$_CFG['DB']['TablePrefix'] = 'bf_';
$_CFG['DBCharset'] = 'UTF8';
8)再次刷新---進入
再次出現錯誤,有沒有崩潰,反正當初我配置的時候是快崩潰了:
解決辦法:提示是文件沒有權限訪問,我嘗試找到那個文件然後賦予777權限,但還是不行,所以最簡單的辦法就是,給bugfree這個文件給予最高權限。。。。。。
chmod -R 777 bugfree
9)再次刷新,進入bugfree登陸界面,linux下的bugfree算基本安裝完成了。
10)記住linux系統重啓之後,要把防火牆給關掉service iptables stop,否則會無法鏈接到bugfree頁面。
如果要查看Bugfree的郵件發送設置,可以找本人Blog裏面Bugfree分類尋找。