1 Star 0 Fork 2.7K

DUWENINK/jpress

forked from JPressProjects/jpress 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 2.61 KB
一键复制 编辑 原始数据 按行查看 历史
Michael Yang 提交于 2020-01-10 13:32 . v3.0.3 release (^.^)YYa!!
#!/bin/bash
# ----------------------------------------------------------------------
# author: yangfuhai
# email: fuhai999@gmail.com
# use : wget -O install.sh https://gitee.com/fuhai/jpress/raw/master/install.sh && bash install.sh
# ----------------------------------------------------------------------
# 安装docker
if ! [ -x "$(command -v docker)" ]; then
echo '检测到Docker尚未安装,正在试图安装Docker...所需时间与你的网络环境有关'
sudo -s curl -sSL https://get.daocloud.io/docker | sh
# 启动docker和开机自启动
sudo systemctl start docker
sudo systemctl enable docker
fi
if ! [ -x "$(command -v docker)" ]; then
echo '检测到Docker尚未安装,正在试图安装Docker...所需时间与你的网络环境有关'
if [ -x "$(command -v yum)" ]; then
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
sudo yum install docker-ce
else
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
fi
# 启动docker和开机自启动
sudo systemctl start docker
sudo systemctl enable docker
fi
# 安装docker-compose
if ! [ -x "$(command -v docker-compose)" ]; then
echo '检测到Docker-Compose尚未安装,正在试图安装Docker-Compose...所需时间与你的网络环境有关'
if ! [ -x "$(command -v pip)" ]; then
curl -L https://github.com/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
else
pip install --upgrade pip
pip install docker-compose
fi
fi
# 开始安装 jpress
if [ -x "$(command -v docker)" -a -x "$(command -v docker-compose)" ]; then
docker version
docker-compose -version
# 安装jpress
wget https://gitee.com/fuhai/jpress/raw/master/docker-compose.yml
docker-compose up -d
else
if ! [ -x "$(command -v docker)" ]; then
echo 'Docker安装失败,请检测您当前的环境(或网络)是否正常。'
fi
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'Docker-Compose安装失败,请检测您当前的环境(或网络)是否正常。'
fi
fi
rm -f install.sh
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/DUWENINK/jpress.git
git@gitee.com:DUWENINK/jpress.git
DUWENINK
jpress
jpress
master

搜索帮助