之前也一直在用客户的owl服务器,它那基于网页的操作界面(免安装客户端软件的)实在是让我觉得其它FTP都是不够好!所以最后决定使用OWL服务器。你可以去官网上看它的介绍:
http://www.doxbox.ca/
下面是我根据多个网面及官网上的install manual 安装OWL的过程(基于已经装有Appache和mySQL的Ubuntu):
1. 下载OWL
在这里你可以找到最新的OWL版本:
当时是1.01版
2. 安装OWL
cd 到你所下载的OWL路径下,执行:
sudo tar xvfz owl-1.01.tar.gz
sudo mv owl-1.01 /var/www/owlFs
安装到了/var/www/owlFs下了。
3. 更改文件仓库的路径
OWL默认将用户上传的文件放在OWL安装目录下的Documents里。这里就是/var/www/owlFs/Documents了。如果需要更改,请把它copy到你想要的路径。比如
sudo mv /var/www/owlFs/Documents /data/owlFs/Documents
4. 为OWL建立用户管理数据库(在这里,我们把这个数据库名也叫owlFs), 并初始化
sudo mysqladmin -p create owlFs
5. 初始化用户管理数据库
sudo mysql -p owlFs < /var/www/owlFs/DOCS/sql/mysql-tables.sql
可能我们的mysql的版本太高,mysql-tables.sql内有语法错误。报错 ) TYPE=MyISAM; 这行有错。
sudo nano /var/www/owlFs/DOCS/sql/mysql-tables.sql 把所有的
) TYPE=MyISAM;改成) ENGINE=MyISAM;即可。
6. 为OWL建立访问数据库的用户及其权限
mysql -u root -p owlFs
grant CREATE,INSERT,SELECT,DELETE,UPDATE on owlFs.* to 'owl-user'@'localhost';
connect mysql
set password for 'owl-user'@'localhost' = password('your_password');
flush privileges;
exit;
7. 配置OWL
sudo nano /var/www/owlFs/config/owl.php
更改如下内容:
$default->owl_root_url
= "/owlFs"; //这个地址是以网页服务器根目录(/var/www)为根目录,owl的安装地址
$default->system_ButtonStyle = "Blue"; //这种网页好看一点
$default->owl_fs_root = "/var/www/owlFs/"; //这是owl安装地址的绝对路径
$default->owl_use_fs = true; //这个很重要,要保证是true,否则你的文件将全部保存在数据库里,而非Documents目录下。
$default->owl_db_user[0] = "owl-user"; //第6点里为owl访问数据库加的用户
$default->owl_db_pass[0] = "your_password"; //第6点里用户的密码
$default->owl_db_host[0] = "localhost";
$default->owl_db_name[0] = "owlFs"; //第4点里新加的用于存储访问owl的用户及密码的数据库存(经配置也可存数据文件)
$default->owl_db_FileDir[0] = "/data/owlFs"; //如果配置用Documents文件夹存储文件,这就是第3点里Documents文件夹所在路径。
8.确保Appache有对相应文件夹读写的功能
因为owl对文件的读写都是通过Appache完成,所以需要保证其读写权限。
chmod –R 775 /var/www/owlFs
chown –R root.root /var/www/owlFs
cd /data/owlFs/
chown -R nobody Documents
9. OK,你可以使用Browser 去访问你的owl服务器了:
http://localhost/owlFs
也可以在同一局域网里的其它电脑访问它了:
http://yourServerIPaddress/owlFs
第一次请使用admin账号和admin密码login。之后你就可以在里面新建用户及用户组了。记得改你的admin密码哦!
10.弄了很久的中文支持,就是不成功。
下面这位看起来应该是可行。但在我这里就是不行。可能是版本不同?
备注:
有网页讲需要更改/var/www/owlFs/admin/tools/ctable.php 里如下内容。
$database_instance = "owlFs";
从Install Manual里来看,这个与第7点的功效是一样的。但,如果你的owl无法成功,不防也试试。
11. 更改界面
a. 更改login界面上的标题:Owl Intranet.
在/var/www/owlFs/config/owl.php里,把$default->site_title = “
Owl Intranet”;改为你想要的值。
b.
13. 设置自动email.
这个要看你email服务器的参数了。我用163email的。从IE登陆你的owl服务器,管理员账号登陆后(默认admin,PW:admin),在admin选项里可以找到设置email的地方。
如果用户属性里使能了Receive Notifications的话,当你上传新文件,就有emial通知所有相关人。
如果你还使能了Atach File的话,那连同你上传的文件也会当成附件发送出去。
14. 更改自动链接
新加用户时,新用户会收到他/她的帐号和密码。同时也会有一login链接.这个链接默认是https://server/...
如果要改成http://server/..., 需要在/var/www/owlFs/config/owl.conf里,把$default->owl_notify_link 改为 = "http://..."就行了。
15. 更改最大上传文件大小
upload_max_filesize and post_max_size
Files are usually POSTed to the webserver in a format known as 'multipart/form-data'. The post_max_size sets the upper limit on the amount of data that a script can accept in this manner. Ideally this value should be larger than the value that you set for upload_max_filesize.
It's important to realize that upload_max_filesize is the sum of the sizes of all the files that you are uploading. post_max_size is the upload_max_filesize plus the sum of the lengths of all the other fields in the form plus any mime headers that the encoder might include. Since these fields are typically small you can often approximate the upload max size to the post max size.
According to the PHP documentation you can set a MAX_UPLOAD_LIMIT in your HTML form to suggest a limit to the browser.
This is accomplished by the following Owl Parameter, the parameter takes a value in bytes, so if for example you wish to set a limit of 5MB you calculate the number of bytes by the following formula <number of MB> * 1024 * 1024.
From the Administration Panel, under Site Feature:
memory_limit
When the PHP engine is handling an incoming POST it needs to keep some of the incoming data in memory. This directive has any effect only if you have used the --enable-memory-limit option at configuration time. Setting too high a value can be very dangerous because if several uploads are being handled concurrently all available memory will be used up and other unrelated scripts that consume a lot of memory might effect the whole server as well.
max_execution_time and max_input_time
These settings define the maximum life time of the script and the time that the script should spend in accepting input. If several mega bytes of data are being transferred max_input_time should be reasonably high.
功能是OK的。但发现/var/log/apache2/error.log还是有报警信息。
16. 更改description分行显示
默认所有的description都是同一行显示的,哪怕你有加回车键。
解决方案:
在/var/www/owlFs/view_default.php里,注释掉如下一行(大概439行):
print("<br /><img src=\"$default->owl_graphics_url/$default->sButtonStyle/ui_misc/transparent.gif\" border=\"0\"><a class=\"desc\...........
换成以下几行:
print("<br /><img src=\"$default->owl_graphics_url/$default->sButtonStyle/ui_misc/transparent.gif\" border=\"0\"><a class=\"desc\">");
$src="<br /><img src=\"$default->owl_graphics_url/$default->sButtonStyle/ui_misc/transparent.gif\" border=\"0\"></imag>";
$sDescription = str_replace("\r\n",$src, $sql->f("description"));
print("$sDescription");
print("</a></td>\n");
NOTE1: 如果有两张网卡,还需要正确设置网关和路由,否则可能只有一张网卡可以正常,另一网卡不正常。请参考 下面内容解决:
NOTE2:如果你有两张网卡,在那你用管理员登陆其中一个IP来新加用户时,新用户收到的email里的自动链接就以这个IP为准。
比如我用admin登陆192.168.100.17/owlFs/,加了一新用户,那这一用户收到的email里的Login链接就是:http://192.168.100.17/owlFs/index.php
如果我登陆另一网卡192.168.25.17/owlFs/,那新用户收到的login链接就是:http://192.168.25.17/owlFs/index.php