2015年5月18日 星期一

[研究] phpBB 3.0.14 完整包-論壇快速安裝程式 (CentOS 6.6 x86_x64)

[研究] phpBB 3.0.14 完整包-論壇快速安裝程式 (CentOS 6.6  x86_x64)

2015-05-18

phpbb 官方網站
https://www.phpbb.com/

直接下載 (英文版)
https://www.phpbb.com/files/release/phpBB-3.0.14.zip
https://www.phpbb.com/files/release/phpBB-3.0.14.tar.bz2

繁體中文支援網站 - 竹貓星球
http://phpbb-tw.net/phpbb/

正體中文語言包
https://www.phpbb.com/customise/db/translation/mandarin_chinese_traditional_script/

直接下載 mandarin_chinese_traditional_script_1_0_5.zip
https://www.phpbb.com/customise/db/download/id_91411

[教學] phpBB 3 中文化語言檔與中文化按鈕安裝方法
http://phpbb-tw.net/phpbb/viewtopic.php?f=116&t=49968

[2015-05-06] phpBB 3.0.14 完整包
http://phpbb-tw.net/phpbb/viewtopic.php?t=57186
直接下載 (竹貓星球 提供,包含英文版和繁體中文介面,本篇用測試用這個安裝)
http://1.34.15.69/temp/phpBB-3.0.14.zip

資料庫名稱:phpbbDB
資料庫帳號:phpbbUser
資料庫密碼:phpbbPassword
可以依據自己喜好變更 (記得要修改快速安裝程式內容) 

快速安裝程式 phpbb3.0.14_centos6.6x64_install.sh 如下

* 你可以用 putty.exe 連上 CentOS,用 vi  phpbb3.0.14_centos6.4x64_install.sh 後把內容貼上,執行  chmod  +x  *.sh 變成可執行,再執行  ./phpbb3.0.14_centos6.4x64_install.sh

* 或在 MS-Windows 上寫好,用 WinSCP.exe 丟到 CentOS,執行 yum  -y  install  dos2unix,再執行  dos2unix   phpbb3.0.14_centos6.4x64_install.sh 轉成 Unix-Like 格式,再執行  ./phpbb3.0.14_centos6.6x64_install.sh

# phpbb3.0.14_centos6.6x64_install.sh
echo -e "\033[31;42m ********** Install phpbb 3.0.14 on CentOS 6.6 x64 ********** \033[0m"
echo -e "\033[31m 2016/05/18 ********** \033[0m"

service iptables start
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited
iptables -A FORWARD -j REJECT --reject-with icmp-host-prohibited

# save iptables firewall rules to /etc/sysconfig/iptables
# iptables-save  or service iptables save
service iptables save

# check rules after iptables restart
service iptables restart
# show all rules
# service iptables status or iptables -L
service iptables status

if [ "`cat /proc/version | grep centos | grep el6`" != "" ]; then
  OS="CentOS 6.x"
  echo "Detection your OS is CentOS 6.x"
else
  echo "[ERROR] Only Support CentOS 6.x"
  exit
fi


# Check SELinux status
if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then


# disable SELinux now
/usr/sbin/setenforce 0


# disable SELinux after every reboot
# echo "/usr/sbin/setenforce 0" >> /etc/rc.local  


#or
# disable SELinux always
sed -i -e "s@SELINUX=enforcing@#SELINUX=enforcing@"   /etc/selinux/config
sed -i -e "s@SELINUX=permissive@#SELINUX=permissive@"   /etc/selinux/config
sed -i -e "/SELINUX=/aSELINUX=disabled"   /etc/selinux/config
fi


# Kill nptd on running...
ProcessID="`ps aux | grep ntpd | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done
ntpdate tick.stdtime.gov.tw


# Kill yum on running...
ProcessID="`ps aux | grep yum | awk '{print $2}' `"
for i in $ProcessID
do
  echo $i
  kill -9 $i
done


if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then
/usr/sbin/setenforce 0
echo "/usr/sbin/setenforce 0" >> /etc/rc.local  
fi

yum -y install mysql mysql-server httpd php php-mysql php-mbstring php-gd

chkconfig httpd on
chkconfig mysqld on
service httpd restart
service mysqld restart

wget   http://1.34.15.69/temp/phpBB-3.0.14.zip
unzip phpBB-3.0.14.zip -d /var/www/html
mv   /var/www/html/phpBB-3.0.14/phpBB3    /var/www/html/phpbb

mysql -e "create database phpbbDB"
mysql -e "show databases; "


mysql -e "grant all on phpbbDB.* to phpbbUser@localhost; "
mysql -e "set password for phpbbUser@localhost=password('phpbbPassword'); "
mysql -e "flush privileges; "
mysql -e "use mysql;  select Host,User,Password from user; "

chmod a+w  /var/www/html/phpbb/config.php
chmod -R a+w  /var/www/html/phpbb/cache
chmod -R a+w  /var/www/html/phpbb/files
chmod -R a+w  /var/www/html/phpbb/store
chmod -R a+w  /var/www/html/phpbb/images/avatars/upload

# 上面做好後,手動啟動瀏覽器,輸入 http://localhost/phpbb
# firefox http://localhost/phpbb &

# echo "When you finish Web-based Installation, press any key to continue ..."
# read


接下來進行 Web 介面安裝設定

(下圖) 切換成 "正體中文",按下 Change 按鈕





















(下圖) 照網頁說面刪除 install 目錄,拿掉 config.php 寫入權限
rm   -fr   /var/www/html/phpbb/install
chmod   a-w   /var/www/html/phpbb/config.php

(下圖) 按下 F5 更新網頁畫面,警告訊息該消失了




安裝成功了

(完)

相關文章

[研究] phpBB 3.1.4 完整包-論壇快速安裝程式 (CentOS 7.1  x86_x64)
http://shaurong.blogspot.com/2015/05/phpbb-314-centos-71-x86x64.html

[研究] phpBB 3.0.14 完整包-論壇快速安裝程式 (CentOS 6.6  x86_x64)
http://shaurong.blogspot.com/2015/05/phpbb-34-centos-66-x86x64.html

[研究] phpBB 3.0.12 論壇套件快速安裝程式 (CentOS 6.4 x64)
http://shaurong.blogspot.com/2013/10/phpbb-3012-centos-64-x64.html

[研究] phpbb 3.0.10 快速安裝程式 (CentOS 6.2 x86)
http://shaurong.blogspot.tw/2012/01/phpbb-3.html

[研究] phpbb 3.0.10 安裝RSS模組(simple syndication 1.1.1b)
http://shaurong.blogspot.tw/2012/01/phpbb-3010-rsssimple-syndication-111b.html
simple syndication 1.1.1b 最後一次改版為 2007-06-20
http://sourceforge.net/projects/canver/files/phpBB3%20MODs/

[研究] phpbb 3.0.10 安裝TOP5模組(Integrated Topiclist 2.0 beta)
http://shaurong.blogspot.tw/2012/01/top5integrated-topiclist-2.html

沒有留言:

張貼留言