2014年1月26日 星期日

[研究] drupal 7.26 安裝 (CentOS 6.5 x64)

[研究] drupal 7.26 安裝 (CentOS 6.5 x64)

2014-01-26

英文官方網站
http://drupal.org/

Drupal Taiwan 正體中文支援站
http://drupaltaiwan.org/

安裝參考
https://drupal.org/documentation/install

安裝

# durpal7.26_install_CentOS6.5x64.sh
# ref : http://drupal.org/documentation
# need PHP >= 5.2.4 , CentOS 5.5 yum php is only 5.1.x

if  [ "`grep SELINUX=disabled /etc/selinux/config`" == "" ]; then
# 立刻關閉 SELinux
/usr/sbin/setenforce 0

# 設定 reboot 後會自動啟動,修改 /etc/selinux/config 中設定
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

yum -y install mysql mysql-server httpd php php-mysql wget php-mbstring php-domxml-php4-php5 php-gd
chkconfig httpd on
chkconfig mysqld on
service httpd start
service mysqld start


wget http://ftp.drupal.org/files/projects/drupal-7.26.tar.gz

tar -zxvf drupal-7.26.tar.gz -C /var/www/html
mv /var/www/html/drupal-7.26  /var/www/html/drupal

#7.26 尚未有繁體中文介面
#wget http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.26.zh-hant.po
wget http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.23.zh-hant.po
cp drupal-7.23.zh-hant.po /var/www/html/drupal/profiles/standard/translations/.

cp /var/www/html/drupal/sites/default/default.settings.php /var/www/html/drupal/sites/default/settings.php
chmod a+w /var/www/html/drupal/sites/default/settings.php
chmod a+w /var/www/html/drupal/sites/default

mkdir -p /var/www/html/drupal/sites/default/files
chmod a+w /var/www/html/drupal/sites/default/files

mysql -e "create database drupaldb"
mysql -e "show databases; "
#mysql -e "use drupaldb; show tables;"

mysql -e "grant all privileges on drupaldb.* to drupaluser@localhost  identified by 'drupalpassword'; "
mysql -e "flush privileges; "
mysql -e "use mysql;  select Host,User,Password from user; "

firefox http://localhost/drupal &




(上圖) 缺的 PHP extensions 的 dom

[root@localhost ~]# yum -y install php-xml
[root@localhost ~]# service httpd restart

網頁按下 F5 更新畫面







關閉設定檔寫入權限

chmod a-w /var/www/html/drupal/sites/default/settings.php
chmod a-w /var/www/html/drupal/sites/default

(完)

[研究] drupal 7.26 安裝 (CentOS 6.5 x64)
[研究] drupal 7.0 快速安裝程式 (Fedora 14 x86)

[研究] drupal 6.19 快速安裝程式 (CentOS 5.5 x86)


沒有留言:

張貼留言