Zhigang Wang
  • Home
  • Blog
  • Wiki
  • LDP
  • Planet

Drupal安装配置指南

Last modified on 2009-12-01

本人要做一个网站,在比较了众多开源内容管理系统之后,被Drupal的强大和易用深深吸引。经过一段时间的努力,终于搞清楚了Drupal的一下用法,不敢私藏,写下来跟大家共享。

安装

本站使用的虚拟空间提供商是DreamHost

本站大部分使用缺省配置,这说明Drupal已经比较成熟,能够满足一般的建站要求。一些修改如下:

  1. 对主题的修改:
    $ diff  -Nur drupal/drupal-5.0/themes/bluemarine os-drive.com/themes/bluemarine
    --- drupal/drupal-5.0/themes/bluemarine/style.css       2006-12-27 05:17:15.000000000 -0800
    +++ os-drive.com/themes/bluemarine/style.css    2007-01-22 01:34:28.000000000 -0800
    @@ -182,7 +182,7 @@
     }
     #sidebar-left, #sidebar-right {
       background-color: #ddd;
    -  width: 16em;
    +  width: 10em;
       /* padding in px not ex because IE messes up 100% width tables otherwise */
       padding: 10px;
       vertical-align: top;
    
  2. 根目录下.htaccess的修改:
    $ diff -Nur drupal/drupal-5.0/.htaccess os-drive.com/.htaccess
    --- drupal/drupal-5.0/.htaccess 2007-01-09 01:27:10.000000000 -0800
    +++ os-drive.com/.htaccess      2007-01-22 00:04:05.000000000 -0800
    @@ -2,6 +2,11 @@
     # Apache/PHP/Drupal settings:
     #
    +# enable stats
    +RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
    +RewriteCond %{REQUEST_URI} ^/failed_auth.html$
    +RewriteRule ^.*$ - [L]
    +
     # Protect files and directories from prying eyes.
     
       Order allow,deny
    
其他的事情都可以通过DreamHost的面板完成,包括创建mysql数据库,域名绑定,文件上传。

创建Cron Jobs

创建shell脚本文件~/bin/cron-lynx.sh,包含:
#!/bin/sh
/usr/bin/lynx -source http://your-domain.com/cron.php >/dev/null 2>&1
然后增加执行权限:
 $ chmod 700 ~/bin/cron-lynx.sh
创建文本文件~/bin/cron-jobs.txt,包含:
0 * * * * * ~/bin/cron-lynx.sh
然后将其增加到系统中:
 $ crontab ~/bin/cron-jobs.txt
可以使用如下命令来验证:
 $ crontab -l

本站使用的模块

  1. Tagadelic: http://drupal.org/project/tagadelic .
  2. Bbcode : http://drupal.org/project/bbcode .
  3. AdSense: http://drupal.org/project/adsense .
  4. Taxonomy context: http://drupal.org/project/taxonomy_context .

注意事项

  1. 本站有时出现无法登录的现象,可以将Cache清空,将Cookie删除,然后刷新几次,一般可以成功登录。参考Problem with login (doesn't seem to 'take')。

参考资料

  1. Drupal官方网站:http://drupal.org。
  2. Drupal China中文支持社区:http://drupalchina.org。
  3. kzeng寱语:http://www.kzeng.info。
  4. Drupal在DreamHost上的安装向导:http://wiki.dreamhost.com/index.php/Drupal。
 

Categories

  • All contents
  • English contents
  • Chinese contents

Feeds

  • AtomAll contents
  • AtomEnglish contents
  • AtomChinese contents

Tags

  • gtd
  • syslog
  • twiki
  • virtualizaion
  • wiki
  • xen

Copyright © 2012 Zhigang Wang. Some right reserved.

The views expressed on this web site are my own and do not necessarily reflect the views of Oracle.