Synology NAS uses CentOS 7 through Docker

I want to review some operations of LINUX recently. Many training institutions recommend using Alibaba Cloud for free trial products or using pay-as-you-go billing. I suddenly thought that the purchased Synology NAS can use docker , can I use LINUX with container technology? It can be used through experiments, how to install and configure, please see the following.

1. Start Docker

1. Start Docker in the kit. This is very simple, so I won’t go into details.

2. Look for centos in the Docker registry, you can find it in the search box, or look at the second item directly, just double click

3. Double click , You need to select the version. Through practice, it is found that centos 8 cannot be installed as follows. The main reason is that centos 8 does not have the passwd command to use.

4. After the download is complete, you can double-click to use it. Note that the file size is more than 200M. There will be a prompt if the download is not completed

2. Configure span _strong2

1. See the enabled content in the container

2. Right-click the corresponding container,Select "Edit"

3. Write the container name and check to enable automatic restart

4. Edit the file location and select Add folder

img7p7p _p

5. Note that the data port number is required here

(Note that this port needs to be remembered for subsequent configuration, and port 2223 is used later in this case)

3. Configure SSH

1. Install the yum package

Double-click the container, click the terminal label, if there is nothing, you can hit enter and wait for the command line to display _p9p0

_p9p0



2. First update the system: yum -y update

yum package required for installation: yum install vim openssl openssh-server net-tools initcodes 119 install vim openssl openssh-server net-tools initscripts -y

3. Create SHELL KEY

  ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_k ey -N'' ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N'' ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N''  

4. Modify sshd_config

  vi /etc/ssh/  ssh  d_config  

5. Modify the configuration file,If you don’t know how to use vim , please pay attention to two points: 1. Enter i to enter the insert format. 2. Modify the relevant parameters. 3. Press ESC to exit, modify the format, and enter :, and then enter wq to exit.

The modified content is as follows, pay attention to remove the comment symbol # in front of each line:

  Port 2223 AddressFamily any ListenAddress 0.0.0.0 ListenAddress :: PermitRootLogin yes PasswordAuthentication yes ChallengeResponseAuthentication no UsePAM yes  

Please refer to the following figure:


6. Start ssh,And change to automatically start

  /usr/sbin/sshd -D &echo "/usr/sbin/sshd -D &" >> /etc/rc.local  

7. Modify the root password, pay attention If you use CENTOS 8, you will not be able to use this function

  passwd root  

8. Then the environment is configured, you can use SHELL to log in and use it~


Hadoop , start the next big data learning step

.