Revision 8909
Added by Jing Tao about 10 years ago
src/scripts/bash/install-java7-tomcat7.sh | ||
---|---|---|
1 |
#/bin/bash |
|
2 |
#This script will install openjdk-7 and tomcat7. |
|
3 |
#It also updates the alternatives for java, javac, keytool and javaws to openjdk-7. |
|
4 |
#It also modifies the /etc/tomcat7/catalina.properties to allow DataONE idenifiers. |
|
5 |
#The user running the script should have the sudo permission. |
|
6 |
|
|
7 |
echo "install openjdk-7-jdk" |
|
8 |
sudo apt-get install openjdk-7-jdk |
|
9 |
sleep 3 |
|
10 |
echo "configure java, java, keytool and javaws" |
|
11 |
sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java |
|
12 |
sudo update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac |
|
13 |
sudo update-alternatives --set keytool /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool |
|
14 |
sudo update-alternatives --set javaws /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws |
|
15 |
|
|
16 |
echo "install tomcat7" |
|
17 |
sudo apt-get install tomcat7 |
|
18 |
sudo sed -i.bak '$ a\org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true' /etc/tomcat7/catalina.properties |
|
19 |
sudo sed -i '$ a\org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true' /etc/tomcat7/catalina.properties |
|
0 | 20 |
Also available in: Unified diff
Add a script to install openjdk 7 and tomcat 7.
It also configures java, javac,keytools and tomcat7.