{"id":12777,"date":"2019-03-28T19:38:42","date_gmt":"2019-03-28T19:38:42","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12777"},"modified":"2019-03-28T19:38:42","modified_gmt":"2019-03-28T19:38:42","slug":"installing-seafile-secure-cloud-storage-with-mysql-database-in-rhel-centos-sl-7-x-6-x","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/installing-seafile-secure-cloud-storage-with-mysql-database-in-rhel-centos-sl-7-x-6-x\/","title":{"rendered":"Installing Seafile (Secure Cloud Storage) with MySQL Database in RHEL\/CentOS\/SL 7.x\/6.x"},"content":{"rendered":"<p><b>Seafile<\/b>\u00a0is an advanced Open Source collaborative cloud storage application written in Python with file sharing and syncing support, team collaboration and privacy protection using client side encryption. It\u2019s build as a multi-platform file syncing with clients that runs on all major platforms (Linux, Raspberry Pi, Windows, Mac, iPhone and Android) and can be 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.<\/p>\n<div id=\"attachment_7653\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-7653\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux.png\" alt=\"Install Seafile in CentOS\" width=\"600\" height=\"400\" aria-describedby=\"caption-attachment-7653\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7653\" class=\"wp-caption-text\">Install Seafile in Linux<\/p>\n<\/div>\n<p>This tutorial will guide you on a step by step\u00a0<b>Seafile Server<\/b>\u00a0installation on RHEL\/CentOS\/Scientific Linux 7.x\/6.x deployed with MySQL database, with start-up\u00a0<b>init<\/b>\u00a0scripts for running the server on default Seafile port (8000\/TCP) and default HTTP transaction port (80\/TCP), create necessary Firewall rules to open required ports.<\/p>\n<h4>Requirements<\/h4>\n<ol>\n<li>Minimal\u00a0<a href=\"https:\/\/www.tecmint.com\/centos-6-5-installation-guide-with-screenshots\/\" target=\"_blank\" rel=\"noopener\">CentOS 6.5 installation<\/a>\u00a0with static IP address.<\/li>\n<li>MySQL\/MariaDB database<\/li>\n<li>Python 2.6.5+ or 2.7<\/li>\n<li>Python-setuptools<\/li>\n<li>Python-simplejson<\/li>\n<li>Python-imaging<\/li>\n<li>Python-mysqldb<\/li>\n<\/ol>\n<p>This installation procedure tested on\u00a0<b>CentOS 6.4 64-bit<\/b>\u00a0system, but can also be used on other Linux distributions with the specification that\u00a0<b>init<\/b>\u00a0start-up scripts differ from one distribution to another.<\/p>\n<h3>Step 1: Install Python Modules<\/h3>\n<p><strong>1.<\/strong>\u00a0First do a system\u00a0<b>Update<\/b>, then install all required Python modules using the following commands.<\/p>\n<pre># yum upgrade\r\n# yum install python-imaging MySQL-python python-simplejson python-setuptools<\/pre>\n<p><strong>2.<\/strong>\u00a0If you use a\u00a0<b>Debian<\/b>\u00a0or\u00a0<b>Ubuntu<\/b>\u00a0server install all Python modules with the next commands.<\/p>\n<pre>$ sudo apt-get update\r\n$ sudo apt-get install python2.7 python-setuptools python-simplejson python-imaging python-mysqldb<\/pre>\n<h3>Step 2: Install Seafile Server<\/h3>\n<p><strong>3.<\/strong>\u00a0After all Python modules are installed create a new system user with a strong password that will be used to host Seafile server configuration and all data on its home directory, then switch to newly user account created.<\/p>\n<pre># adduser seafile\r\n# passwd seafile\r\n# su - seafile<\/pre>\n<div id=\"attachment_7636\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7636\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-01-620x222.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-01-620x222.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-01.png 904w\" alt=\"Create Seafile User\" width=\"620\" height=\"222\" aria-describedby=\"caption-attachment-7636\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7636\" class=\"wp-caption-text\">Create Seafile User<\/p>\n<\/div>\n<p><strong>4.<\/strong>\u00a0Then login to MySQL database and create three databases, one for every Seafile Server components:\u00a0<b>ccnet server<\/b>,\u00a0<b>seafile server<\/b>\u00a0and\u00a0<b>seahub<\/b>\u00a0with a single user for all databases.<\/p>\n<pre>$ mysql -u root -p\r\n\r\nmysql&gt; create database `ccnet-db`;\r\nmysql&gt; create database `seafile-db`;\r\nmysql&gt; create database `seahub-db`;\r\nmysql&gt; create user 'seafile'@'localhost' identified by 'password';\r\nmysql&gt; GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@`localhost`;\r\nmysql&gt; GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@`localhost`;\r\nmysql&gt; GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@`localhost`;\r\nmysql&gt; FLUSH PRIVILEGES;\r\nmysql&gt; exit;<\/pre>\n<div id=\"attachment_7638\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7638\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-02-620x361.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-02-620x361.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-02-1024x597.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-02.png 1068w\" alt=\"Install Seafile with MySQL Database\" width=\"620\" height=\"361\" aria-describedby=\"caption-attachment-7638\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7638\" class=\"wp-caption-text\">Create Seafile Database<\/p>\n<\/div>\n<p><strong>5.<\/strong>\u00a0Now it\u2019s time to download and install\u00a0<b>Seafile Server<\/b>. Go to Seafile\u00a0<a href=\"http:\/\/seafile.com\/en\/download\/\" target=\"_blank\" rel=\"noopener\">official download<\/a>\u00a0page and grab the last\u00a0<b>.Tar<\/b>\u00a0Linux archive release for your server architecture using\u00a0<b>wget<\/b>\u00a0command, then extract it to your home Seafile user created earlier and enter Seafile extracted directory.<\/p>\n<pre>$ wget https:\/\/bitbucket.org\/haiwen\/seafile\/downloads\/seafile-server_3.0.4_x86-64.tar.gz\r\n$ tar xfz seafile-server_3.0.4_x86-64.tar.gz\r\n$ cd seafile-server_3.0.4\/<\/pre>\n<div id=\"attachment_7639\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7639\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-03-620x298.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-03-620x298.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-03-1024x492.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-03.png 1066w\" alt=\"Download Seafile\" width=\"620\" height=\"298\" aria-describedby=\"caption-attachment-7639\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7639\" class=\"wp-caption-text\">Download Seafile<\/p>\n<\/div>\n<p><strong>6.<\/strong>\u00a0To install Seafile Server using MySQL database run\u00a0<b>setup-seafile-mysql.sh<\/b>\u00a0initialization script and answer all questions using the following configuration options, after the script verifies the existence of all Python required modules.<\/p>\n<pre>$ .\/setup-seafile-mysql.sh<\/pre>\n<ol>\n<li>What is the name of your server? = choose a\u00a0<b>descriptive name<\/b>\u00a0(no spaces allowed).<\/li>\n<li>What is the IP or domain of the server? = enter your server\u00a0<b>IP address<\/b>\u00a0or your valid\u00a0<b>domain name<\/b>.<\/li>\n<li>Which port do you want to use for ccnet server? = hit [<b>Enter<\/b>] \u2013 leave it default \u2013\u00a0<b>10001<\/b>.<\/li>\n<li>Where do you want to put seafile data? = hit [<b>Enter<\/b>] \u2013 the default location will be your\u00a0<b>$HOME\/seafile-data<\/b>directory.<\/li>\n<li>Which port do you want to use for seafile server? = hit [<b>Enter<\/b>] \u2013 leave it default \u2013\u00a0<b>12001<\/b>.<\/li>\n<\/ol>\n<div id=\"attachment_7640\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7640\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-04-620x370.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-04-620x370.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-04-1024x612.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-04.png 1027w\" alt=\"Run Seafile MySQL Script\" width=\"620\" height=\"370\" aria-describedby=\"caption-attachment-7640\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7640\" class=\"wp-caption-text\">Run Seafile MySQL Script<\/p>\n<\/div>\n<ol>\n<li>Which port do you want to use for seafile httpserver? = hit [<b>Enter<\/b>] \u2013 leave it default \u2013\u00a0<b>8082<\/b>.<\/li>\n<li>Please choose a way to initialize seafile databases: = choose\u00a0<b>1<\/b>\u00a0and provide default MySQL credentials: localhost, 3306 and root password.<\/li>\n<li>Enter the name for MySQL user of seafile: = seafile ( if you created other username enter that\u00a0<b>username<\/b>) and seafile MySQL user password.<\/li>\n<li>On ccnet-server, seafile-server and seahub databases just hit [<b>Enter<\/b>] key \u2013 default.<\/li>\n<\/ol>\n<div id=\"attachment_7641\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-05.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7641\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-05-620x390.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-05-620x390.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-05.png 988w\" alt=\"Configure Seafile for MySQL \" width=\"620\" height=\"390\" aria-describedby=\"caption-attachment-7641\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7641\" class=\"wp-caption-text\">Configure Seafile for MySQL<\/p>\n<\/div>\n<div id=\"attachment_7642\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-06.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7642\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-06-620x399.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-06-620x399.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-06.png 958w\" alt=\"MySQL Seafile Configuration\" width=\"620\" height=\"399\" aria-describedby=\"caption-attachment-7642\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7642\" class=\"wp-caption-text\">MySQL Seafile Configuration<\/p>\n<\/div>\n<p>After Seafile Server successfully installs, it will generate some useful information such as what ports needs to be open on your Firewall to allow external connection and what scripts to handle in order to start the server.<\/p>\n<div id=\"attachment_7643\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-07.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7643\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-07-620x402.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-07-620x402.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-07.png 952w\" alt=\"Seafile Installation Confirmation\" width=\"620\" height=\"402\" aria-describedby=\"caption-attachment-7643\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7643\" class=\"wp-caption-text\">Seafile Installation Confirmation<\/p>\n<\/div>\n<h3>Step 3: Open Firewall and Create Seafile init Script<\/h3>\n<p><strong>7.<\/strong>\u00a0Before starting Seafile server from local script for a test, change back to\u00a0<b>root<\/b>\u00a0account and open\u00a0<b>iptables<\/b>firewall file configuration located on\u00a0<b>\/etc\/sysconfig\/<\/b>\u00a0system path and add the following line rules before first\u00a0<b>REJECT<\/b>\u00a0line, then restart iptables to apply new rules.<\/p>\n<pre>$ su - root\r\n# nano \/etc\/sysconfig\/iptables<\/pre>\n<p>Append the following rules.<\/p>\n<pre>-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT\r\n-A INPUT -m state --state NEW -m tcp -p tcp --dport 8000 -j ACCEPT\r\n-A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT\r\n-A INPUT -m state --state NEW -m tcp -p tcp --dport 10001 -j ACCEPT\r\n-A INPUT -m state --state NEW -m tcp -p tcp --dport 12001 -j ACCEPT<\/pre>\n<div id=\"attachment_7644\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7644\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-08-620x321.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-08-620x321.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-08.png 932w\" alt=\"Open Ports for Seafile\" width=\"620\" height=\"321\" aria-describedby=\"caption-attachment-7644\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7644\" class=\"wp-caption-text\">Open Ports for Seafile<\/p>\n<\/div>\n<p>Restart iptables to apply rules using the following command.<\/p>\n<pre># service iptables restart<\/pre>\n<p><strong>NOTE<\/strong>: If you changed Seafile standard ports on installation process update your Firewall iptables rules accordingly.<\/p>\n<p><strong>8.<\/strong>\u00a0Now it\u2019s time to test Seafile Server. Switch to Seafile user and\u00a0<b>seafile-server<\/b>\u00a0directory and start the server using\u00a0<b>seafile.sh<\/b>\u00a0and\u00a0<b>seahub.sh<\/b>\u00a0scripts.<\/p>\n<p>The first time you start\u00a0<b>seahub.sh<\/b>\u00a0script, create an administrative account for Seafile Server using your email address and choose a strong password for admin account, especially if you are deploying this configuration in a production environment.<\/p>\n<pre># su - seafile\r\n$ cd seafile-server-latest\/\r\n$ .\/seafile.sh start\r\n$ .\/seahub.sh start<\/pre>\n<div id=\"attachment_7645\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-09.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7645\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-09-620x380.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-09-620x380.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-09.png 1015w\" alt=\"Start Seafile Server\" width=\"620\" height=\"380\" aria-describedby=\"caption-attachment-7645\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7645\" class=\"wp-caption-text\">Start Seafile Server<\/p>\n<\/div>\n<p><strong>9.<\/strong>\u00a0After the server is successfully started, open a browser and navigate to your server IP address or domain name on port\u00a0<b>8000<\/b>\u00a0using HTTP protocol, then login using you admin account created on the above step.<\/p>\n<pre>http:\/\/system_IP:8000\r\n\r\nOR \r\n\r\nhttp:\/\/domain_name:8000<\/pre>\n<div id=\"attachment_7646\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7646\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-10-620x294.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-10-620x294.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-10-1024x487.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-10.png 1404w\" alt=\"Seafile Login Screen\" width=\"620\" height=\"294\" aria-describedby=\"caption-attachment-7646\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7646\" class=\"wp-caption-text\">Seafile Login Screen<\/p>\n<\/div>\n<div id=\"attachment_7647\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7647\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-11-620x327.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-11-620x327.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-11-1024x540.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-11.png 1389w\" alt=\"Seafile Dashboard\" width=\"620\" height=\"327\" aria-describedby=\"caption-attachment-7647\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7647\" class=\"wp-caption-text\">Seafile Dashboard<\/p>\n<\/div>\n<p><strong>10.<\/strong>\u00a0After first configuration tests, stop Seafile server and create an\u00a0<b>init<\/b>\u00a0script that will help you manage more easily the entire process, just like any other Linux system daemon processes.<\/p>\n<pre>$ .\/seafile.sh stop\r\n$ .\/seahub.sh stop\r\n$ su - root\r\n# nano \/etc\/init.d\/seafile<\/pre>\n<p>Add the following content on this\u00a0<b>init<\/b>\u00a0script \u2013 If Seafile is installed on other system user make sure to update user and paths accordingly on\u00a0<b>su \u2013 $USER -c<\/b>\u00a0lines.<\/p>\n<pre>#!\/bin\/sh\r\n#chkconfig: 345 99 10\r\n#description: Seafile auto start-stop script.\r\n\r\n# source function library\r\n. \/etc\/rc.d\/init.d\/functions\r\n\r\nstart() {\r\n        echo \"Starting Seafile server...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh start\"\r\nsu - seafile -c \"seafile-server-latest\/seahub.sh start\"\r\n}\r\n\r\nstop() {\r\n        echo \"Stopping Seafile process...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh stop\"\r\nsu - seafile -c \"seafile-server-latest\/seahub.sh stop\"\r\n}\r\n\r\nrestart() {\r\n        echo \"Stopping Seafile process...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh stop\"\r\nsu - seafile -c \"seafile-server-latest\/seahub.sh stop\"\r\n\r\n         echo \"Starting Seafile server...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh start\"\r\nsu - seafile -c \"seafile-server-latest\/seahub.sh start\"\r\n}\r\n\r\ncase \"$1\" in\r\n    start)\r\n       start\r\n        ;;\r\n    stop)\r\n       stop\r\n        ;;\r\n    restart)\r\n       restart\r\n        ;;\r\n        *)\r\n      echo \"Usage: $0 start stop restart\"\r\n        ;;\r\nesac<\/pre>\n<p><strong>11.<\/strong>\u00a0After\u00a0<b>init<\/b>\u00a0file has been created, make sure it has execution permissions and manage the process using\u00a0<b>start<\/b>,\u00a0<b>stop<\/b>\u00a0and\u00a0<b>restart<\/b>\u00a0switches. Now you can add Seafile service on system start-up using\u00a0<b>chkconfig<\/b>\u00a0command.<\/p>\n<pre># chmod +x \/etc\/init.d\/seafile\r\n# service seafile start \r\n# service seafile stop \r\n# service seafile restart\r\n# chkconfig seafile on | off\r\n# chkconfig --list seafile<\/pre>\n<div id=\"attachment_7648\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7648\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-12-620x355.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-12-620x355.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-12.png 941w\" alt=\"Start Seafile Service\" width=\"620\" height=\"355\" aria-describedby=\"caption-attachment-7648\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7648\" class=\"wp-caption-text\">Start Seafile Service<\/p>\n<\/div>\n<div id=\"attachment_7649\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7649\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-13-620x193.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-13-620x193.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-13.png 991w\" alt=\"Add Seafile Service on Startup\" width=\"620\" height=\"193\" aria-describedby=\"caption-attachment-7649\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7649\" class=\"wp-caption-text\">Add Seafile Service on Startup<\/p>\n<\/div>\n<p><strong>12.<\/strong>\u00a0By default Seafile server uses\u00a0<b>8000<\/b>\/<b>TCP<\/b>\u00a0HTTP port for web transactions. If you want to access Seafile Server from browser on standard HTTP port use the following\u00a0<b>init<\/b>\u00a0script which starts the server on port\u00a0<b>80<\/b>\u00a0(be aware that starting a service on ports below\u00a0<b>1024<\/b>\u00a0requires root privileges).<\/p>\n<pre># nano \/etc\/init.d\/seafile<\/pre>\n<p>Add the following content on this\u00a0<b>init<\/b>\u00a0script to start Seafile on standard HTTP port. If Seafile is installed on other system user make sure to update user and paths accordingly on\u00a0<b>su \u2013 $USER -c<\/b>\u00a0and\u00a0<b>$HOME<\/b>\u00a0lines.<\/p>\n<pre>#!\/bin\/sh\r\n#chkconfig: 345 99 10\r\n#description: Seafile auto start-stop script.\r\n\r\n# source function library\r\n. \/etc\/rc.d\/init.d\/functions\r\n\r\nstart() {\r\n                echo \"Starting Seafile server...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh start\"\r\n                ## Start on port default 80 http port ##\r\n\/home\/seafile\/seafile-server-latest\/seahub.sh start 80\r\n}\r\n\r\nstop() {\r\n                echo \"Stopping Seafile process...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh stop\"\r\n\/home\/seafile\/seafile-server-latest\/seahub.sh stop\r\n}\r\n\r\nrestart() {\r\n      echo \"Stopping Seafile process...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh stop\"\r\n\/home\/seafile\/seafile-server-latest\/seahub.sh stop\r\n                 echo \"Starting Seafile server...\"\r\nsu - seafile -c \"seafile-server-latest\/seafile.sh start\"\r\n\/home\/seafile\/seafile-server-latest\/seahub.sh start 80\r\n}\r\n\r\ncase \"$1\" in\r\n    start)\r\n       start\r\n        ;;\r\n    stop)\r\n       stop\r\n        ;;\r\n     restart)\r\n       restart\r\n        ;;\r\n                *)\r\n        echo \"Usage: $0 start stop restart\"\r\n        ;;\r\nEsac<\/pre>\n<p><strong>13.<\/strong>\u00a0If you previously started Seafile on port\u00a0<b>8000<\/b>\u00a0make sure all processes are killed, start the server on port 80.<\/p>\n<pre># chmod +x \/etc\/init.d\/seafile\r\n# service seafile start | stop | restart<\/pre>\n<p>Open a browser and direct it to the following address.<\/p>\n<pre>http:\/\/system_ip \r\n\r\nOR\r\n\r\nhttp:\/\/domain_name.tld<\/pre>\n<div id=\"attachment_7650\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7650\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-14-620x321.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-14-620x321.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-14.png 934w\" alt=\"Start Seafile Service on Port 80\" width=\"620\" height=\"321\" aria-describedby=\"caption-attachment-7650\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7650\" class=\"wp-caption-text\">Start Seafile Service on Port 80<\/p>\n<\/div>\n<div id=\"attachment_7651\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7651\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-15-620x340.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-15-620x340.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-15-1024x562.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-15.png 1108w\" alt=\"Seafile Login Panel\" width=\"620\" height=\"340\" aria-describedby=\"caption-attachment-7651\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7651\" class=\"wp-caption-text\">Seafile Login Panel<\/p>\n<\/div>\n<p><strong>14.<\/strong>\u00a0You can also verify on what ports Seafile is running using\u00a0<b>netstat<\/b>\u00a0command.<\/p>\n<pre># netstat -tlpn<\/pre>\n<div id=\"attachment_7652\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7652\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-16-620x185.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-16-620x185.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/06\/Install-Seafile-in-Linux-16.png 934w\" alt=\"Verify Seafile Service\" width=\"620\" height=\"185\" aria-describedby=\"caption-attachment-7652\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-7652\" class=\"wp-caption-text\">Verify Seafile Service<\/p>\n<\/div>\n<p>That\u2019s it! Seafile can happily replace other cloud collaborative and file syncing platforms like public\u00a0<b>Dropbox<\/b>,\u00a0<b>Owncloud<\/b>,\u00a0<b>Pydio<\/b>,\u00a0<b>OneDrive<\/b>, etc on your Organization, being designed for better teamwork and full control over your storage with advanced security in user-space.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/install-seafile-in-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seafile\u00a0is an advanced Open Source collaborative cloud storage application written in Python with file sharing and syncing support, team collaboration and privacy protection using client side encryption. It\u2019s build as a multi-platform file syncing with clients that runs on all major platforms (Linux, Raspberry Pi, Windows, Mac, iPhone and Android) and can be easily integrated &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/installing-seafile-secure-cloud-storage-with-mysql-database-in-rhel-centos-sl-7-x-6-x\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing Seafile (Secure Cloud Storage) with MySQL Database in RHEL\/CentOS\/SL 7.x\/6.x&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12777","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12777"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12777\/revisions"}],"predecessor-version":[{"id":12778,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12777\/revisions\/12778"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}