CentOS 7 use seafile to create a personal cloud

Source: Internet
Author: User
Tags seafile pkill

CentOS 7 use seafile to create a personal cloud

Official Tutorial: http://manual-cn.seafile.com/

Installation environment
Install a clean CentOS 7 64-bit system and switch to the root account

1. Obtain the Seafile installation script
The installation script can help you quickly install the Seafile server, configure MariaDB, Memcached, WebDAV, Ngnix, and automatically start the script at startup. Note that the installation script creates a seafile system user and runs the Seafile service with this user. You must use this user to perform the upgrade steps to ensure the correctness of file permissions. For details, see the end of this article.
# Wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-centos-7-amd64-http
# Bash seafile-server-installer-cn/master/seafile-server-centos-7-amd64-http 5.1.3

2. Deployment and Directory design
Assuming your company name is haiwen, you have also downloaded seafile-server_1.4.0 _ * to your home
Directory. We recommend the following directory structure:
# Mkdir haiwen
# Mv seafile-server _ * haiwen
# Cd haiwen
After you move seafile-server _ * to the haiwen directory
# Tar-xzf seafile-server _*
# Mkdir installed
# Mv seafile-server _ * installed

Now, your directory looks like this:
# Tree haiwen-L 2
Haiwen
── Installed
│ ── Seafile-server_1.8.2_x86-64.tar.gz.
──
Seafile-server-1.8.2
── Reset-admin.sh
── Runtime
── Seafile
── Seafile. sh
── Seahub
── Seahub. sh
── Setup-seafile.sh
──
Upgrade

The benefit of designing a directory in this way is that
Configuration files related to seafile can be stored in the haiwen directory for centralized management.
During subsequent upgrades, you only need to extract the latest installation package to the haiwen directory.

3. Install mysql

4. Install the Seafile Server
Preparations before installation
Before installing the Seafile server, make sure that you have installed the following software:
Python 2.7 (starting from Seafile 5.1, the minimum python version requirement is 2.7)
Python-setuptools
Python-imaging
Python-mysqldb
Python-ldap
Python-urllib3
Python-memcache (or python-memcached)

Under CentOS 7
# Yum install python-setuptools python-imaging python-ldap MySQL-python-memcached python-urllib3
Install
# Cd seafile-server -*
#./Setup-seafile-mysql.sh # Run the installation script and answer the default questions
If the above software is not installed in your system, the Seafile initialization script will remind you to install
Software packages.
This script will ask you some questions in sequence, and then guide you step by step to configure the parameters of Seafile:

Deploy Seafile Server
Parameter description
Seafile server name, which is no longer used
3 ~ 15 characters long and can contain English letters, numbers, and underscores
Seafile server ip or domain seafile server IP address or domain name
The client will use this IP address to access the directory where your Seafile service seafile data dir seafile data is stored. In the example above, the default value is/data/haiwen/seafile-data seafile. The data will gradually increase as you use it. Put it in a partition with enough free space.
Seafile fileserver port the TCP port used by seafile fileserver. This port is used for file synchronization. Use the default 8082 port and cannot be changed.

Here, you will be asked to select a method to create a Seafile database:
-------------------------------------------------------
Please choose a way to initialize seafile databases:
-------------------------------------------------------
[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases
If you select 1, you need to provide the root password. The script program will create databases and users.
If you select 2, The ccnet/seafile/seahub database should have been created by you (or others) in advance.
If the installation is completed correctly, you will see the following output (the new version may be different)

5. Start the Seafile Server
Start the Seafile server and Seahub website
In the seafile-server-1.8.2 directory, run the following command to start Seafile:
#./Seafile. sh start # start the Seafile Service
Start Seahub
#./Seahub. sh start <port> # start the Seahub website (which runs on port 8000 by default)
Tip: When you start seahub for the first time, the seahub. sh script will prompt you to create a seafile administrator account.
After the service is started, open the browser and enter the following address:
Http: // 192.168.1.111: 8000/
You will be redirected to the login page. Enter the administrator username and password.
Congratulations! Now you have successfully installed the Seafile server.
Run Seahub on another port
If you do not want to run Seahub on the default port 8000, but want to run it on a custom port (such as port 8001), follow these steps:
Disable Seafile Server
#./Seahub. sh stop # stop the Seafile Process
#./Seafile. sh stop # stop Seahub
Change the value of SERVICE_URL in the haiwen/conf/ccnet. conf file (assume that your ip address or domain name is 192.168.1.100) as follows (from version 5.0, you can directly set it on the administrator interface. Note: if this value is set in both the Web interface and configuration file, the configuration of the Web interface prevails .) :
# SERVICE_URL = http: // 192.168.1.100: 8001
Restart Seafile Server
#./Seafile. sh start # start the Seafile Service
#./Seahub. sh start 8001 # start the Seahub website (running on port 8001)
Disable/restart Seafile and Seahub
Close
#./Seahub. sh stop # stop Seahub
#./Seafile. sh stop # stop the Seafile Process
Restart
#./Seafile. sh restart # Stop the current Seafile process and restart Seafile.
#./Seahub. sh restart # Stop the current Seahub process and restart Seahub on port 8000.
If the stop/restart script fails to run, the seafile. sh seahub. sh script works normally in most cases. If you encounter problems:
Run the pgrep command to check whether the seafile/seahub process is still running.
# Pgrep-f seafile-controller # view the Seafile Process
# Pgrep-f "seahub" # view the Seahub Process
Use the pkill command to kill related processes
# Pkill-f seafile-controller # terminate the Seafile Process
# Pkill-f "seahub" # terminate the Seafile Process
OK!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.