×
Community Blog How to Setup Seafile on Ubuntu 16.04

How to Setup Seafile on Ubuntu 16.04

In this article, you will get some information on the installation and configuration of Seafile on an Alibaba Cloud ECS with Ubuntu 16.04.

Seafile is a free, open source and cross-platform file storage system similar to Dropbox. It is used for sharing and syncing files between users and groups. It can be easily integrated with LDAP and WebDAV. It supports file versioning, snapshots and two-factor authentication. You can deploy it with MySQL, MariaDB, PostgreSQL, Apache and Nginx web server. Files are stored on Seafile server and can be synchronized with personal computers and mobile devices through apps. You can also access and manage Seafile through a web browser.

Install Required Dependencies

Before starting, you will need to install some dependencies in order to install Seafile. You can install all the dependencies by running the following command:

apt-get install apache2 openjdk-8-jre poppler-utils libreoffice libreoffice-script-provider-python libpython2.7 python-pip xfonts-wqy python-imaging python-mysqldb python-setuptools python-memcache ttf-wqy-microhei ttf-wqy-zenhei -y

Next, you will also need to install boto using pip:

pip install boto

Configure Apache for Seafile

Next, you will need to configure Apache as a reverse proxy server for seafile-server on port 8000 and 8002. You can do this by creating seafile.conf file:

nano /etc/apache2/sites-enabled/seafile.conf

Add the following lines:

<VirtualHost *:80>
    ServerName www.example.com
    DocumentRoot /var/www/html
    Alias /media  /var/www/html/seafile/seahub/media

    RewriteEngine On

    <Location /media>
        Require all granted
    </Location>

    #
    # seafile fileserver
    #
    ProxyPass /seafhttp http://127.0.0.1:8082
    ProxyPassReverse /seafhttp http://127.0.0.1:8082
    RewriteRule ^/seafhttp - [QSA,L]

    #
    # seahub
    #
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPass / http://127.0.0.1:8000/
    ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>

Save and close the file, then enable seafile virtual host, rewrite module and proxy module with the following command:

a2ensite seafile
a2enmod rewrite
a2enmod proxy_http

Finally, restart apache service to apply all the changes:

systemctl restart apache2

Seafile server is now installed and listening on port 80. Open your web browser and type the URL http://example.com.

For details, please go to this tutorial.

Related Blog Posts

How to Install Hadoop Cluster on Ubuntu 16.04

In this tutorial, we will learn how to setup an Apache Hadoop on a single node cluster in an Alibaba Cloud Elastic Compute Service (ECS) instance with Ubuntu 16.04.

How to Secure Apache Web Server with ModEvasive on Ubuntu 16.04

Apache is the cornerstone of modern web servers and is a powerful software solution for a large percentage of today's internet economy.

Related Market Product

H2O powered by Miri Infotech

H2O is used for exploring and analyzing datasets held in cloud computing systems & in the Apache Hadoop Distributed File System and in the conventional operating-systems.

Related Documentation

Quick start for ApsaraDB for RDS

MySQL is the world’s most popular open source database. As an important part of LAMP and a combination of open source software (Linux + Apache + MySQL + Perl/PHP/Python), MySQL is widely used in a variety of applications.

Apache cache policy setting

Apache expiration policies can be set in mod_expires and mod_headers on apache.

Related Products

ApsaraDB RDS for MySQL

MySQL is one of the most popular open-source databases in the world. As a key component of the open-source software bundle LAMP (Linux, Apache, MySQL, and Perl/PHP/Python), MySQL has been widely applied to different scenarios.

CDN

You can use content delivery network (CDN) to deliver content to users from the nodes that are nearest to them, accelerating the response to user requests and increasing the response rate. CDN also resolves the delivery latency problem that is usually caused by distribution, bandwidth, and server performance issues. CDN has been applied in multiple scenarios, including site acceleration, on-demand streaming, and live streaming.

Related Course

Apache Hadoop Overview

This course aims to help users who want to understand Big Data technology and data processing through cloud products. Through learning, users can fully understand the concept of Big Data and what is Hadoop, which is a firm foundation for the later study of Big Data technology.

0 0 0
Share on

Alibaba Clouder

2,599 posts | 758 followers

You may also like

Comments