Skip to content

Commit 0521b9c

Browse files
committed
✨ 更新环境部署脚本
1 parent 03fa4d3 commit 0521b9c

3 files changed

Lines changed: 22 additions & 17 deletions

File tree

codes/deploy/lib/install-libs.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
echo -e "\n>>>>>>>>> install gcc gcc-c++ kernel-devel libtool"
4+
yum -y install make gcc gcc-c++ kernel-devel libtool
5+
6+
echo -e "\n>>>>>>>>> install openssl openssl-devel"
7+
yum -y install make openssl openssl-devel
8+
9+
echo -e "\n>>>>>>>>> install zlib zlib-devel"
10+
yum -y install make zlib zlib-devel
11+
12+
echo -e "\n>>>>>>>>> install pcre"
13+
yum -y install pcre

codes/deploy/main.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ cat << EOF
4444
4545
====================================== Deploy Menu ======================================
4646
【1 - System Environment】
47+
[1-2 | libs] install commonly libs.
48+
4749
【2 - Common Tools】
4850
[2 | tools] install all tools.
4951
[2-1 | git] install git. [2-2 | jdk8] install jdk8.
@@ -61,6 +63,8 @@ function chooseOper() {
6163
while read key
6264
do
6365
case ${key} in
66+
1-2 | libs) ${filepath}/lib/install-libs.sh;;
67+
6468
2 | tools) ${filepath}/tool/install-all.sh;;
6569
2-1 | git) ${filepath}/tool/git/install-git.sh;;
6670
2-2 | jdk8) ${filepath}/tool/jdk/install-jdk8.sh;;
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
#!/bin/bash
22

3-
echo -e "\n>>>>>>>>> install jdk8"
3+
yum -y install java-1.8.0-openjdk-devel-debug.x86_64
44

5-
wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm?AuthParam=1471671456_14c9442ffc64438c1b8fc83587ecdf47
6-
path = './jdk-7u79-linux-x64.rpm'
7-
8-
echo '正在安装JDK...'
9-
#update java
10-
for installedJava in $(rpm -qa |grep java);do
11-
rpm -e --nodeps $installedJava
12-
done
13-
rpm -ivh $path
14-
sunJava=$(ls /usr/java |grep jdk)
15-
if [ "$sunJava" != "" ];then
16-
cat >/etc/profile.d/java.sh<<EOF
17-
JAVA_HOME=/usr/java/$sunJava
18-
PATH=$JAVA_HOME/bin:\$PATH
5+
cat >/etc/profile.d/jdk.sh<<EOF
6+
JAVA_HOME=/usr/lib/jvm/java
7+
PATH=${JAVA_HOME}/bin:\$PATH
198
CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar
209
export JAVA_HOME
2110
export PATH
2211
export CLASSPATH
2312
EOF
24-
chown root.root /etc/profile.d/java.sh
25-
fi
13+
chown root.root /etc/profile.d/jdk.sh

0 commit comments

Comments
 (0)