在 HostMonster 安装 Project Babel v0.6 安装过程,问题,解决方法,安装后台管理。

Overview

Project Babel is a software package to create and support communities.

Features

  • Running on all platforms that supports PHP/MySQL
  • Simplistic look-n-feel
  • Unicode storage
  • High performance via multiple cache back-ends: Memcached, File, HEAP
  • AJAX
  • Provide blog hosting to members
  • Comprehensive system status report
  • Easy to understand and expand via PHP5 OOP style source code
  • Use of mod_rewrite makes URLs search engine friendly and usable
  • Mash-ups with Flickr, Google, Last.fm, Skype, Technorati

以下说明来自:
http://raynix.cn/archives/243
http://labs.v2ex.com/installation.php

下载:http://code.google.com/p/project-babel/

STEP 1:

下载压缩包或者从 Subversion repository 中获得安装文件之后,将整个目录(名字叫 babel 的顶级目录)上传到服务器,并且记下这个文件夹在服务器上所位于的绝对路径。比如在 Linux 上这个路径可能是 /www/babel 而在 Windows 上这个路径可能是 C:/www/babel 。

STEP 2:

将 htdocs/core/ 目录下的 Settings.example.php 更名为 Settings.php,然后把之前记下的那个目录位置写到 BABEL_PREFIX 这个配置选项中。假设这个位置是 /www/babel,那么完成之后的代码应该是这样的:

define(’BABEL_PREFIX’, ‘/www/babel’);

STEP 3:

使用 phpMyAdmin 或者 MySQL 命令行客户端将 sql/babel.mysql.sql 文件导入数据库中,然后将 MySQL 数据库的登陆信息写到 Settings.php 中:

define(’BABEL_DB_HOSTNAME’, ‘127.0.0.1′); define(’BABEL_DB_PORT’, 3306); define(’BABEL_DB_USERNAME’, ‘user’); define(’BABEL_DB_PASSWORD’, ‘password’); define(’BABEL_DB_SCHEMATA’, ‘database’);

将域名的相关信息写到 Settings.php 中的三个配置选项中:

define(’BABEL_DNS_NAME’, ‘www.v2ex.com’); // 你希望出现在浏览器地址栏的标准化域名 define(’BABEL_DNS_DOMAIN’, ‘v2ex.com’); // 域名的顶级部分,不包括 www 之类的 hostname define(’BABEL_DNS_FEED’, ‘feed.v2ex.com’); // RSS 输出专用服务器的地址 define(’BABEL_FEED_URL’, ‘http://www.v2ex.com/feed/v2ex.rss’); // Primary RSS 地址

这个步骤非常重要,如果配置不正确,将会导致无法登录。

你可以将 BABEL_FEED_URL 配置为一个 FeedBurner 的地址。

STEP 4:

确认 Apache Web Server 已经加载了 mod_rewrite 模块,Project Babel 的 DocumentRoot 位于 htdocs 目录中,如果你是在 DreamHost 上安装,请在添加 Domain 时指定 DocumentRoot 到 Project Babel 文件夹中的 htdocs 目录,如果你是在 Media Temple 上安装,那么请将 htdocs 目录符号链接到 httpdocs 及 httpsdocs(如果你计划使用 https 方式的话),然后将 apache/htaccess/.htaccess 文件复制到 htdocs 中。

在 HostMonster 上,在 Cpanel 控制面板中建立 Subdomain 指向 Project Babel 文件夹中的 htdocs 目录

STEP 5:

编辑 htdocs/core/InstallCore.php 配置初始的分区(Section)及讨论区(Discussion Board)设置。然后从浏览器中访问此文件一次。

InstallCore.php 文件的概念类似于一个批处理文件,不过重复运行不会对系统造成破坏。建议在运行完毕之后,在本地备份这个文件,然后从服务器上删除此文件,否则就是一个可能的性能漏洞。

STEP 6:

如果之前各步骤进行正确的话,那么这个时候你可以从浏览器中打开域名尝试第一次访问。这是可能会继续提示一些问题的存在,比如数据库未正确配置或者目录权限问题之类,根据屏幕上的提示逐一修正这些问题。

STEP 7:

如果不再提示任何错误,那么至此安装基本完成。你可以在这个新网站上注册第一个用户,而这个用户就将成为这个社区里拥有最高权限的管理员。

Settings.php 中还有很多好玩的配置选项,欢迎你打开这个文件仔细研究各种功能。

安装中遇到的问题

Warning: require_once(Cache/Lite.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/babel/htdocs/core/V2EXCore.php on line 42

原因及解决方法

Project Babel v0.6 目录下 libs/pear 为空,下载 Project Babel v0.5,将相同目录下的所有文件拷入即可。

Upgrading

在不同版本之间升级主要需要完成的事情是两件:

STEP 1:

备份旧版本的 Settings.php 及所有用户的头像文件。如果你是从 v0.5-pre 版本升级的话,那么上传所有的文件之后,打开新的 Settings.example.php,将旧的 Settings.php 中的定制过的配置写入,然后将这个新的 Settings.php 上传。如果你对 Vocabularies.php 进行过定制,那么也请对比新旧版本之后,在新的 Vocabularies.php 中恢复那些你定制过的部分。

STEP 2:

使用 EMS SQL Studio for MySQL 生成新旧两个版本的数据库的升级脚本。然后在旧数据库上执行之后升级到最新的数据库结构。请注意备份你的数据。

Project Babel 从 2006 年第一次开放源代码发布至今,每一个版本都有使用者,而各个版本之间的区别明显,因此在升级时所需要付出的努力也不同。欢迎你到 V2EX 的 Project Babel 讨论区和大家一起研究你所遇到的问题。

如果你对你已经安装的那个版本完全满意,你或许也就不用升级到最新版本。因为,我觉得,社区中的那些文字的精彩程度和背后的技术含量,与所用的系统恐怕是关系不大的。

POST INSTALL 1:SMTP setup,htdocs/core/AirmailCore.php,line80

$this->params = array();
#        $this->params["sendmail_path"] = ‘/usr/sbin/sendmail’;
$this->params["host"]=’mail.bjqnc.com’;
$this->params["auth"]= TRUE;
$this->params["username"]=’agent’;
$this->params["password"]=’tnega03′;
$this->params["localhost"]=’beta.bjqnc.com’;
$this->params["debug"]= FALSE;
}

public function __destruct() {
}

public function vxSend() {
$m =& Mail::factory(’smtp’, $this->params);
$m->send($this->headers['to'], $this->headers, $this->body);
}

POST INSTALL 2:添加成分和故事,htdocs/core/FunCore.php,编辑,以utf8保存即可

POST INSTALL 3:将信仰改为中文,res/religions.xml,以utf8保存

<religion>
<name>Buddhism</name>
<name_cn>佛教</name_cn>
</religion>

htdocs/core/Utilities.php,line 120

foreach ($xml->religion as $religion) {
$_religions[] = $religion->name_cn;
}

Project Babel 后台登陆
1. 如何进入babel的后台?

需要安装一个插件
Project BabelMan Home:
http://code.google.com/p/babelman/

SVN:

svn checkout http://babelman.googlecode.com/svn/trunk/ babelman

安装:

将babel_manage.php上传到与babel.php相同的目录中
将ZIP包内的.httaccess文件中的rewrite rule追加到默认的.httaccess中
用http://yoursite/manage.vx进入管理页面

500×314

在这里可以设置板块,增加相关站点和频道


BTW:
若是后期在优化,在记笔记吧。

Tags: ,.
首页

No Comments Now!

Be the first to comment on this entry.

发表评论

名称(必填)
Mail (必填),(will not be published)
网址(recommended)

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs must be fully qualified (eg: http://www.xiangee.cn),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.