Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed May 16, 2018
1 parent 670cb8c commit 9e1c26d
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 4 deletions.
41 changes: 41 additions & 0 deletions docker/auto_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
## 自动yum安装Docker,Docker配置yum源 2018-05-16
## http://www.aqzt.com
## email: [email protected]
## robert yu
## redhat 7

##安装
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.selinux.cn/help/docker-aliyun.repo
yum makecache fast
yum -y install docker-ce
chkconfig docker on

##配置docker源
tee /etc/systemd/system/docker.service <<-'EOF'
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target firewalld.service
[Service]
Type=notify
ExecStart=/usr/bin/dockerd --registry-mirror=https://4ux5p520.mirror.aliyuncs.com
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
[Install]
WantedBy=multi-user.target
EOF

##启动
service docker start
systemctl daemon-reload
service docker restart
docker version
32 changes: 32 additions & 0 deletions docker/docker_aliyun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# https://yq.aliyun.com/articles/110806
# step 1: 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# Step 2: 添加软件源信息
sudo yum-config-manager --add-repo http://mirrors.selinux.cn/help/docker-aliyun.repo
##sudo yum-config-manager --add-repo https://selinux.cn/docker-ce.repo
# Step 3: 更新并安装 Docker-CE
sudo yum makecache fast
sudo yum -y install docker-ce
# Step 4: 开启Docker服务
sudo service docker start

# 注意:
# 官方软件源默认启用了最新的软件,您可以通过编辑软件源的方式获取各个版本的软件包。例如官方并没有将测试版本的软件源置为可用,你可以通过以下方式开启。同理可以开启各种测试版本等。
# vim /etc/yum.repos.d/docker-ce.repo
# 将 [docker-ce-test] 下方的 enabled=0 修改为 enabled=1
#
# 安装指定版本的Docker-CE:
# Step 1: 查找Docker-CE的版本:
# yum list docker-ce.x86_64 --showduplicates | sort -r
# Loading mirror speeds from cached hostfile
# Loaded plugins: branch, fastestmirror, langpacks
# docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
# docker-ce.x86_64 17.03.1.ce-1.el7.centos @docker-ce-stable
# docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
# Available Packages
# Step2 : 安装指定版本的Docker-CE: (VERSION 例如上面的 17.03.0.ce.1-1.el7.centos)
# sudo yum -y install docker-ce-[VERSION]

#安装校验
docker version
3 changes: 2 additions & 1 deletion docker/docker_tuna.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# step 1: 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# Step 2: 添加软件源信息
sudo yum-config-manager --add-repo https://selinux.cn/docker-ce.repo
sudo yum-config-manager --add-repo http://mirrors.selinux.cn/help/docker-tuna.repo
##sudo yum-config-manager --add-repo https://selinux.cn/docker-ce.repo
# Step 3: 更新并安装 Docker-CE
sudo yum makecache fast
sudo yum -y install docker-ce
Expand Down
6 changes: 3 additions & 3 deletions mysql/mariadb_auto_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
# Filename: install_mariadb.sh
# Author: roguo.wei - [email protected]
# Description:
# Last Modified: 2017-01-17 00:31
# Last Modified: 2018-04-26 14:31
# Version: 1.0
###

INSTALL_DIR="/opt/app"
DATA_DIR="/opt/data"
MARIADB_GROUP="mysql"
MARIADB_USER="mysql"
MARIADB_VERSION="10.1.20"
MARIADB_VERSION="10.2.14"
ROOT_PASSWD="root"
#mariadb-10.1.20-linux-x86_64.tar.gz
#mariadb-10.2.14-linux-x86_64.tar.gz
TAR_NAME="mariadb-${MARIADB_VERSION}-linux-x86_64.tar.gz"
UNTAR_NAME="mariadb-${MARIADB_VERSION}-linux-x86_64"

Expand Down

0 comments on commit 9e1c26d

Please sign in to comment.