✨ 更新环境部署脚本
parent
03fa4d3542
commit
0521b9c0cc
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo -e "\n>>>>>>>>> install gcc gcc-c++ kernel-devel libtool"
|
||||||
|
yum -y install make gcc gcc-c++ kernel-devel libtool
|
||||||
|
|
||||||
|
echo -e "\n>>>>>>>>> install openssl openssl-devel"
|
||||||
|
yum -y install make openssl openssl-devel
|
||||||
|
|
||||||
|
echo -e "\n>>>>>>>>> install zlib zlib-devel"
|
||||||
|
yum -y install make zlib zlib-devel
|
||||||
|
|
||||||
|
echo -e "\n>>>>>>>>> install pcre"
|
||||||
|
yum -y install pcre
|
|
@ -44,6 +44,8 @@ cat << EOF
|
||||||
|
|
||||||
====================================== Deploy Menu ======================================
|
====================================== Deploy Menu ======================================
|
||||||
【1 - System Environment】
|
【1 - System Environment】
|
||||||
|
[1-2 | libs] install commonly libs.
|
||||||
|
|
||||||
【2 - Common Tools】
|
【2 - Common Tools】
|
||||||
[2 | tools] install all tools.
|
[2 | tools] install all tools.
|
||||||
[2-1 | git] install git. [2-2 | jdk8] install jdk8.
|
[2-1 | git] install git. [2-2 | jdk8] install jdk8.
|
||||||
|
@ -61,6 +63,8 @@ function chooseOper() {
|
||||||
while read key
|
while read key
|
||||||
do
|
do
|
||||||
case ${key} in
|
case ${key} in
|
||||||
|
1-2 | libs) ${filepath}/lib/install-libs.sh;;
|
||||||
|
|
||||||
2 | tools) ${filepath}/tool/install-all.sh;;
|
2 | tools) ${filepath}/tool/install-all.sh;;
|
||||||
2-1 | git) ${filepath}/tool/git/install-git.sh;;
|
2-1 | git) ${filepath}/tool/git/install-git.sh;;
|
||||||
2-2 | jdk8) ${filepath}/tool/jdk/install-jdk8.sh;;
|
2-2 | jdk8) ${filepath}/tool/jdk/install-jdk8.sh;;
|
||||||
|
|
|
@ -1,25 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo -e "\n>>>>>>>>> install jdk8"
|
yum -y install java-1.8.0-openjdk-devel-debug.x86_64
|
||||||
|
|
||||||
wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm?AuthParam=1471671456_14c9442ffc64438c1b8fc83587ecdf47
|
cat >/etc/profile.d/jdk.sh<<EOF
|
||||||
path = './jdk-7u79-linux-x64.rpm'
|
JAVA_HOME=/usr/lib/jvm/java
|
||||||
|
PATH=${JAVA_HOME}/bin:\$PATH
|
||||||
echo '正在安装JDK...'
|
|
||||||
#update java
|
|
||||||
for installedJava in $(rpm -qa |grep java);do
|
|
||||||
rpm -e --nodeps $installedJava
|
|
||||||
done
|
|
||||||
rpm -ivh $path
|
|
||||||
sunJava=$(ls /usr/java |grep jdk)
|
|
||||||
if [ "$sunJava" != "" ];then
|
|
||||||
cat >/etc/profile.d/java.sh<<EOF
|
|
||||||
JAVA_HOME=/usr/java/$sunJava
|
|
||||||
PATH=$JAVA_HOME/bin:\$PATH
|
|
||||||
CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar
|
CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar
|
||||||
export JAVA_HOME
|
export JAVA_HOME
|
||||||
export PATH
|
export PATH
|
||||||
export CLASSPATH
|
export CLASSPATH
|
||||||
EOF
|
EOF
|
||||||
chown root.root /etc/profile.d/java.sh
|
chown root.root /etc/profile.d/jdk.sh
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue