This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
fileservices:seafile [2013/10/24 13:15] tschulz [install deps] |
fileservices:seafile [2013/10/25 14:52] (current) tschulz [Exclude Files] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Seafile 2.x on Ubuntu 12.04 ====== | ====== Seafile 2.x on Ubuntu 12.04 ====== | ||
- | ===== install deps ===== | + | ===== Download and Install ===== |
- | <file> | + | - install deps<file> |
- | apt-get install python2.7 python-setuptools python-simplejson python-imaging python-mysqldb\ | + | apt-get install python2.7 python-setuptools python-simplejson\ |
- | mysql-server | + | python-imaging python-mysqldb mysql-server |
</file> | </file> | ||
- | ===== extract and install ===== | + | - extract and install<file> |
- | <file> | + | |
mkdir /vol1/seafile/ | mkdir /vol1/seafile/ | ||
cd /vol1/seafile/ | cd /vol1/seafile/ | ||
Line 15: | Line 14: | ||
./setup-seafile-mysql.sh | ./setup-seafile-mysql.sh | ||
</file> | </file> | ||
- | ===== Setup Smtp Server ===== | + | - Setup Smtp Server<file py /vol1/seafile/seahub_settings.py> |
- | <file py /vol1/seafile/seahub_settings.py> | + | |
... | ... | ||
EMAIL_USE_TLS = False | EMAIL_USE_TLS = False | ||
Line 27: | Line 25: | ||
... | ... | ||
</file> | </file> | ||
- | ===== Enable Startup ===== | + | ===== Enable Seafile Automatic Startup ===== |
- | ==== /etc/init.d/seafile ==== | + | |
- | <file bash /etc/init.d/seafile> | + | - create /etc/init.d/seafile<file bash /etc/init.d/seafile> |
#!/bin/sh | #!/bin/sh | ||
### BEGIN INIT INFO | ### BEGIN INIT INFO | ||
Line 83: | Line 81: | ||
esac | esac | ||
</file> | </file> | ||
- | ==== Enable automatic startup ==== | + | - Turn on automatic startup<file bash> |
- | <file bash> | + | |
# make the script executable | # make the script executable | ||
sudo chmod +x /etc/init.d/seafile | sudo chmod +x /etc/init.d/seafile | ||
Line 93: | Line 90: | ||
</file> | </file> | ||
- | ====== Enable SSL through Apache2 on port 443 ====== | + | ===== Enable SSL through Apache2 on port 443 ===== |
- Install Apache and enable mods<file> | - Install Apache and enable mods<file> | ||
apt-get install python-flup apache2 libapache2-mod-fastcgi | apt-get install python-flup apache2 libapache2-mod-fastcgi | ||
Line 107: | Line 104: | ||
... | ... | ||
</file> | </file> | ||
- | - create ssl certs<file> | + | - Create ssl certs<file> |
mkdir /vol1/seafile/ssl | mkdir /vol1/seafile/ssl | ||
cd /vol1/seafile/ssl | cd /vol1/seafile/ssl | ||
Line 113: | Line 110: | ||
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 9999 | openssl req -new -x509 -key privkey.pem -out cacert.pem -days 9999 | ||
</file> | </file> | ||
- | - update apache ssl virtual host<file apache /etc/apache2/sites-enabled/default-ssl> | + | - Update apache ssl virtual host<file apache /etc/apache2/sites-enabled/default-ssl> |
... | ... | ||
SSLCertificateFile /vol1/seafile/ssl/cacert.pem | SSLCertificateFile /vol1/seafile/ssl/cacert.pem | ||
Line 128: | Line 125: | ||
... | ... | ||
</file> | </file> | ||
- | - update SERVICE_URL in ccnet.conf<file conf /vol1/seafile/ccnet/ccnet.conf> | + | - Update SERVICE_URL in ccnet.conf<file conf /vol1/seafile/ccnet/ccnet.conf> |
... | ... | ||
SERVICE_URL = https://<SERVER FQDN> | SERVICE_URL = https://<SERVER FQDN> | ||
Line 138: | Line 135: | ||
#Listen 80 | #Listen 80 | ||
... | ... | ||
+ | </file> | ||
+ | |||
+ | ====== Exclude Files ====== | ||
+ | Sometimes you don't want to sync some files or folders inside a library. To achieve this, create a **seafile-ignore.txt** file in the root folder of a library. This special file specifies the files and folders that Seafile should not sync. Each line in a **ignore.txt** file specifies a pattern. The following pattern format are supported. | ||
+ | |||
+ | - A blank line matches no files. | ||
+ | - A line starting with # serves as a comment. | ||
+ | - Seafile supports wildcards in the pattern. For example, "foo/*" matches "foo/1" and "foo/hello". "foo/?" matches "foo/1" but not "foo/hello". Note that the wildcard character * recursively matches all the paths under a folder. For instance, "foo/*.html" matches "foo/a.html" and "foo/templates/b.html". | ||
+ | - If the pattern ends with a slash, it would only match a folder. In other words, foo/ will match a folder "foo" and paths underneath it, but will not match a regular file or a symbolic link "foo". | ||
+ | - If a pattern doesn't end with a slash or a wildcard, it would not match a folder. For example, "foo" can only match regular file "foo" or a symbolic link; while "foo/" and "foo*" match a folder and paths under it. | ||
+ | |||
+ | <file txt seafile-ignore.txt> | ||
+ | # a regular file | ||
+ | test-file | ||
+ | |||
+ | # a dir | ||
+ | test-dir/ | ||
+ | |||
+ | # wildcard * | ||
+ | test-star1/* | ||
+ | test-star2/*.html | ||
+ | |||
+ | # wildcard ? | ||
+ | test-qu1/?.html | ||
+ | test-qu2/?/ | ||
</file> | </file> |