* 添加离线部署docker和离线部署minio实践

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>

Co-authored-by: Daiwj <daiwj@zz3s.com>
pull/448/head
Kang Huaishuai 2020-04-26 09:42:59 +08:00 committed by GitHub
parent 34b6b617b9
commit ff28d7219d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 315 additions and 0 deletions

View File

@ -140,6 +140,7 @@ module.exports = {
'fedora', 'fedora',
'centos', 'centos',
'raspberry-pi', 'raspberry-pi',
'offline',
'mac', 'mac',
'windows', 'windows',
'mirror', 'mirror',
@ -376,6 +377,7 @@ module.exports = {
'appendix/repo/wordpress', 'appendix/repo/wordpress',
'appendix/repo/mongodb', 'appendix/repo/mongodb',
'appendix/repo/redis', 'appendix/repo/redis',
'appendix/repo/minio',
], ],
}, },
{ {

View File

@ -16,6 +16,7 @@
* [Fedora](install/fedora.md) * [Fedora](install/fedora.md)
* [CentOS](install/centos.md) * [CentOS](install/centos.md)
* [Raspberry Pi](install/raspberry-pi.md) * [Raspberry Pi](install/raspberry-pi.md)
* [Linux 线](install/offline.md)
* [macOS](install/mac.md) * [macOS](install/mac.md)
* [Windows 10](install/windows.md) * [Windows 10](install/windows.md)
* [](install/mirror.md) * [](install/mirror.md)
@ -161,6 +162,7 @@
* [WordPress](appendix/repo/wordpress.md) * [WordPress](appendix/repo/wordpress.md)
* [MongoDB](appendix/repo/mongodb.md) * [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md) * [Redis](appendix/repo/redis.md)
* [Minio](appendix/repo/minio.md)
* [Docker ](appendix/command/README.md) * [Docker ](appendix/command/README.md)
* [ - docker](appendix/command/docker.md) * [ - docker](appendix/command/docker.md)
* [ - dockerd](appendix/command/dockerd.md) * [ - dockerd](appendix/command/dockerd.md)

View File

@ -0,0 +1,62 @@
# minio
[TOC]
MinIO Apache License v2.0S3/kb5T
MinIO, NodeJS, Redis MySQL
[](https://docs.min.io/)
## 使
使
```bash
docker pull minio/minio
docker run -p 9000:9000 minio/minio server /data
```
## 线
###
`minio/minio`
```bash
docker save -o minio.tar minio/minio:latest
```
<!--使docker save 使image id 使+tag-->
###
使
```bash
docker load minio.tar
```
### minio
- /mnt/data
- MINIO_ACCESS_KEY
- MINIO_SECRET_KEY
- name,minio1()
- 9000,:9009:9000
```bash
sudo docker run -d -p 9000:9000 --name minio1 \
-e "MINIO_ACCESS_KEY=改成自己需要的" \
-e "MINIO_SECRET_KEY=改成自己需要的" \
-v /mnt/data:/data \
--restart=always \
minio/minio server /data
```
### 访 web
http://x.x.x.x:9000/minio/

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

249
install/offline.md 100644
View File

@ -0,0 +1,249 @@
# 线Docker
[TOC]
线`Docker`
<img src="_images/image-20200412202617411.png" alt="Docker-offile-install-top" style="zoom:30%;" />
## Centos7 线Docker
### YUM
使
#### (A)
```bash
#
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
yum update
```
```bash
sudo yum list docker-ce --showduplicates|sort -r
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror
docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.7-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.6-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.5-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.4-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.3-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable
....
```
#### (A)
```bash
sudo yum install --downloadonly --downloaddir=/tmp/docker-19.03 docker-ce-19.03.8-3.el7 docker-ce-cli-19.03.8-3.el7
```
```bash
Dependencies Resolved
====================================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================================
Installing:
docker-ce x86_64 3:19.03.8-3.el7 docker 25 M
Installing for dependencies:
container-selinux noarch 2:2.107-3.el7 extras 39 k
containerd.io x86_64 1.2.13-3.1.el7 docker 23 M
docker-ce-cli x86_64 1:19.03.8-3.el7 docker 40 M
Transaction Summary
====================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 87 M
Installed size: 363 M
Background downloading packages, then exiting:
(1/4): container-selinux-2.107-3.el7.noarch.rpm | 39 kB 00:00:00
(2/4): containerd.io-1.2.13-3.1.el7.x86_64.rpm | 23 MB 00:00:00
(3/4): docker-ce-19.03.8-3.el7.x86_64.rpm | 25 MB 00:00:00
(4/4): docker-ce-cli-19.03.8-3.el7.x86_64.rpm | 40 MB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 118 MB/s | 87 MB 00:00:00
exiting because "Download Only" specified
```
#### (C-N)
```bash
yum install *.rpm
```
#### (C-N)
#####
```bash
sudo yum install yum-plugin-versionlock
```
#####
```bash
sudo yum versionlock add docker
```
#####
```bash
sudo yum versionlock list
```
```bash
Loaded plugins: fastestmirror, versionlock
3:docker-ce-18.09.9-3.el7.*
versionlock list done
```
#####
```bash
sudo yum install docker-ce
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Package 3:docker-ce-18.09.9-3.el7.x86_64 already installed and latest version
Nothing to do
```
#####
```bash
sudo yum versionlock delete docker-ce
```
```bash
Loaded plugins: fastestmirror, versionlock
Deleting versionlock for: 3:docker-ce-18.09.9-3.el7.*
versionlock deleted: 1
```
#####
```bash
sudo yum versionlock delete all
```
### YUM Docker
#### ISO File AB
```bash
#
rm -f /etc/yum.repo.d/*
# iso
mount /dev/cdrom /mnt
```
```bash
#
cat >/etc/yum.repos.d/local_files.repo<< EOF
[Local_Files]
name=Local_Files
baseurl=file:///mnt
enable=1
gpgcheck=0
gpgkey=file:///mnt/RPM-GPG-KEY-CentOS-7
EOF
```
```bash
# ,createrepo
yum clean all
yum install createrepo -y
```
#### BASEB
```bash
# apache
yum install httpd -y
#
mount /dev/cdrom /mnt
# centos
mkdir /var/www/html/base
#
cp -R /mnt/Packages/* /var/www/html/base/
createrepo /var/www/html/centos/
systemctl enable httpd
systemctl start httpd
```
#### Docker-CE A
Docker-ce
```bash
#
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
```
```bash
# docker-ce
mkdir /tmp/docker-ce/
#
reposync -r docker-ce-stable -p /tmp/docker-ce/
```
#### B
docker-ce 线
```bash
# docker-ce /var/www/html/docker-ce
#
createrepo /var/www/html/docker-ce/
```
#### YUM C...N
```bash
rm -f /etc/yum.repo.d/*
cat >/etc/yum.repos.d/local_files.repo<< EOF
[local_base]
name=local_base
# B
baseurl=http://x.x.x.x/base
enable=1
gpgcheck=0
proxy=_none_
[docker_ce]
name=docker_ce
# B
baseurl=http://x.x.x.x/base
enable=1
gpgcheck=0
proxy=_none_
EOF
```
#### Docker C...N
```bash
sudo yum makecache fast
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl enable docker
```