Lamp+Dolphin安装(2)


4、dolphin的安装
一、下载并解压到/usr/local/src中,
用如下命令进行解压
unzip Dolphin-v.X.X.zip
或者
unzip -d Dolphin_directory Dolphin-v.X.X.zip
二、为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 php

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

1)能够安装到网站根目录(如:www.mysite.com) mysql

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

你能够进入到http.conf文件中,查看网站的根目录是哪一个。个人网站根目录是/usr/local/apache2/htdocs,因而我把解压出来的dolphin文件中全部的内容都移动到htdocs web

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

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

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

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

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

(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

四、配置好后,单击“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哈哈哈~

相关文章
相关标签/搜索