The virtual machine VMware + Centos
Ifconfig cannot be used when installing centos
Modify the /etc/sysconfig/network-scripts/ifcfg-ens33 file
Modify the ONBOOT=yes configuration
Run the service network restart command to restart the service.
Run yum Search ifconfig
If ifConfig matches nettools. x86_64, install nettools. x86_64
Yum install net-tools.x86_64
Install the Docker environment
Log in to Centos as user root. Make sure the YUM package is up to date
Sudo yum update
Install the required package, yum-util provides yum-config-manager functionality, the other two are dependent on the Devicemapper driver
Lvm2 command: yum install -y yum-utils device-mapper-persistent-data lvm2
Set the yum source
Command: yum – config manager – add – repo download.docker.com/linux/cento… This is an order.
Install the docker
Yum install docker-ce
Start Docker and set it to boot
Command: systemctl start docker command: systemctl enable docker
Configure the Docker image accelerator
Log in ali Cloud, enter the console, and find the mirror service
Add daemon.json and configuration contents to the docker configuration file by executing the command to operate the document
Docker installation development required environment, mysql, Redis, MQ, etc
Matters needing attention
hub.docker.comImage of each software supported by Docker
When each container is started, add the container with docker start automatically –restart=always
Mysql > Update mysql
–lower_case_table_names=1; otherwise, after the container is started, the startup configuration cannot be changed. The container must be deleted and reconfigured
Note: Boot auto start can be configured after the container runs
Command: docker update – restart = always [container name | id]
-
-
- Sudo docker pull mysql: 5.7
-
- sudo docker run -p 3306:3306 –name mysql \
-v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql -e MYSQL_ROOT_PASSWORD = root – d mysql: 5.7
- Parameters:
-p 3306, 3306: the container port 3306 is mapped to a host of port 3306, – name: give a name, container – v/mydata/mysql/log: / var/log/mysql: the configuration file mount to the host/mydata /.. • -e MYSQL_ROOT_PASSWORD=root: Initializes the password of user root
Rabbitmq Precautions
Problem: Inaccessible
Docker execit rabbitmq-plugins enable rabbitmq_management Exit and restart the MQ container
Docker install rabbitMQ delay queue plugin
Download the plugin www.rabbitmq.com/community-p…
Upload plug-ins to centos/MNT Install RZ Linux upload files and download software functions
1, first check whether rZ is installed, sZ module command: rz
Yum search sz yum search sz yum search sz
Yum install lrzsz.x86_64
Upload command: rz Download: sz
Copy files to plugins: docker cp/MNT /rabbitmq_delayed_message_exchange-3.8.0.ez
Docker exec it [container name] /bin/bash
Under the container plugins directory, check to see if the plugin uploaded successfully ls -l | grep delay
Run rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Restart container: docker restart container name
Log in to the RabbitMQ Web management interface
After the container has been restarted, we can go to the RabbitMQ Web management interface, under the Exchanges TAB, click Add a new Exchange and see if the X-delayed – Message option appears in Type. The installation process is complete as shown below