Apache安装
1、yum -y install httpd httpd-manual mod_ssl mod_perl
2、systemctl start httpd
3、systemctl enable httpd
安装mysql
1、rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
2、yum -y install mysql-community-server --nogpgcheck
3、systemctl start mysqld
4、systemctl enable mysqld
5、systemctl daemon-reload
6、grep 'temporary password' /var/log/mysqld.log
7、mysql -h127.0.0.1 -uroot -p
8、set password for 'root'@'localhost'=password('Aa@123456789');
9、use mysql;update user set host = '%' where user ='root';flush privileges;
docker安装:
1、sudo yum install -y yum-utils
2、sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3、sudo yum install docker-ce docker-ce-cli containerd.io
4、systemctl start docker
5、vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://mirrors.tuna.tsinghua.edu.cn"]
}
6、sudo systemctl daemon-reload
7、sudo systemctl restart docker
docke可视化安装:
1、docker volume create portainer_data
2、docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
备份mysql
mysqldump -h127.0.0.1 -uroot -pAa@123456789 test111 > 1.sql
恢复mysql
mysql -h127.0.0.1 -uroot -pAa@123456789 test111 < 1.sql