File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux
1919
2020说明:
2121
22- - 脚本会下载解压 maven3 到 ` /opt/maven ` 路径下。
22+ - 脚本会下载解压 maven ` 3.6.0 ` 到 ` /opt/maven ` 路径下。
2323- 备份并替换 ` settings.xml ` ,使用 aliyun 镜像加速 maven。
2424
2525使用方法:
@@ -31,12 +31,26 @@ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/
3131wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash
3232```
3333
34+ ## Node.js 安装
35+
36+ 说明:
37+
38+ 脚本会先安装 nvm(nodejs 版本管理器),并通过 nvm 安装 nodejs ` 10.15.2 ` 。
39+
40+ 使用方法:
41+
42+ 执行以下任意命令即可执行安装脚本。
43+
44+ ``` sh
45+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash
46+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash
47+ ```
3448
3549## Redis 安装
3650
3751说明:
3852
39- 下载 ` 5.0.4 ` 版本的 redis 并解压安装到 ` /opt/redis ` 路径下。
53+ 下载 redis ` 5.0.4 ` 并解压安装到 ` /opt/redis ` 路径下。
4054
4155使用方法:
4256
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33cat << EOF
4+
45###################################################################################
56# 安装 JDK8 脚本
67# 仅适用于所有 CentOS 发行版本
78# JDK 会被安装到 /usr/lib/jvm/java 路径。
89# Author: Zhang Peng
910###################################################################################
11+
1012EOF
1113
1214echo -e " \n>>>>>>>>> install jdk8"
1315
1416yum -y install java-1.8.0-openjdk.x86_64
1517yum -y install java-1.8.0-openjdk-devel.x86_64
18+ java -version
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ case ${item} in
1818 " git" ) yum install -y git ;;
1919 " jdk" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash ;;
2020 " maven" ) wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash ;;
21+ " nodejs" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash ;;
2122 " redis" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash ;;
2223 * )
2324 echo -e " 输入项不支持!"
Original file line number Diff line number Diff line change @@ -39,3 +39,5 @@ source /etc/profile
3939echo -e " \n>>>>>>>>> replace ${path} /conf/settings.xml"
4040cp ${path} /conf/settings.xml ${path} /conf/settings.xml.bak
4141wget -N https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/config/settings-aliyun.xml -O ${path} /conf/settings.xml
42+
43+ mvn -v
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ cat << EOF
4+
35###################################################################################
46# 安装 Nodejs 脚本
57# 适用于所有 linux 发行版本。
68# Author: Zhang Peng
79###################################################################################
810
9- echo -e " \n>>>>>>>>> install node.js"
11+ EOF
12+
13+ version=10.15.2
14+ if [[ -n $1 ]]; then
15+ version=$1
16+ fi
1017
1118. ~ /.nvm/nvm.sh
1219nvm --version
1320execode=$?
1421if [[ ${execode} != 0 ]]; then
15- echo -e " \n未找到 nvm ,开始安装"
1622 echo -e " \n>>>>>>>>> install nvm"
1723 rm -rf ~ /.nvm
18- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11 /install.sh | bash
24+ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0 /install.sh | bash
1925 . ~ /.nvm/nvm.sh
2026 nvm --version
2127fi
2228
23- version=8.9.4
29+ echo -e " \n>>>>>>>>> install nodejs by nvm "
2430nvm install ${version}
2531nvm use ${version}
2632node --version
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33cat << EOF
4+
45###################################################################################
56# 安装 Redis 脚本
67# Author: Zhang Peng
78###################################################################################
9+
810EOF
911
1012version=5.0.4
You can’t perform that action at this time.
0 commit comments