-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
||
|