Toggle navigation

Seafile Image Guide

Version 6.2.5

Websoft9 Seafile is a pre-configured, ready to run image for running Seafile on Cloud.

Seafile is an enterprise file hosting platform with high reliability and performance. Put files on your own server. Sync and share files across different devices, or access all the files as a virtual disk.Organize files into libraries. A library can be selectively synced into any device. Reliable and efficient file syncing improves your productivity.

Application directory(Seafile)
Seafile directory: /opt/seafile
Seafile configuration file: /opt/seafile/conf/seahub_settings.py

Infrastructure(Nginx1.12,memcached)
Nginx configutation file: /etc/nginx/conf.d/seafile.conf

Database(MariaDB)
MariaDB directory: /var/lib/mysql

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address and you can enter the installation page directly,if there no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

When you have intall the Seafile Image, you should access the installation page and complete the installation wizard for the following steps:

  1. If you have domain,please complete the domain setting first  (refer to How to set Domain Name?),then use browser to visit: http://domain to start the installation
  2. Use comand to modify the MySQL password
    [root@iz2ze22sviai20tz ~]# mysqladmin -uroot -p123456 password 'mynewpw'   
  3. Modify the configuration file:/opt/seafile/conf/seahub_settings.py:
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'seahub_db',
            'USER': 'root',
            'PASSWORD': '123456', //suggest
            'HOST': '127.0.0.1',
            'PORT': '3306'
        }
    }
    
    ...
    SITE_BASE                           = 'http://127.0.0.1 or *'  //127.0.0.1 or * to your domain or Internet IP
    FILE_SERVER_ROOT             = 'http://127.0.0.1/seafhttp' //127.0.0.1 to your domain or Internet IP
    
  4. Restart Server
  5. Use Chrome or Firefox to visit the:http://Internet IP/,you can see the log in page of Seafile(Default account is admin@seafile.local/admin123)
  6. Log in to backend,start to use Seafile

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、Seafile:Username and Password is admin@seafile.local/admin123
2、MySQL Database:Default username and password is root/123456
Control Panel URL:http://Internet IP Address/phpmyadmin
3、Linux Server:Username is root,Password is set by youself when buying.
Please Using the Putty for ssh remote and WinSCP for SFTP

Note:You can reset the password of OS through Cloud Console if you have forgotten it

Connect to a Linux instance using Windows OS

This section uses PuTTY as an example. PuTTY can be downloaded here.

You can connect to a Linux instance via PuTTY as follows:

  1. Start Putty.exe.
  2. Enter the public IP address of the instance in Host Name (or IP address).
  3. Use the default port 22.
  4. Select SSH as Connection Type.
  5. Type a session name in Saved Sessions, and then click Save. In later logins, you may directly load the session without re-entering the IP address.
  6. Click Open to connect.
  7. Upon first connection, the following dialog box will be displayed. Click Yes.
  8. As prompted, enter the username and password for the Linux ECS instance. The password will not be displayed on-screen. Press the Enter key to complete connection to the instance.

When you connect your computer to the Linux instance successfully, you can operate the instance from your computer.

Use SFTP you can mange file,upload and download file,configure Server.

  1. Start WinSCP. Login Dialog will appear.
  2. Then select your File protocol(SFTP) on the dialog
  3. Enter your host name to Host name field, username to User name and password to Password like below
  4. You may want to save your session details to a site so you do not need to type them in every time you want to connect. Press Save button and type site name.
  5. When appear the dialog below,please select the “yes”
  6. You can manane Linux file below
  7. WinSCP can integrate the Putty and transfer the log in information to Putty
  8. Now you can use Putty(Not need to log in) from the menu bar of WinSCP

You need do complete two steps on this Stack for using Domain Name to visit your site:

Step1: Domain Name Resolution

Domain Name Resolution indicates the way your domain names are resolved to their mapped IP address. The majority of resolutions from domain names to IP addresses are done through a procedure called DNS. After the resolution, the domain name can be used to access Internet in a much more convenient way.

You can use Alibaba Cloud DNS in sync with the Domain service. Alibaba Cloud DNS provides authoritative DNS servers and DNS management services.

  1. Login Cloud Console->DNS Settings->Add Record,set Domain Resolution:
  2. The type is A record,host is your sub domain,value is your Internet IP Address.Confirm it
    Host use @ to exactly match the original domain name (for example, yourdomain.tld).
  3. After the Domain Name Resolution please waite for some time until it’s useful(This time is different for different provider of Domain,from 1 minute to 24h)

Note:Please clear the browser cache when Domain Name Resolution is useful but you browser seem is also feedback the old contents of your site

Step2: Binding Domain on Seafile

Modify the configuration file:/opt/seafile/conf/seahub_settings.py:

...
SITE_BASE                           = 'http://127.0.0.1'  //127.0.0.1 to your domain name
FILE_SERVER_ROOT             = 'http://127.0.0.1/seafhttp' //127.0.0.1 to your domain name

Refer to:https://manual-cn-origin.seafile.com/config/sending_email.html

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup,manual local backup,using plugin to backup in three ways, three of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Restore

If you have Snapshot of Server,you can restore all the data by click on button

You should always maintain regular backups and make a fresh backup before every upgrade.

Then review third-party apps, if you have any, for compatibility with the new ownCloud release. Any apps that are not developed by ownCloud show a 3rd party designation. Install unsupported apps at your own risk. Then, before the upgrade, all 3rd party apps must be disabled. After the upgrade is complete you may re-enable them.

Upgrading ownCloud with the Updater App

The Updater app automates many of the steps of upgrading an ownCloud installation. It is useful for installations that do not have root access, such as shared hosting, for installations with a smaller number of users and data, and it automates updating manual installations.

You should maintain regular backups (see Backing up ownCloud), and make a backup before every update. The Updater app does not backup your database or data directory.

The Updater app performs these operations:

  • Creates an updater_backup directory under your ownCloud data directory
  • Downloads and extracts updated package content into the updater_backup/packageVersion directory
  • Makes a copy of your current ownCloud instance, except for your data directory, to updater_backup/currentVersion-randomstring
  • Moves all directories except dataconfig and themes from the current instance to updater_backup/tmp
  • Moves all directories from updater_backup/packageVersion to the current version
  • Copies your old config.php to the new config/ directory

Using the Updater app to update your ownCloud installation is just a few steps:

  1. You should see a notification at the top of any ownCloud page when there is a new update available.
  2. Even though the Updater app backs up important directories, you should always have your own current backups (See Backing up ownCloud for details.)
  3. Verify that the HTTP user on your system can write to your whole ownCloud directory; see the Setting Permissions for Updating section below.
  4. Navigate to your Admin page and click the Update Center button under Updater. This takes you to the Updater control panel.
  5. Click Update, and carefully read the messages. If there are any problems it will tell you. The most common issue is directory permissions; your HTTP user needs write permissions to your whole ownCloud directory. (See Setting Strong Directory Permissions.) Another common issue is SELinux rules (see SELinux Configuration.) Otherwise you will see messages about checking your installation and making backups.
  6. Click Proceed, and then it performs the remaining steps, which takes a few minutes.
  7. If your directory permissions are correct, a backup was made, and downloading the new ownCloud archive succeeded you will see the following screen. Click the Start Update button to complete your update:It runs for a few minutes, and when it is finished displays a success message, which disappears after a short time.
  8. Refresh your Admin page to verify your new version number. In the Updater section of your Admin page you can see the current status and backups. These are backups of your old and new ownCloud installations, and do not contain your data files. If your update works and there are no problems you can delete the backups from this screen.If the update fails, then you must update manually. (See Manually upgrading.)

These command you may be use:

~# cd /data/wwwroot/default  //go to directory
~# reboot //restart server
~# wget url  //download
~# unzip xx.zip //unzip

~# systemctl restart nginx  //restart nginx
~# systemctl restart php-fpm //restart php-fpm
~# systemctl start | stop | restart mysqld //restart mysql

~# yum update -y 
~# yum upgrade -y 

This document is original from Websoft9.In order to ensure the seriousness and usability of the documentation, no one may misappropriate or modify the second distribution. The need for friends reproduced please mark the source, otherwise we reserve the right to give legal action.

We will periodically update the documentation. Please visit the online documentation for the latest version

This document URL: http://en.websoft9.com/xdocs/seafile-image-guide/
Support & Partnership: http://www.websoft9.com

Need more same solution like Owncloud,please read:Best DIY Cloud Storage Tools