Skip to content

Synology tutorial for creating blossom

TIP

This article is reprinted from: Blackcurrant and Lilac "Synology Tutorial on Creating Blossom"

1. Install database

1.1 Open Synology Package Center, search for "MariaDB" and click to install.

1.2 During installation, you will be asked to fill in a password. Note that the password must contain uppercase and lowercase letters, numbers, and special symbols. Note that previously installed mysql database may cause the 3306 port to be duplicated and cannot be installed. Please modify the port of the previous mysql database.

1.3 After the installation is complete, open the MariaDB database and check to enable TCP/IP connection

1.4 Open the Synology Control Panel - Terminal and SNMP and check to enable the ssh function. The default port does not need to be modified.

1.5 Use the command ssh aaa@x.x.x.x -p 22 (aaa Synology login name, x.x.x.x Synology ip 22ssh port) on the computer in the terminal (windows (win+r input cmd) mac search "terminal") and press Enter Enter the Synology password to enter ssh.

1.6 Enter mysql -u root -p in ssh. After pressing Enter, you will be asked to enter the password created by MariaDB and enter the mysql command; enter use mysql to use the database; continue to follow the steps and enter UPDATE mysql.global_priv SET Host=' %' WHERE User='root'; flush privileges;These two commands enable the database to support remote access.

The complete command is as follows:

sql
mysql -u root -p

use mysql;

UPDATE mysql.global_priv SET Host='%' WHERE User='root';

flush privileges;
mysql -u root -p

use mysql;

UPDATE mysql.global_priv SET Host='%' WHERE User='root';

flush privileges;

1.7 Enter the following command to create a database instance. At this point, the database operation has been created.

sql
CREATE DATABASE `blossom` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE DATABASE `blossom` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

Note: Remember to add ; at the end of the Sql command

2. Install blomssom

2.1 In Synology File Management, create the blossom folder under the docker directory, create the bl folder under the blossom folder, and continue to create img under the bl folder. Set the everyone user permissions to all permissions in the properties of the blossom folder.

2.2 Use the command cd / on ssh to switch to the initial directory; use the command cd volume1 to go to the Synology root directory, and use the command cd docker/blossom to switch to the blossom directory.

2.3 Enter in the blossom directory

bash
sudo docker run -d --net=host --name blossom-backend -p 9999:9999 -v /volume1/docker/blossom/bl/:/home/bl/ jasminexzzz/blossom:latest --project.iaas.blos .domain="http://127.0.0.1:9999/pic/" --project.iaas.blos.default-path="/home/bl/img/" --spring.datasource.url="jdbc:mysql ://xx.xx.xx.xx:3306/blossom?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&allowMultiQueries=true&useSSL=false&&serverTimezone=GMT%2B8" --spring.datasource.username=root --spring.datasource.password= aaaa
sudo docker run -d --net=host --name blossom-backend -p 9999:9999 -v /volume1/docker/blossom/bl/:/home/bl/ jasminexzzz/blossom:latest --project.iaas.blos .domain="http://127.0.0.1:9999/pic/" --project.iaas.blos.default-path="/home/bl/img/" --spring.datasource.url="jdbc:mysql ://xx.xx.xx.xx:3306/blossom?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&allowMultiQueries=true&useSSL=false&&serverTimezone=GMT%2B8" --spring.datasource.username=root --spring.datasource.password= aaaa

Change xx.xx.xx.xx in the above document to your Synology IP, change aaaa to the password of your database, and then execute the command

The execution of the above command requires root user permissions. Add sudo before the command and enter the current user's password after execution, not the root password.

2.4 After inputting, wait for the command to be completed, then enter sudo docker logs blossom-backend to check whether the installation is successful and the installation log. Generally, the following log appears, which means that you have completed the installation and you can use it.

3. Other reference materials

4.Thank you

Finally, I would like to thank the big guys in the group for their help, @小贼贼子大佬 for his help and @随风大佬 for his Qunhui installation tutorial.

Blossom Document