1. Mount the external hard disk

I’m using a formatted, empty hard drive, and I plug it into the USB.

sudo fdisk -l
Copy the code

You can see the external hard drive

/dev/sda1 is my external hard drive. Next, mount the hard disk, create a new directory under/MNT, and then execute the command to mount.

sudo mount /dev/sda1 /mnt/seafile
Copy the code

If an error message is displayed indicating that the mount has been mounted, unmount the mount first

sudo umount /dev/sda1
Copy the code

Then you can mount it again. This is a temporary mount. If you restart raspberry PI, you need to mount it again. You can automatically mount the device when you start up. After you change the /etc/fstab file, you can restart the raspberry PI system. And after hours of searching, he couldn’t solve it, so he had to re-burn the system.

2. Install seafile

It is said online that mysql needs to be installed in Seafile, but sqlite3 is used when running the installation script, which needs to be installed here first.

sudo apt install sqlite3
Copy the code

Seafile Download address



Choose this in~/PublicLet’s make a new oneseafileFolder, withwgetDownload the installation package and decompress it

The tar - ZXVF seafile - server - 8.0.5 - arcade - armv7l. Tar. GzCopy the code

Go to the folder of seafile-server-8.0.5, there are several files that need to be changed and specified to the mounted external hard disk. setup-seafile.sh



seafile.sh



seahub.sh



If you do not change the password, the uploaded file will be directly saved to the current installation directory.

The next step is to execute the installation script

./setup-seafile.sh
Copy the code

After the installation, go back to the previous directory, ~/Public/seafile, you will see a conf folder, open gunicorn.conf.py, here need to change 127.0.0.1 to 0.0.0.0, otherwise only raspberry PI native access.



And then we go intoSeafile - server - 8.0.5Directory, run two commands to start itseafileandseahub

sudo ./seafile.sh start
sudo ./seahub.sh start
Copy the code

When seaHub is launched, you will be asked to fill in an administrator’s email and password, and then you can access it.



I uploaded two files

df -h
Copy the code

Take a look at the hard disk space