更新脚本

This commit is contained in:
Zhang Peng 2019-05-07 14:29:16 +08:00
parent 92384cead4
commit cf0fe82090
33 changed files with 63 additions and 54 deletions

View File

@ -2,7 +2,7 @@
#################################################################################
# JAVA 应用通用启动脚本
# Author: Zhang Peng
# @author: Zhang Peng
#################################################################################
# 检查脚本参数,如必要参数未传入,退出脚本。

View File

@ -2,7 +2,7 @@
#################################################################################
# JAVA 应用发布脚本
# Author: Zhang Peng
# @author: Zhang Peng
#################################################################################
# 检查脚本参数,如必要参数未传入,退出脚本。

View File

@ -2,7 +2,7 @@
#################################################################################
# JAVA 应用运行脚本
# Author: Zhang Peng
# @author: Zhang Peng
#################################################################################
# 检查脚本参数,如必要参数未传入,退出脚本。

View File

@ -2,7 +2,7 @@
###################################################################################
# 项目发布脚本模板
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
# 选择应用

View File

@ -3,7 +3,7 @@
###################################################################################
# 更新代码脚本
# 只有退出码exit code为 0 ,表示脚本执行成功。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
# 检查脚本参数,如必要参数未传入,退出脚本。

View File

@ -1,5 +1,20 @@
# 服务安装配置
## oh-my-zsh 安装
说明:
安装 [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
使用方法:
执行以下任意命令即可执行安装脚本。
```sh
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/zsh-install.sh | bash
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/zsh-install.sh | bash
```
## JDK8 安装
说明:

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 Gitlab 脚本
# 仅适用于 CentOS7 发行版本
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install gitlab"

View File

@ -4,9 +4,9 @@ cat << EOF
###################################################################################
# 安装 JDK8 脚本
# 仅适用于所有 CentOS 发行版本
# JDK 会被安装到 /usr/lib/jvm/java 路径。
# Author: Zhang Peng
# @system: 适用于 CentOS
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 Jenkins 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install jenkins"

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 kafka 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
# 下载并解压 kafka

View File

@ -11,15 +11,17 @@ EOF
path=$(cd "$(dirname "$0")"; pwd)
PS3="Please select script type: "
select item in "git" "jdk" "maven" "nodejs" "redis"
select item in "git" "zsh" "jdk" "maven" "nodejs" "redis" "tomcat"
do
path=$(cd "$(dirname "$0")"; pwd)
case ${item} in
"git") yum install -y git ;;
"zsh") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/zsh-install.sh | bash ;;
"jdk") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/jdk8-install.sh | bash ;;
"maven") wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash ;;
"maven") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash ;;
"nodejs") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash ;;
"redis") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash ;;
"tomcat") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash ;;
*)
echo -e "输入项不支持!"
main

View File

@ -3,10 +3,10 @@
cat << EOF
###################################################################################
# 安装 Maven3 脚本
# 适用于所有 linux 发行版本。
# Maven 会被安装到 /opt/maven 路径。
# @system: 适用于所有 linux 发行版本。
# 注意Maven 要求必须先安装 JDK
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 mongodb 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install mongodb"

View File

@ -2,10 +2,10 @@
###################################################################################
# 安装 sonatype nexus(用于搭建 maven 私服) 脚本
# 适用于所有 linux 发行版本。
# @system: 适用于所有 linux 发行版本。
# sonatype nexus 会被安装到 /opt/maven 路径。
# 注意sonatype nexus 要求必须先安装 JDK
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install sonatype nexus"

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 nginx 脚本
# 仅适用于 CentOS 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install nginx"

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 nginx 脚本
# 仅适用于 CentOS 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install nginx"

View File

@ -6,7 +6,7 @@
# nginx 会被安装到 /opt/nginx 路径。
# 注意:安装 nginx 需要依赖以下库,需预先安装:
# zlib zlib-devel gcc-c++ libtool openssl openssl-devel
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install nginx"

View File

@ -4,7 +4,7 @@
# 安装 pcre 脚本
# 适用于所有 linux 发行版本。
# 注意:本脚本需输入根路径和版本号两个参数。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install pcre"

View File

@ -4,8 +4,8 @@ cat << EOF
###################################################################################
# 安装 Nodejs 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @system: 适用于所有 linux 发行版本。
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -4,7 +4,8 @@ cat << EOF
###################################################################################
# 安装 Redis 脚本
# Author: Zhang Peng
# @system: 适用于 CentOS
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 rocketmq 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
# 下载并解压 rocketmq

View File

@ -1,13 +0,0 @@
#!/usr/bin/env bash
echo -e "\n>>>>>>>>> install springboot"
sdk version
execode=$?
if [ "${execode}" != "0" ]; then
echo "请先安装 sdkman"
exit 1
fi
sdk install springboot
spring --version

View File

@ -4,8 +4,8 @@ cat << EOF
###################################################################################
# 安装 Tomcat 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @system: 适用于所有 linux 发行版本。
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -3,7 +3,7 @@
###################################################################################
# 安装 zookeeper 脚本
# 适用于所有 linux 发行版本。
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> install zookeeper"

View File

@ -1,16 +1,20 @@
#!/usr/bin/env bash
cat << EOF
###################################################################################
# 安装 zsh、oh-my-zsh 脚本
# 适用于 CentOS
# Author: Zhang Peng
# @system: 适用于 CentOS
# @author: Zhang Peng
# See: https://github.com/robbyrussell/oh-my-zsh
###################################################################################
echo -e "\n>>>>>>>>> install zsh"
EOF
# 安装 zsh
echo -e "\n>>>>>>>>> install zsh"
yum install -y zsh
# 安装 oh-my-zsh
echo -e "\n>>>>>>>>> install oh-my-zsh"
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
# 替换 oh-my-zsh 主题
sed -i "s#^ZSH_THEME=.*#ZSH_THEME=\"ys\"#g" ~/.zshrc

View File

@ -2,7 +2,7 @@
###################################################################################
# 安装常见 lib
# Author: Zhang Peng
# @author: Zhang Peng
#
# 如果不知道某个命令工具是由哪个包提供的,使用 yum provides xxx
# 或 yum whatprovides xxx 来查找

View File

@ -3,7 +3,7 @@
cat << EOF
###################################################################################
# 安装基本的命令工具
# Author: Zhang Peng
# @author: Zhang Peng
#
# 如果不知道某个命令工具是由哪个包提供的,使用 yum provides xxx
# 或 yum whatprovides xxx 来查找

View File

@ -4,7 +4,7 @@ printHeadInfo() {
cat << EOF
###################################################################################
# Linux CentOS 环境初始化脚本(设置环境配置、安装基本的命令工具)
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -3,7 +3,7 @@
###################################################################################
# 在 /etc/resolv.conf 中设置 DNS 服务器
# 在 /etc/hosts 中设置本机域名
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
ip='127.0.0.1'
function getDeviceIp() {

View File

@ -3,7 +3,7 @@
###################################################################################
# 使用 NTP 进行时间同步
# 参考https://www.cnblogs.com/quchunhui/p/7658853.html
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
echo -e "\n>>>>>>>>> 设置 ntp"

View File

@ -3,7 +3,7 @@
###################################################################################
# 彻底关闭防火墙
# 参考https://www.cnblogs.com/moxiaoan/p/5683743.html
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
systemctl stop firewalld

View File

@ -4,7 +4,7 @@ printHeadInfo() {
cat << EOF
###################################################################################
# Linux Centos7 系统配置脚本(根据需要选择)
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
EOF

View File

@ -4,7 +4,7 @@ cat << EOF
###################################################################################
# 本脚本用于替换 yum repo使用国内 yum 仓库,加速下载
# 要求:仅适用于 Linux CentOS 发行版本,并且环境必须已支持 yum 、lsb_release 命令
# Author: Zhang Peng
# @author: Zhang Peng
###################################################################################
EOF