作業系統
- 於 /etc/yum.conf 中設定 yum proxy ,使安裝套件速度加快:proxy=http://proxy.server.ip:port
- 更新系統: yum update
- 安裝 apache : yum install httpd
- 安裝 php :yum -y install php php-pear php-mysql
- 安裝 php extension :yum -y install php-xml php-gd php-pdo php-mbstring
- 安裝 uploadprogress:
- yum -y install php-devel
- yum -y install gcc
- pecl channel-update pecl.php.net
- pecl install uploadprogress
- 安裝 mysql :yum -y install mysql-server
環境設定
允許使用者個人網站(編輯 /etc/httpd/conf/httpd.conf )
- 將 UserDir disabled 改成 Userdir enabled user1 user2
- 將 <Directory /home/*/public_html> 至 </Directory> 的註解取消
- 設定 AllowOverride All Options All
- 重新啟動 web 服務: service httpd restart
- 設定開機啟動 web 服務: chkconfig httpd on
安裝 Drupal 7
- 下載 drupal 7 :wget http://ftp.drupal.org/files/projects/drupal-7.22.tar.gz。
- 解壓 : tar -zxvf drupal-7.22.tar.gz。
- 搬移至網站目錄: cp -ap druapl-7.22/* /home/drupaldir/public_html。
- 變更檔案權限:
- 將 sites/default/default.settings.php 複製並更名成 settings.php ,並設成可讀寫。
- 將 sites/default 設成可讀寫。
- 自瀏覽器輸入網址以執行安裝。
- 安裝完成後切記將步驟 4 之權限設回唯讀。
安裝 drush
- pear channel-discover pear.drush.org
- pear install drush/drush
- 注意:drush 必需在 drupal 根目錄下執行!
安裝基本模組
- drush dl l10n_update
- drush dl backup_migrate
- drush dl views
- drush dl ctools
- drush dl cck
- drush dl panels
- drush dl webform
- drush dl smtp
- drush dl date
網站維護
自動備份:刪除過期備份檔:find /tmp/ -type f -name "*.log" -mtime +1 -exec rm -rf {} \;
沒有留言:
張貼留言