Skip to content

Commit 9e1c26d

Browse files
committed
update
1 parent 670cb8c commit 9e1c26d

File tree

4 files changed

+78
-4
lines changed

4 files changed

+78
-4
lines changed

docker/auto_docker.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
## 自动yum安装Docker,Docker配置yum源 2018-05-16
3+
## http://www.aqzt.com
4+
5+
## robert yu
6+
## redhat 7
7+
8+
##安装
9+
yum install -y yum-utils device-mapper-persistent-data lvm2
10+
yum-config-manager --add-repo http://mirrors.selinux.cn/help/docker-aliyun.repo
11+
yum makecache fast
12+
yum -y install docker-ce
13+
chkconfig docker on
14+
15+
##配置docker源
16+
tee /etc/systemd/system/docker.service <<-'EOF'
17+
[Unit]
18+
Description=Docker Application Container Engine
19+
Documentation=https://docs.docker.com
20+
After=network.target firewalld.service
21+
22+
[Service]
23+
Type=notify
24+
ExecStart=/usr/bin/dockerd --registry-mirror=https://4ux5p520.mirror.aliyuncs.com
25+
ExecReload=/bin/kill -s HUP $MAINPID
26+
LimitNOFILE=infinity
27+
LimitNPROC=infinity
28+
LimitCORE=infinity
29+
TimeoutStartSec=0
30+
Delegate=yes
31+
KillMode=process
32+
33+
[Install]
34+
WantedBy=multi-user.target
35+
EOF
36+
37+
##启动
38+
service docker start
39+
systemctl daemon-reload
40+
service docker restart
41+
docker version

docker/docker_aliyun.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
# https://yq.aliyun.com/articles/110806
3+
# step 1: 安装必要的一些系统工具
4+
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
5+
# Step 2: 添加软件源信息
6+
sudo yum-config-manager --add-repo http://mirrors.selinux.cn/help/docker-aliyun.repo
7+
##sudo yum-config-manager --add-repo https://selinux.cn/docker-ce.repo
8+
# Step 3: 更新并安装 Docker-CE
9+
sudo yum makecache fast
10+
sudo yum -y install docker-ce
11+
# Step 4: 开启Docker服务
12+
sudo service docker start
13+
14+
# 注意:
15+
# 官方软件源默认启用了最新的软件,您可以通过编辑软件源的方式获取各个版本的软件包。例如官方并没有将测试版本的软件源置为可用,你可以通过以下方式开启。同理可以开启各种测试版本等。
16+
# vim /etc/yum.repos.d/docker-ce.repo
17+
# 将 [docker-ce-test] 下方的 enabled=0 修改为 enabled=1
18+
#
19+
# 安装指定版本的Docker-CE:
20+
# Step 1: 查找Docker-CE的版本:
21+
# yum list docker-ce.x86_64 --showduplicates | sort -r
22+
# Loading mirror speeds from cached hostfile
23+
# Loaded plugins: branch, fastestmirror, langpacks
24+
# docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
25+
# docker-ce.x86_64 17.03.1.ce-1.el7.centos @docker-ce-stable
26+
# docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
27+
# Available Packages
28+
# Step2 : 安装指定版本的Docker-CE: (VERSION 例如上面的 17.03.0.ce.1-1.el7.centos)
29+
# sudo yum -y install docker-ce-[VERSION]
30+
31+
#安装校验
32+
docker version

docker/docker_tuna.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# step 1: 安装必要的一些系统工具
44
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
55
# Step 2: 添加软件源信息
6-
sudo yum-config-manager --add-repo https://selinux.cn/docker-ce.repo
6+
sudo yum-config-manager --add-repo http://mirrors.selinux.cn/help/docker-tuna.repo
7+
##sudo yum-config-manager --add-repo https://selinux.cn/docker-ce.repo
78
# Step 3: 更新并安装 Docker-CE
89
sudo yum makecache fast
910
sudo yum -y install docker-ce

mysql/mariadb_auto_install.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
# Filename: install_mariadb.sh
55
# Author: roguo.wei - [email protected]
66
# Description:
7-
# Last Modified: 2017-01-17 00:31
7+
# Last Modified: 2018-04-26 14:31
88
# Version: 1.0
99
###
1010

1111
INSTALL_DIR="/opt/app"
1212
DATA_DIR="/opt/data"
1313
MARIADB_GROUP="mysql"
1414
MARIADB_USER="mysql"
15-
MARIADB_VERSION="10.1.20"
15+
MARIADB_VERSION="10.2.14"
1616
ROOT_PASSWD="root"
17-
#mariadb-10.1.20-linux-x86_64.tar.gz
17+
#mariadb-10.2.14-linux-x86_64.tar.gz
1818
TAR_NAME="mariadb-${MARIADB_VERSION}-linux-x86_64.tar.gz"
1919
UNTAR_NAME="mariadb-${MARIADB_VERSION}-linux-x86_64"
2020

0 commit comments

Comments
 (0)