Line 120: |
Line 120: |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | well I got some errors and the files in github says different from doc<syntaxhighlight lang="bash"> | + | well I got some errors and the files in github says different from doc |
− | scl enable python 27: test-requirements.txt and requirements.txt for 5.1 branch
| + | |
| + | <nowiki>:</nowiki> test-requirements.txt and requirements.txt for 5.1 branch (NB server asks for requests==2.8.0 while seahub for 2.3.0)<syntaxhighlight lang="bash"> |
| + | scl enable python 27 |
| | | |
| | | |
Line 145: |
Line 147: |
| pip install pytz==2015.7 | | pip install pytz==2015.7 |
| | | |
− | </syntaxhighlight>I also see some memcached service is needed... seahub/avatar/sql/migration.md | + | |
| + | pip install termcolor==1.1.0 |
| + | pip install prettytable==0.7.2 |
| + | pip install pexpect==4.0 |
| + | pip install httpie |
| + | pip install django-constance[database] |
| + | |
| + | </syntaxhighlight>seafile server would need pip install MySQL-python==1.2.5, which will need mysql devel to compile |
| + | |
| + | I also see some memcached service is needed... seahub/avatar/sql/migration.md |
| | | |
| ==== startup scripts and sme related db ==== | | ==== startup scripts and sme related db ==== |
Line 156: |
Line 167: |
| ==== Start server ==== | | ==== Start server ==== |
| <syntaxhighlight lang="antlr-objc"> | | <syntaxhighlight lang="antlr-objc"> |
− | cd /opt/rh/python27/root/usr/lib/python2.7/site-packages/
| |
− | ln /usr/lib/python2.6/site-packages/seaserv seaserv -s
| |
− | ln /usr/lib/python2.6/site-packages/seafile seafile -s
| |
− | ln /usr/lib/python2.6/site-packages/ccnet ccnet -s
| |
− | cd /opt/rh/python27/root/usr/lib64/python2.7/site-packages/
| |
− | ln /usr/lib64/python2.6/site-packages/pysearpc pysearpc -s
| |
− |
| |
| scl enable python27 bash | | scl enable python27 bash |
| mkdir /opt/seafile/; | | mkdir /opt/seafile/; |
| cd /opt/seafile/; | | cd /opt/seafile/; |
| mkdir seafile-server/ | | mkdir seafile-server/ |
| + | mkdir logs pids |
| mkdir seafile-server/runtime | | mkdir seafile-server/runtime |
| mkdir -p /opt/seafile/seafile-data/library-template | | mkdir -p /opt/seafile/seafile-data/library-template |
Line 224: |
Line 229: |
| ==== configure httpd reverse proxy ==== | | ==== configure httpd reverse proxy ==== |
| the easy way is :<syntaxhighlight lang="bash"> | | the easy way is :<syntaxhighlight lang="bash"> |
| + | db domains setprop seafile.itx.pialasse.com Nameservers local ProxyPassTarget http://127.0.0.1:8000/ TemplatePath ProxyPassVirtualHosts |
| + | |
| + | signal-event domain-modify seafile.itx.pialasse.com |
| + | </syntaxhighlight>more long way: |
| + | |
| + | <syntaxhighlight lang="bash"> |
| mkdir /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/ -p | | mkdir /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/ -p |
| cat > /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/28SeafileProxyPass <<- 'EndOfMessage' | | cat > /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/28SeafileProxyPass <<- 'EndOfMessage' |
Line 302: |
Line 313: |
| service httpd-e-smith restart | | service httpd-e-smith restart |
| </syntaxhighlight> | | </syntaxhighlight> |
| + | |
| + | ==== service start ==== |
| + | <syntaxhighlight lang="bash"> |
| + | cat > /etc/rc.d/init.d/seafile << 'EOF' |
| + | #!/bin/bash |
| + | ### BEGIN INIT INFO |
| + | # Provides: seafile-server |
| + | # Required-Start: $remote_fs $syslog |
| + | # Required-Stop: $remote_fs $syslog |
| + | # Default-Start: 2 3 4 5 |
| + | # Default-Stop: 0 1 6 |
| + | # Short-Description: Seafile server |
| + | # Description: Start Seafile server |
| + | ### END INIT INFO |
| + | |
| + | # Change the value of "user" to your linux user name |
| + | user=root |
| + | |
| + | # Change the value of "seafile_dir" to your path of seafile installation |
| + | # usually the home directory of $user |
| + | seafile_dir=/opt/seafile |
| + | script_path=${seafile_dir}/seafile-server-latest |
| + | seafile_init_log=${seafile_dir}/logs/seafile.init.log |
| + | seahub_init_log=${seafile_dir}/logs/seahub.init.log |
| + | |
| + | |
| + | # |
| + | # Write a polite log message with date and time |
| + | # |
| + | echo -e "\n \n About to perform $1 for seafile at `date -Iseconds` \n " >> ${seafile_init_log} |
| + | echo -e "\n \n About to perform $1 for seahub at `date -Iseconds` \n " >> ${seahub_init_log} |
| + | |
| + | # Python |
| + | sclname='python27' |
| + | . /opt/rh/$sclname/enable |
| + | export X_SCLS="$X_SCLS $sclname" |
| + | |
| + | # we want start daemon only inside "scl enable" invocation |
| + | if ! scl_enabled python27 ; then |
| + | echo "Collection python27 has to be listed in /opt/rh/python27/service-environment" |
| + | exit 1 |
| + | fi |
| + | cd /opt/seafile |
| + | export TOPDIR=/opt/seafile |
| + | export INSTALLPATH=/opt/seafile |
| + | export PYTHONPATH=/opt/seafile:/opt/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH |
| + | export CCNET_CONF_DIR=/opt/seafile/conf/ |
| + | export SEAFILE_CONF_DIR=/opt/seafile/seafile-data/ |
| + | export SEAFILE_CENTRAL_CONF_DIR=/opt/seafile/conf/ |
| + | export SEAHUB_LOG_DIR=/opt/seafile/logs |
| + | export SEAFILE_PIDFILE=/opt/seafile/pids/controller.pid |
| + | |
| + | case "$1" in |
| + | start) |
| + | /usr/bin/seafile-admin start |
| + | ;; |
| + | restart) |
| + | /usr/bin/seafile-admin stop |
| + | /usr/bin/seafile-admin start |
| + | stop) |
| + | /usr/bin/seafile-admin stop |
| + | |
| + | ;; |
| + | *) |
| + | echo "Usage: /etc/init.d/seafile {start|stop|restart}" |
| + | exit 1 |
| + | ;; |
| + | esac |
| + | EOF |
| + | |
| + | chkconfig seafile on |
| + | ln -s /etc/rc.d/init.d/seafile /etc/rc.d/rc7.d/S85seafile |
| + | </syntaxhighlight> |
| + | |
| + | ==== add ldap support ==== |
| + | simply add this to /opt/seafile/conf/ccnet.conf<syntaxhighlight lang="bash"> |
| + | [LDAP] |
| + | HOST = ldap://localhost |
| + | BASE = ou=Users,dc=domain,dc=tld |
| + | LOGIN_ATTR = mail |
| + | FILTER = objectClass=inetOrgPerson |
| + | |
| + | </syntaxhighlight> |
| + | |
| + | ==== add log to syslog ==== |
| + | see https://manual.seafile.com/maintain/logs.html and more : https://manual.seafile.com/deploy/using_syslog.html |
| + | |
| + | there are 2 files to edit. Then arrange logrotate |
| | | |
| === Installation === | | === Installation === |
Line 308: |
Line 407: |
| latter you will be able to do this: | | latter you will be able to do this: |
| yum --enablerepo=smecontribs install smeserver-seafile-server {{#var:smecontribname}} | | yum --enablerepo=smecontribs install smeserver-seafile-server {{#var:smecontribname}} |
| + | |
| + | === Client usage === |
| + | If you want to connect locally you need to do the following:<syntaxhighlight lang="bash"> |
| + | cd ~ |
| + | mkdir ~/seafile-client |
| + | seaf-cli init -d ~/seafile-client |
| + | seaf-cli start |
| + | seaf-cli download -l "the id of the library" -s "the url + port of server" -d "the folder where the library folder will be downloaded" -u "username on server" [-p "password"] |
| + | seaf-cli status |
| + | </syntaxhighlight> |
| | | |
| === Uninstall === | | === Uninstall === |