2012年1月4日 星期三

[研究] phpbb 3.0.10 快速安裝程式 (CentOS 6.2 x86)

[研究] phpbb 3.0.10 快速安裝程式 (CentOS 6.2 x86)


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


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


官網下載位置(英文完整套件):
http://www.phpbb.com/files/release/phpBB-3.0.10.tar.gz


資料庫名稱:phpbbDB
資料庫帳號:phpbbUser
資料庫密碼:phpbbPassword
可以依據自己喜好變更




# phpbb3.0.10_centos6.2x86_install
echo -e "\033[31;42m ********** Install phpbb 3.0.10 on CentOS 6.2 x86 ********** \033[0m"
echo -e "\033[31m 2012/01/04 ********** \033[0m"


service iptables stop
#service iptables start
#iptables  -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#iptables  -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
# Fedora
#iptables  -A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
#iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
#iptables -I RH-Firewall-1-INPUT -s 192.168.128.0/24 -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
#iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 5666 -j ACCEPT
# CentOS 5.4 x86
#iptables -I RH-Firewall-1-INPUT -s 192.168.128.0/24 -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
# Fedora 12 x86
#iptables -I INPUT -s 192.168.128.0/24 -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
#service iptables save
#service iptables restart


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 wget php-mbstring php-gd


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


if test -f phpBB-3.0.10.tar.bz2
then
    echo "phpbb 3.0.10.tar.bz2 exist"
else
    wget http://www.phpbb.com/files/release/phpBB-3.0.10.tar.bz2
fi


if test -f  "mandarin_chinese_traditional_script_1_0_3.zip"
then
    echo "mandarin_chinese_traditional_script_1_0_3.zip exist"
else
  wget http://www.phpbb.com/customise/db/download/id_82358
  mv id_82358 "mandarin_chinese_traditional_script_1_0_3.zip"
fi


tar jxvf phpBB-3.0.10.tar.bz2 -C /var/www/html/
mv /var/www/html/phpBB3  /var/www/html/phpbb


unzip "mandarin_chinese_traditional_script_1_0_3.zip"
cp -R "mandarin_chinese_(traditional_script)_1_0_3/mandarin_chinese_(traditional_script)_1_0_3/."  /var/www/html/phpbb


#[root@localhost ~]# find /var/www/html/phpbb -name zh_cmn_hant
#/var/www/html/phpbb/language/zh_cmn_hant
#/var/www/html/phpbb/styles/prosilver/imageset/zh_cmn_hant
#/var/www/html/phpbb/styles/subsilver2/imageset/zh_cmn_hant


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


firefox http://localhost/phpbb &


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


接下來要進行 Web 介面安裝










































繼續安裝,把config.php設定成唯讀,把 install 目錄改名或刪除
(可能再換上自己的 Logo)




chmod a+r-w  /var/www/html/phpbb/config.php
mv  /var/www/html/phpbb/install  /var/www/html/phpbb/install.backup


# Change you logo
#cp site_logo.gif  /var/www/html/phpbb/styles/prosilver/imageset/site_logo.gif
#cp site_logo.gif  /var/www/html/phpbb/styles/subsilver2/imageset/site_logo.gif






參考


[研究] phpbb 3.0.9 快速安裝程式 (CentOS 5.6 x86)
http://shaurong.blogspot.com/2011/07/phpbb-3.html


[研究] phpbb 3.0.8 快速安裝程式 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19286


(完)


相關文章:



[研究] phpbb 3.0.10 安裝RSS模組(simple syndication 1.1.1b)
http://shaurong.blogspot.com/2012/01/phpbb-3010-rsssimple-syndication-111b.html


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

沒有留言:

張貼留言