四、dolphin的安装
1、下载并解压到/usr/local/src中,
用以下命令进行解压
unzip Dolphin-v.X.X.zip
或者
unzip -d Dolphin_directory Dolphin-v.X.X.zip
2、为dolphin创建数据库和用户
在这里有三种方法能为dolphin创建数据库和用户,分别为cpanel、phpadmin和mysql客户端,因为默认情况下我的机器上已经装了mysql客户端,所以我用的是第三种方法
$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON databasename.* TO "dolphinusername"@"hostname" IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> EXIT
Bye

其中“adminusername”用root登陆,“databasename”和“dolphinusername”都可以是dolphin这个容易记得名称,"hostname"通常情况下是localhost

3、在这一步我们得确定把dolphin的安装脚本装到哪个地方了,

1)可以安装到网站根目录(如:www.mysite.com)

2)也可以安装到网站的子目录下(如:www.mysite.com/mycommunity)

你可以进入到http.conf文件中,查看网站的根目录是哪个。我的网站根目录是/usr/local/apache2/htdocs,于是我把解压出来的dolphin文件中所有的内容都移动到htdocs

mv命令移动文档:mv /usr/local/src/Dolphin-v.x.x/* /usr/local/apache2/htdocs

4、然后开始安装dolphin脚本程序

web浏览器上输入:http://www.codepartners.com.cn/install/index.php

单击“安装”,这时需要我们为一些文档添加权限了

5、在安装过程中的第一页,有一些文件和文件夹需要读写执行的权限,那么就需要我们为这些文件添加权限了

(1)现在我们用shell账号登陆到shell客户端,在网站根目录下也就是htdocs,为dolphin脚本添加权限

chmod 777 ./inc ./backup ./cache ./cache_public ./langs  ./media/app ./media/p_w_picpaths ./media/p_w_picpaths/banners ./media/p_w_picpaths/blog ./media/p_w_picpaths/classifieds ./media/p_w_picpaths/membership ./media/p_w_picpaths/profile ./media/p_w_picpaths/profile_bg ./media/p_w_picpaths/promo ./media/p_w_picpaths/promo/original ./tmp ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/HTML ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/Test ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/URI

chmod 777 ./flash/modules/board/files ./flash/modules/chat/files ./flash/modules/photo/files ./flash/modules/im/files ./flash/modules/mp3/files ./flash/modules/video/files ./flash/modules/video_comments/files

chmod 666 inc/prof.inc.php
chmod 666 ./flash/modules/global/data/integration.dat ./flash/modules/board/xml/config.xml ./flash/modules/board/xml/langs.xml ./flash/modules/board/xml/main.xml ./flash/modules/board/xml/skins.xml ./flash/modules/chat/xml/config.xml ./flash/modules/chat/xml/langs.xml ./flash/modules/chat/xml/main.xml ./flash/modules/chat/xml/skins.xml ./flash/modules/desktop/xml/config.xml ./flash/modules/desktop/xml/langs.xml ./flash/modules/desktop/xml/main.xml ./flash/modules/desktop/xml/skins.xml ./flash/modules/global/xml/config.xml ./flash/modules/global/xml/main.xml ./flash/modules/im/xml/config.xml ./flash/modules/im/xml/langs.xml ./flash/modules/im/xml/main.xml ./flash/modules/im/xml/skins.xml ./flash/modules/mp3/xml/config.xml ./flash/modules/mp3/xml/langs.xml ./flash/modules/mp3/xml/main.xml ./flash/modules/mp3/xml/skins.xml ./flash/modules/photo/xml/config.xml ./flash/modules/photo/xml/langs.xml ./flash/modules/photo/xml/main.xml ./flash/modules/photo/xml/skins.xml ./flash/modules/video/xml/config.xml ./flash/modules/video/xml/langs.xml ./flash/modules/video/xml/main.xml ./flash/modules/video/xml/skins.xml ./flash/modules/video_comments/xml/config.xml ./flash/modules/video_comments/xml/langs.xml ./flash/modules/video_comments/xml/main.xml ./flash/modules/video_comments/xml/skins.xml
chmod 777 flash/modules/global/app/ffmpeg.exe


注意:在dolphin安装文件夹中其他文件夹的权限为644,子文件夹应有755的权限

2)如果phpunix系统中,作为CGI运行,所有的文件夹应该有755的权限和所有的文件应该有644的权限,执行文件如ffmpeg应该有755的权限

要快速的做到这一点,在你的dolphin安装文件夹下你可以运行以下命令:

find ./ -type d –exec chmod 755 {} \;

find ./ -type f –exec chmod 644 {} \;

chmod 755 flash/modules/global/app/ffmpeg.exe

3)如果你的网站是在windows系统下安装,那么就需要改变任何权限了

2.当所有的文件和文件夹都给加完权限后,这是单击“check”,看是否有权限没有给全的,若弄好后,单击“next

3、在第三页你将指定数据库信息


其中:

Database host port number3306

Database socket path 你可以不填,如果想填写的话,你可以进入到你mysql安装目录中用bin/mysqladmin version查看

Database namedolphin

Database password为你为dolphin配置的密码,


填好后单击“next

4、配置好后,单击“next”

5cron jobs

linux shell下输入以下命令

#crontab –e

然后在出现的界面中输入:

MAILTO=xiaoming.yuan@codepartners.com
* * * * * cd /var/local/apache/htdocs/periodic; /usr/bin/php -q cron.php

windows环境中

(1)创建cron的批处理文件

例如:c:\wamp\www\periodic\cron.bat

2)、在这个批处理文件中这样写道:

schtasks /Create /tn dolphin_cron /sc MINUTE /mo 1 /tr c:\wamp\www\periodic\cron.bat (to run every minute)

6、然后给inc文件755的权限

#chmod 755 .inc之后单击“next

到了这一步为了网站的安全性,你可以把安装文件给删除了,要不然岂不是每个人都可以在你们的服务器上安装了,吼吼

7、完成安装

注册你的序列号:

登录到你的网站,如:http://dol.codepartners.com.cn/administration当你登陆成功后,他会提示你注册,然后把你的序列号写进去,点击注册,就会进入管理界面


插曲:如果你在安装完脚本后出现以下相似的错误Warning: phpinfo()[function.phpinfo]:Itisnot safe to rely on the system's  
timezone settings. You are *required* to use the date.timezone setting or the  
date_default_timezone_set() function. In case you used any of those methods  
and you are still getting this warning, you most likely misspelled the
timezone identifier. We selected '
America/New_York' for 'EDT/-4.0/DST'
instead in /Users/{me}/Sites/localmirror/htdocs/tests/phpinfo.php on line 3

那么你可以在错误中给你提示的文档中,比如tests/phpinfo.php文档中,加入以下语句,

<?php
if(date_default_timezone_set('Europe/Stockholm')==0){
print"<!-- Error uknown timezone using UTC as default -->\n";
           date_default_timezone_set
('UTC');
}
phpinfo
();
?>

就可以解决了。

当然,如果觉得免费的序列号用着不爽,你也可以更换各收费的玩玩,嘿嘿,设置方法如下

Settings -> Advanced Settings -> Variables,在Dolphin License Code下输入新的序列号,然后保存退出就可以了

(1)安装模块

Tools——>Modules这个选项卡中,你可以看见有哪些模块已经安装,哪些模块没有安装,当然默认情况下是没有任何模块安装的,这时就需要你手工进行安装了,那么下面开始安装吧

在安装的时候,若你的php是作为apache的一个模块来运行的话,那么为了能够安装某些模块你必须改变些文件权限,如下所示:

chmod 777 modules/boonex/avatar/data/p_w_picpaths/ modules/boonex/avatar/data/tmp/
chmod 777 modules/boonex/forum/classes modules/boonex/forum/conf modules/boonex/forum/layout modules/boonex/forum/log modules/boonex/forum/js modules/boonex/forum/cachejs modules/boonex/forum/data/p_w_uploads
chmod 777 modules/boonex/photos/data/files
chmod 777 modules/boonex/files/data/files
chmod 777 modules/boonex/desktop/file
chmod 777 modules/boonex/profile_customize/data/p_w_picpaths
chmod 666 modules/boonex/profiler/log/profiler.log

不过在你的服务器中如果php是运行在CGI模式下,你可以跳过以上步骤的。

现在你需要检查下你所需安装的所有模块,他们之中有的依赖别的模块,这就需要我们几个几个的安装了,也需要你注意,若是一些模块安装不成功,会在Operation Results空间这个地方显示些错误信息的,我们要在第一时间解决,以至于不影响下面模块的安装,当所有的模块都安装好后,那么恭喜你,dolphin已经安装成功了,吼吼吼O(_)O哈哈哈~