离线安装大全
tar打包解压打包文件夹 test,命名为test.tartar -cvf test.tar test/解包文件夹tar -xvf test.tar离线安装dockerdocker下载地址https://download.docker.com/linux/centos/离线安装yum包
·
tar打包解压
【离线】打包文件夹 test,命名为test.tar
tar -cvf test.tar test/
【离线】解包文件夹
tar -xvf test.tar
离线安装yum包
【在线】安装yum下载工具
yum install yum-utils -y
【在线】下载依赖包到本地
yumdownloader --resolve --destdir /home/yum/policycoreutils-python policycoreutils-python
# 也可用 会下载所有依赖
repotrack --download_path=/home/yum/policycoreutils-python policycoreutils-python
【离线】/home/yum/policycoreutils-python 复制到离线机器上
rpm -ivh *.rpm
离线安装docker
【在线】添加docker repo
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
【在线】下载依赖包
yumdownloader --resolve --destdir /home/yum/docker-ce docker-ce
【离线】/home/yum/docker-ce 复制到离线机器上
rpm -ivh *.rpm
附:
docker下载地址 https://download.docker.com/linux/centos/
离线下载docker镜像redis,mysql
【在线】下载依赖包
docker pull mysql:5.7
docker pull redis:latest
docker save -o docker.registry mysql:5.7 redis:latest
【离线】加载依赖包
docker load -i docker.registry
docker 启动mysql
docker run --name mysql5.7-test -p 3307:3306 -e MYSQL_ROOT_PASSWORD=123456 -v /root/docker/mysql5.7/conf/my.cnf:/etc/mysql/my.cnf -v /root/docker/mysql5.7/logs:/logs -v /root/docker/mysql5.7/data:/var/lib/mysql mysql:5.7
mysql常用配置
[mysqld]
lower_case_table_names=1
default-time-zone = '+8:00'
max_allowed_packet = 67108864
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
docker 启动redis
docker run -itd --name redis-test -p 6379:6379 redis --requirepass "redis123456aB"
更多推荐
已为社区贡献1条内容
所有评论(0)