linux-tutorial/codes/linux/soft/nexus-install.sh

39 lines
1.1 KiB
Bash
Raw Normal View History

2018-09-29 17:27:31 +08:00
#!/usr/bin/env bash
2019-08-19 19:19:57 +08:00
###################################################################################
# 控制台颜色
BLACK="\033[1;30m"
RED="\033[1;31m"
GREEN="\033[1;32m"
YELLOW="\033[1;33m"
BLUE="\033[1;34m"
PURPLE="\033[1;35m"
CYAN="\033[1;36m"
RESET="$(tput sgr0)"
###################################################################################
printf "${BLUE}"
cat << EOF
2018-09-29 17:27:31 +08:00
###################################################################################
# 安装 sonatype nexus(用于搭建 maven 私服) 脚本
2019-05-07 14:29:16 +08:00
# @system: 适用于所有 linux 发行版本。
2018-09-29 17:27:31 +08:00
# sonatype nexus 会被安装到 /opt/maven 路径。
# 注意sonatype nexus 要求必须先安装 JDK
2019-05-07 14:29:16 +08:00
# @author: Zhang Peng
2018-09-29 17:27:31 +08:00
###################################################################################
2019-08-19 19:19:57 +08:00
EOF
printf "${RESET}"
printf "${GREEN}>>>>>>>> install nexus begin.${RESET}\n"
2018-09-29 17:27:31 +08:00
mkdir -p /opt/maven
cd /opt/maven
version=3.13.0-01
2019-07-12 15:53:54 +08:00
curl -o /opt/maven/nexus-unix.tar.gz http://download.sonatype.com/nexus/3/nexus-${version}-unix.tar.gz
2018-09-29 17:27:31 +08:00
tar -zxf nexus-unix.tar.gz
2019-08-19 19:19:57 +08:00
printf "${GREEN}<<<<<<<< install nexus end.${RESET}\n"