更新脚本
parent
00c93dbb2d
commit
ff2e5b8798
|
@ -19,7 +19,7 @@ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux
|
|||
|
||||
说明:
|
||||
|
||||
- 脚本会下载解压 maven3 到 `/opt/maven` 路径下。
|
||||
- 脚本会下载解压 maven `3.6.0` 到 `/opt/maven` 路径下。
|
||||
- 备份并替换 `settings.xml`,使用 aliyun 镜像加速 maven。
|
||||
|
||||
使用方法:
|
||||
|
@ -31,12 +31,26 @@ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/
|
|||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash
|
||||
```
|
||||
|
||||
## Node.js 安装
|
||||
|
||||
说明:
|
||||
|
||||
脚本会先安装 nvm(nodejs 版本管理器),并通过 nvm 安装 nodejs `10.15.2`。
|
||||
|
||||
使用方法:
|
||||
|
||||
执行以下任意命令即可执行安装脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash
|
||||
```
|
||||
|
||||
## Redis 安装
|
||||
|
||||
说明:
|
||||
|
||||
下载 `5.0.4` 版本的 redis 并解压安装到 `/opt/redis` 路径下。
|
||||
下载 redis `5.0.4` 并解压安装到 `/opt/redis` 路径下。
|
||||
|
||||
使用方法:
|
||||
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 JDK8 脚本
|
||||
# 仅适用于所有 CentOS 发行版本
|
||||
# JDK 会被安装到 /usr/lib/jvm/java 路径。
|
||||
# Author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
EOF
|
||||
|
||||
echo -e "\n>>>>>>>>> install jdk8"
|
||||
|
||||
yum -y install java-1.8.0-openjdk.x86_64
|
||||
yum -y install java-1.8.0-openjdk-devel.x86_64
|
||||
java -version
|
||||
|
|
|
@ -18,6 +18,7 @@ case ${item} in
|
|||
"git") yum install -y git ;;
|
||||
"jdk") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash ;;
|
||||
"maven") wget -qO- 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/service/redis-install.sh | bash ;;
|
||||
*)
|
||||
echo -e "输入项不支持!"
|
||||
|
|
|
@ -39,3 +39,5 @@ source /etc/profile
|
|||
echo -e "\n>>>>>>>>> replace ${path}/conf/settings.xml"
|
||||
cp ${path}/conf/settings.xml ${path}/conf/settings.xml.bak
|
||||
wget -N https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/config/settings-aliyun.xml -O ${path}/conf/settings.xml
|
||||
|
||||
mvn -v
|
||||
|
|
|
@ -1,26 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 Nodejs 脚本
|
||||
# 适用于所有 linux 发行版本。
|
||||
# Author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
echo -e "\n>>>>>>>>> install node.js"
|
||||
EOF
|
||||
|
||||
version=10.15.2
|
||||
if [[ -n $1 ]]; then
|
||||
version=$1
|
||||
fi
|
||||
|
||||
. ~/.nvm/nvm.sh
|
||||
nvm --version
|
||||
execode=$?
|
||||
if [[ ${execode} != 0 ]]; then
|
||||
echo -e "\n未找到 nvm ,开始安装"
|
||||
echo -e "\n>>>>>>>>> install nvm"
|
||||
rm -rf ~/.nvm
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
|
||||
. ~/.nvm/nvm.sh
|
||||
nvm --version
|
||||
fi
|
||||
|
||||
version=8.9.4
|
||||
echo -e "\n>>>>>>>>> install nodejs by nvm"
|
||||
nvm install ${version}
|
||||
nvm use ${version}
|
||||
node --version
|
|
@ -1,7 +0,0 @@
|
|||
# 安装 Nodejs
|
||||
|
||||
使用方法:
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs/install-nodejs.sh | bash
|
||||
```
|
|
@ -1,10 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 Redis 脚本
|
||||
# Author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
EOF
|
||||
|
||||
version=5.0.4
|
||||
|
|
Loading…
Reference in New Issue