In this tutorial, we will show you how to install Seafile on CentOS 6. For those of you who didn’t know, Seafile is an open-source cloud storage software. It offers file sharing and syncing for individual users and groups, it provides client-side encryption and easy access from mobile devices. Also easily integrated with local services such as LDAP and WebDAV or can be deployed using advanced network services and databases like MySQL, SQLite, PostgreSQL, Memcached, Nginx, or Apache Web Server.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the Seafile on a CentOS 6.
Prerequisites
- A server running one of the following operating systems: CentOS 6.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Seafile on CentOS 6
Step 1. First, install required packages.
yum -y update yum -y install python-imaging MySQL-python python-simplejson python-setuptools
Step 2. Install Seafile on CentOS 6.
Create a new user that will be used to run the Seafile services:
adduser seafile passwd seafile su -seafile
You need to download the last release of Seafile:
wget https://bitbucket.org/haiwen/seafile/downloads/seafile-server_4.0.6_x86-64.tar.gz tar xfz seafile-server_4.0.6_x86-64.tar.gz cd seafile-server_4.0.6/
Run this script which will create the required databases and directories for the Seafile server and answer all questions using the following configuration options, after the script verifies the existence of all Python required modules:
./setup-seafile-mysql.sh
After the Seafile server successfully installs, it will generate some useful information such as what ports need to be open on your Firewall to allow external connection and what scripts to handle in order to start the server.
Step 3. Configure Iptables or firewall
# nano /etc/sysconfig/iptables -A INPUT -p udp -m state --state NEW --dport 8000 -j ACCEPT -A INPUT -p tcp -m state --state NEW --dport 8000 -j ACCEPT
Restart iptables to apply rules using the following command:
service iptables restart
Step 4. Starting the Seafile services.
Now run the ‘seafile.sh’ and ‘seahub.sh’ scripts to start the Seafile server.
su - seafile cd seafile-server_4.0.6 ./seafile.sh start ./seahub.sh start
Step 5. Accessing Seafile.
Seafile will be available on HTTP port 8000 by default. Open your favorite browser and navigate to http://your-domain.com:8000
or http://server-ip:8000
. Enter the admin email id and password to log in which you have created at the time of installation. If you are using a firewall, please open port 8000 to enable access to the control panel.
Congratulations! You have successfully installed Seafile. Thanks for using this tutorial for installing Seafile open-source cloud storage on CentOS 6 system. For additional help or useful information, we recommend you to check the official Seafile website.