diff --git a/codes/deploy/main.sh b/codes/deploy/main.sh index 41a99f7..2876beb 100644 --- a/codes/deploy/main.sh +++ b/codes/deploy/main.sh @@ -73,7 +73,7 @@ function chooseOper() { git) ${filepath}/tool/git/install-git.sh;; svn) ${filepath}/tool/svn/install-svn.sh;; jdk8) ${filepath}/tool/jdk/install-jdk8.sh;; - maven) ${filepath}/tool/maven/install-maven.sh;; + maven) ${filepath}/tool/maven/install-maven3.sh;; nginx) ${filepath}/tool/nginx/install-nginx.sh;; nodejs) ${filepath}/tool/nodejs/install-nodejs.sh;; tomcat) ${filepath}/tool/tomcat/install-tomcat8.sh;; diff --git a/codes/deploy/tool/jdk/install-jdk8.sh b/codes/deploy/tool/jdk/install-jdk8.sh index 392c730..e061ad4 100644 --- a/codes/deploy/tool/jdk/install-jdk8.sh +++ b/codes/deploy/tool/jdk/install-jdk8.sh @@ -4,7 +4,7 @@ echo -e "\n>>>>>>>>> install jdk8" yum -y install java-1.8.0-openjdk-devel-debug.x86_64 -cat >/etc/profile.d/jdk.sh<> /etc/profile << EOF JAVA_HOME=/usr/lib/jvm/java PATH=${JAVA_HOME}/bin:\$PATH CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar @@ -12,4 +12,4 @@ export JAVA_HOME export PATH export CLASSPATH EOF -chown root.root /etc/profile.d/jdk.sh +source /etc/profile diff --git a/codes/deploy/tool/maven/install-maven3.sh b/codes/deploy/tool/maven/install-maven3.sh index a18bcce..dc45c87 100644 --- a/codes/deploy/tool/maven/install-maven3.sh +++ b/codes/deploy/tool/maven/install-maven3.sh @@ -6,5 +6,13 @@ mkdir -p /opt/software/maven cd /opt/software/maven version=3.5.2 -wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://mirrors.shuosc.org/apache/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz +wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz tar -zxvf apache-maven-${version}-bin.tar.gz + +cat >> /etc/profile << EOF +MAVEN_HOME=/opt/software/maven/apache-maven-\${version} +PATH=\${MAVEN_HOME}/bin:\${PATH} +export MAVEN_HOME +export PATH +EOF +source /etc/profile