Skip to content
Snippets Groups Projects
Commit 35d6ec3f authored by jez04's avatar jez04
Browse files

feat: upgrade for 2024

parent 5eee5d05
No related merge requests found
...@@ -22,30 +22,33 @@ function downloadAndExtract(){ ...@@ -22,30 +22,33 @@ function downloadAndExtract(){
function uninstallJavaVersion(){ function uninstallJavaVersion(){
sudo apt -y purge openjdk-$1-doc openjdk-$1-jdk openjdk-$1-jdk-headless openjdk-$1-jre openjdk-$1-jre-headless openjdk-$1-source local ver=${1:-21}
sudo apt -y purge openjdk-$ver-jdk openjdk-$ver-source openjdk-$ver-doc
} }
function installJavaVersion(){ function installJavaVersion(){
sudo apt -y install openjdk-$1-doc openjdk-$1-jdk openjdk-$1-jdk-headless openjdk-$1-jre openjdk-$1-jre-headless openjdk-$1-source local ver=${1:-21}
sudo apt -y install openjdk-$ver-jdk openjdk-$ver-source openjdk-$ver-doc
} }
#Install ORACLE JAVA 8 and OPEN JDK 11, 17 #Install ORACLE JAVA 8 and OPEN JDK 11, 17
function installJava(){ function installJava(){
echo '============>Install java packages.....===========================================================================================================' echo '============>Install java packages.....==========================================================================================================='
sudo apt -y install openjdk-8-jdk installOpenjdk 8
installJavaVersion 21 installOpenjdk 17
installOpenjdk 21
echo '============>Java installed.===========================================================================================================' echo '============>Java installed.==========================================================================================================='
} }
function installJavaFX(){ function installJavaFX(){
echo '============>Install java FX.....===========================================================================================================' echo '============>Install java FX.....==========================================================================================================='
# sudo apt -y install openjfx wget https://download2.gluonhq.com/scenebuilder/22.0.0/install/linux/SceneBuilder-22.0.0.deb
wget https://download2.gluonhq.com/scenebuilder/21.0.0/install/linux/SceneBuilder-21.0.0.deb sudo dpkg -i scenebuilder-22.0.0.deb
sudo dpkg -i SceneBuilder-21.0.0.deb rm scenebuilder-22.0.0.deb
rm SceneBuilder-21.0.0.deb
wget -O openjfx-21_linux-x64_bin-sdk.zip https://download2.gluonhq.com/openjfx/21.0.2/openjfx-21.0.2_linux-x64_bin-sdk.zip wget -O openjfx-22.0.2_linux-x64_bin-sdk.zip https://download2.gluonhq.com/openjfx/22.0.2/openjfx-22.0.2_linux-x64_bin-sdk.zip
sudo unzip -d /opt openjfx-21_linux-x64_bin-sdk.zip sudo unzip -d /opt openjfx-22.0.2_linux-x64_bin-sdk.zip
rm openjfx-21_linux-x64_bin-sdk.zip rm openjfx-22.0.2_linux-x64_bin-sdk.zip
echo '============>Java FX installed.===========================================================================================================' echo '============>Java FX installed.==========================================================================================================='
} }
...@@ -218,7 +221,7 @@ function addModule(){ ...@@ -218,7 +221,7 @@ function addModule(){
local moduleBin=$5 local moduleBin=$5
local xaDSClass=$6 local xaDSClass=$6
local pattern=${@:7} local pattern=${@:7}
local moduleDir=/opt/wildfly-29/modules/system/layers/base/$dir/main local moduleDir=/opt/wildfly-33/modules/system/layers/base/$dir/main
local moduleXmlTmp="" local moduleXmlTmp=""
local moduleXml="" local moduleXml=""
local driver="" local driver=""
...@@ -251,14 +254,14 @@ function addModule(){ ...@@ -251,14 +254,14 @@ function addModule(){
<xa-datasource-class>$xaDSClass<\/xa-datasource-class>\\\\n\ <xa-datasource-class>$xaDSClass<\/xa-datasource-class>\\\\n\
<\/driver>\\\\n\ <\/driver>\\\\n\
" "
if ! grep -q "<driver name=\"$moduleName\" module=\"$moduleName\">" /opt/wildfly-29/standalone/configuration/standalone.xml; then if ! grep -q "<driver name=\"$moduleName\" module=\"$moduleName\">" /opt/wildfly-33/standalone/configuration/standalone.xml; then
sudo sed -i -e "s/<\/drivers>/$driver<\/drivers>/g" /opt/wildfly-29/standalone/configuration/standalone.xml sudo sed -i -e "s/<\/drivers>/$driver<\/drivers>/g" /opt/wildfly-33/standalone/configuration/standalone.xml
fi fi
} }
function createRunScript(){ function createRunScript(){
cat <<EOF | sudo tee /opt/wildfly-29/bin/standalone-student.sh > /dev/null cat <<EOF | sudo tee /opt/wildfly-33/bin/standalone-student.sh > /dev/null
#!/bin/bash #!/bin/bash
WILDFLY_DIR=\$HOME/.wildfly WILDFLY_DIR=\$HOME/.wildfly
if [ ! -d \"\$WILDFLY_DIR\" ]; then if [ ! -d \"\$WILDFLY_DIR\" ]; then
...@@ -268,30 +271,30 @@ if [ ! -d \"\$WILDFLY_DIR\" ]; then ...@@ -268,30 +271,30 @@ if [ ! -d \"\$WILDFLY_DIR\" ]; then
mkdir -p \$WILDFLY_DIR/deployments mkdir -p \$WILDFLY_DIR/deployments
mkdir -p \$WILDFLY_DIR/log mkdir -p \$WILDFLY_DIR/log
cp /opt/wildfly-29/standalone/configuration/* \$WILDFLY_DIR/configuration/ cp /opt/wildfly-33/standalone/configuration/* \$WILDFLY_DIR/configuration/
fi fi
/opt/wildfly-29/bin/standalone.sh -Djboss.server.base.dir=\$WILDFLY_DIR -Djboss.server.temp.dir=/tmp/wildfly /opt/wildfly-33/bin/standalone.sh -Djboss.server.base.dir=\$WILDFLY_DIR -Djboss.server.temp.dir=/tmp/wildfly
EOF EOF
sudo chmod +x /opt/wildfly-29/bin/standalone-student.sh sudo chmod +x /opt/wildfly-33/bin/standalone-student.sh
cat <<EOF | sudo tee /opt/wildfly-29/bin/add-user-student.sh > /dev/null cat <<EOF | sudo tee /opt/wildfly-33/bin/add-user-student.sh > /dev/null
#!/bin/bash #!/bin/bash
WILDFLY_DIR=\$HOME/.wildfly WILDFLY_DIR=\$HOME/.wildfly
/opt/wildfly-29/bin/add-user.sh -sc \$WILDFLY_DIR/configuration /opt/wildfly-33/bin/add-user.sh -sc \$WILDFLY_DIR/configuration
EOF EOF
sudo chmod +x /opt/wildfly-29/bin/add-user-student.sh sudo chmod +x /opt/wildfly-33/bin/add-user-student.sh
} }
function installWildfly(){ function installWildfly(){
echo '============>Installing wildfly .....===========================================================================================================' echo '============>Installing wildfly .....==========================================================================================================='
downloadAndExtract /opt wildfly-29.0.1.Final.tar.gz wildfly-29.0.1.Final wildfly-29 https://github.com/wildfly/wildfly/releases/download/29.0.1.Final/wildfly-29.0.1.Final.tar.gz downloadAndExtract /opt wildfly-33.0.1.Final.tar.gz wildfly-33.0.1.Final wildfly-33 https://github.com/wildfly/wildfly/releases/download/33.0.1.Final/wildfly-33.0.1.Final.tar.gz
addModule https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-j-8.1.0.tar.gz com/mysql 1 com.mysql mysql-connector-j-8.1.0.jar com.mysql.cj.jdbc.MysqlXADataSource *mysql-connector-j-8.1.0.jar addModule https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-j-9.0.0.tar.gz com/mysql 1 com.mysql mysql-connector-java-9.0.0.jar com.mysql.cj.jdbc.MysqlXADataSource *mysql-connector-java-9.0.0.jar
addModule https://dlcdn.apache.org//db/derby/db-derby-10.16.1.1/db-derby-10.16.1.1-lib.tar.gz org/apache/derby 2 org.apache.derby derbyclient.jar org.apache.derby.jdbc.ClientXADataSource *derbyclient.jar *derbyLocale* *derbyshared.jar *derbytools.jar addModule https://dlcdn.apache.org//db/derby/db-derby-10.17.1.0/db-derby-10.17.1.0-lib.tar.gz org/apache/derby 2 org.apache.derby derbyclient.jar org.apache.derby.jdbc.ClientXADataSource *derbyclient.jar *derbyLocale* *derbyshared.jar *derbytools.jar
sudo chmod +r /opt/wildfly-29/standalone/configuration/* sudo chmod +r /opt/wildfly-33/standalone/configuration/*
createRunScript createRunScript
echo '============>Wildfly installed===========================================================================================================' echo '============>Wildfly installed==========================================================================================================='
} }
...@@ -304,8 +307,7 @@ function uninstallWildfly(){ ...@@ -304,8 +307,7 @@ function uninstallWildfly(){
function installAppacheDerby() { function installAppacheDerby() {
echo '============>Installing appache derby DB .....===========================================================================================================' echo '============>Installing appache derby DB .....==========================================================================================================='
downloadAndExtract /opt db-derby-10.15.2.0-bin.tar.gz db-derby-10.15.2.0-bin db-derby http://mirror.hosting90.cz/apache/db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.tar.gz downloadAndExtract /opt db-derby-10.17.1.0-bin.tar.gz db-derby-10.17.1.0-bin db-derby https://dlcdn.apache.org//db/derby/db-derby-10.17.1.0/db-derby-10.17.1.0-bin.tar.gz
downloadAndExtract /opt db-derby-10.16.1.1-bin.tar.gz db-derby-10.16.1.1-bin db-derby https://dlcdn.apache.org//db/derby/db-derby-10.16.1.1/db-derby-10.16.1.1-bin.tar.gz
cat <<EOF | sudo tee /opt/db-derby/bin/startNetworkServer-student > /dev/null cat <<EOF | sudo tee /opt/db-derby/bin/startNetworkServer-student > /dev/null
#!/bin/bash #!/bin/bash
JAVA_DB_DIR=\$HOME/.java-db JAVA_DB_DIR=\$HOME/.java-db
...@@ -370,22 +372,21 @@ if [ ! -f ~/.m2/settings.xml ] ; then ...@@ -370,22 +372,21 @@ if [ ! -f ~/.m2/settings.xml ] ; then
fi fi
EOF EOF
sudo chmod +x /usr/share/maven/bin/student-setup sudo chmod +x /usr/share/maven/bin/student-setup
wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz tar -xzf apache-maven-3.9.9-bin.tar.gz
tar -xzf apache-maven-3.9.6-bin.tar.gz rm apache-maven-3.9.9-bin.tar.gz
rm apache-maven-3.9.6-bin.tar.gz
sudo rm -r /usr/share/maven/bin sudo rm -r /usr/share/maven/bin
sudo rm -r /usr/share/maven/boot sudo rm -r /usr/share/maven/boot
sudo rm -r /usr/share/maven/lib sudo rm -r /usr/share/maven/lib
sudo mv apache-maven-3.9.6/bin /usr/share/maven/bin sudo mv apache-maven-3.9.9/bin /usr/share/maven/bin
sudo mv apache-maven-3.9.6/boot /usr/share/maven/boot sudo mv apache-maven-3.9.9/boot /usr/share/maven/boot
sudo mv apache-maven-3.9.6/lib /usr/share/maven/lib sudo mv apache-maven-3.9.9/lib /usr/share/maven/lib
sudo cp -R apache-maven-3.9.6/conf/* /etc/maven/ sudo cp -R apache-maven-3.9.9/conf/* /etc/maven/
sudo chown -R root:root /etc/maven/ sudo chown -R root:root /etc/maven/
sudo chown -R root:root /usr/share/maven/bin sudo chown -R root:root /usr/share/maven/bin
sudo chown -R root:root /usr/share/maven/boot sudo chown -R root:root /usr/share/maven/boot
sudo chown -R root:root /usr/share/maven/lib sudo chown -R root:root /usr/share/maven/lib
rm -R apache-maven-3.9.6 rm -R apache-maven-3.9.9
echo '============>Maven installed.===========================================================================================================' echo '============>Maven installed.==========================================================================================================='
} }
...@@ -410,7 +411,7 @@ EOF ...@@ -410,7 +411,7 @@ EOF
function installJMeter(){ function installJMeter(){
echo '============>Installing JMeter .....===========================================================================================================' echo '============>Installing JMeter .....==========================================================================================================='
setupBase setupBase
downloadAndExtract /opt apache-jmeter-5.6.2.tgz apache-jmeter-5.6.2 jmeter https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.2.tgz downloadAndExtract /opt apache-jmeter-5.6.3.tgz apache-jmeter-5.6.3 jmeter https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.3.tgz
cat <<EOF | sudo tee /opt/jmeter/bin/jmeter-student.sh > /dev/null cat <<EOF | sudo tee /opt/jmeter/bin/jmeter-student.sh > /dev/null
...@@ -429,9 +430,9 @@ EOF ...@@ -429,9 +430,9 @@ EOF
createLauncher jmeter "Apache JMeter 5" /opt/jmeter/bin/jmeter-student.sh /opt/jmeter/jmeter-logo.svg "Apache JMeter 5" createLauncher jmeter "Apache JMeter 5" /opt/jmeter/bin/jmeter-student.sh /opt/jmeter/jmeter-logo.svg "Apache JMeter 5"
#plugin manager #plugin manager
sudo wget -O /opt/jmeter/lib/ext/jmeter-plugins-manager-1.9.jar https://repo1.maven.org/maven2/kg/apc/jmeter-plugins-manager/1.9/jmeter-plugins-manager-1.9.jar sudo wget -O /opt/jmeter/lib/ext/jmeter-plugins-manager-1.10.jar https://repo1.maven.org/maven2/kg/apc/jmeter-plugins-manager/1.10/jmeter-plugins-manager-1.10.jar
sudo wget -O /opt/jmeter/lib/cmdrunner-2.3.jar https://repo1.maven.org/maven2/kg/apc/cmdrunner/2.3/cmdrunner-2.3.jar sudo wget -O /opt/jmeter/lib/cmdrunner-2.3.jar http://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/2.3/cmdrunner-2.3.jar
sudo java -cp /opt/jmeter/lib/ext/jmeter-plugins-manager-1.9.jar org.jmeterplugins.repository.PluginManagerCMDInstaller sudo java -cp /opt/jmeter/lib/ext/jmeter-plugins-manager-1.10.jar org.jmeterplugins.repository.PluginManagerCMDInstaller
sudo sed -i -e "s/cmdrunner-2\.2\.jar/cmdrunner-2\.3\.jar/g" /opt/jmeter/bin/PluginsManagerCMD.sh sudo sed -i -e "s/cmdrunner-2\.2\.jar/cmdrunner-2\.3\.jar/g" /opt/jmeter/bin/PluginsManagerCMD.sh
#Add Plugins #Add Plugins
sudo /opt/jmeter/bin/PluginsManagerCMD.sh install jpgc-graphs-basic,jpgc-graphs-additional,jpgc-functions,custom-soap,jpgc-casutg,jpgc-dbmon,jmeter.backendlistener.elasticsearch,jpgc-filterresults,jpgc-httpraw,mqmeter,jpgc-jms,jpgc-jmxmon,jmeter.pack-listener,jpgc-json,jpgc-lockfile,mqtt-sampler,jpgc-oauth,jpgc-pde,bzm-parallel,jpgc-prmctl,jpgc-perfmon,jmeter-prometheus,bzm-random-csv,ssh-sampler,tilln-sshmon,jpgc-webdriver,jpgc-plancheck,jpgc-udp,jpgc-csvars,tilln-wssecurity,websocket-sampler,websocket-samplers,jpgc-wsc,jpgc-xml,jpgc-xmpp,jpgc-standard sudo /opt/jmeter/bin/PluginsManagerCMD.sh install jpgc-graphs-basic,jpgc-graphs-additional,jpgc-functions,custom-soap,jpgc-casutg,jpgc-dbmon,jmeter.backendlistener.elasticsearch,jpgc-filterresults,jpgc-httpraw,mqmeter,jpgc-jms,jpgc-jmxmon,jmeter.pack-listener,jpgc-json,jpgc-lockfile,mqtt-sampler,jpgc-oauth,jpgc-pde,bzm-parallel,jpgc-prmctl,jpgc-perfmon,jmeter-prometheus,bzm-random-csv,ssh-sampler,tilln-sshmon,jpgc-webdriver,jpgc-plancheck,jpgc-udp,jpgc-csvars,tilln-wssecurity,websocket-sampler,websocket-samplers,jpgc-wsc,jpgc-xml,jpgc-xmpp,jpgc-standard
...@@ -515,12 +516,13 @@ function uninstallTomEE(){ ...@@ -515,12 +516,13 @@ function uninstallTomEE(){
function installGecko(){ function installGecko(){
echo '============>Installing GeckoDriver .....===========================================================================================================' echo '============>Installing GeckoDriver .....==========================================================================================================='
wget https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz wget https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz
sudo tar -xz -C /usr/bin -f geckodriver-v0.33.0-linux64.tar.gz sudo tar -xz -C /usr/bin -f geckodriver-v0.35.0-linux64.tar.gz
sudo chown root:root /usr/bin/geckodriver sudo chown root:root /usr/bin/geckodriver
sudo chmod +x /usr/bin/geckodriver sudo chmod +x /usr/bin/geckodriver
sudo chmod g-w /usr/bin/geckodriver sudo chmod g-w /usr/bin/geckodriver
rm geckodriver-v0.33.0-linux64.tar.gz rm geckodriver-v0.35.0-linux64.tar.gz
echo '============>GeckoDriver installed.===========================================================================================================' echo '============>GeckoDriver installed.==========================================================================================================='
} }
...@@ -545,7 +547,7 @@ function uninstallNetBeans(){ ...@@ -545,7 +547,7 @@ function uninstallNetBeans(){
#deprecated - new version need license :-( #deprecated - new version need license :-(
function installIdea(){ function installIdea(){
echo '============>Installing Idea IDE .....===========================================================================================================' echo '============>Installing Idea IDE .....==========================================================================================================='
downloadAndExtract /opt ideaIC-2023.3.4.tar.gz idea-IC-233.14475.28 idea-IC https://download-cdn.jetbrains.com/idea/ideaIC-2023.3.4.tar.gz downloadAndExtract /opt ideaIC-2024.2.0.2.tar.gz idea-IC-242.20224.419 idea-IC https://download-cdn.jetbrains.com/idea/ideaIC-2024.2.0.2.tar.gz
createLauncher idea-IC "inteliJ IDEA" /opt/idea-IC/bin/idea.sh /opt/idea-IC/bin/idea.png "inteliJ IDEA Comunity Edition" createLauncher idea-IC "inteliJ IDEA" /opt/idea-IC/bin/idea.sh /opt/idea-IC/bin/idea.png "inteliJ IDEA Comunity Edition"
echo '============>Idea IDE installed.===========================================================================================================' echo '============>Idea IDE installed.==========================================================================================================='
} }
...@@ -588,8 +590,8 @@ function installEclipseSTS(){ ...@@ -588,8 +590,8 @@ function installEclipseSTS(){
function installEclipseJava(){ function installEclipseJava(){
######Install Eclipse for JAVA development package ######Install Eclipse for JAVA development package
installEclipseInstance java https://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/2023-12/R/eclipse-java-2023-12-R-linux-gtk-x86_64.tar.gz \ installEclipseInstance java https://ftp.linux.org.tr/eclipse//technology/epp/downloads/release/2024-06/R/eclipse-java-2024-06-R-linux-gtk-x86_64.tar.gz \
"https://download.eclipse.org/releases/2023-12/,\ "https://download.eclipse.org/releases/2024-06/,\
https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/,\ https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/,\
https://download.eclipse.org/efxclipse/updates-released/3.9.0/site/,\ https://download.eclipse.org/efxclipse/updates-released/3.9.0/site/,\
https://ecd-plugin.github.io/update/" \ https://ecd-plugin.github.io/update/" \
...@@ -611,16 +613,16 @@ org.sf.feeling.decompiler.procyon.feature.group" \ ...@@ -611,16 +613,16 @@ org.sf.feeling.decompiler.procyon.feature.group" \
function installEclipsePapyrus(){ function installEclipsePapyrus(){
######Install Eclipse for JAVA development packages ######Install Eclipse for JAVA development packages
installEclipseInstance papyrus https://mirror.ibcp.fr/pub/eclipse/modeling/mdt/papyrus/rcp/2023-06/6.5.0/papyrus-2023-06-6.5.0-linux64.tar.gz \ installEclipseInstance papyrus https://mirror.leitecastro.com/eclipse/modeling/mdt/papyrus/rcp/2024-06/6.7.0/papyrus-2024-06-6.7.0-linux64.tar.gz \
"https://download.eclipse.org/modeling/mdt/papyrus/updates/releases/2023-06/" \ "https://download.eclipse.org/modeling/mdt/papyrus/updates/releases/2024-06/" \
"org.eclipse.papyrus.sdk.feature.feature.group" \ "org.eclipse.papyrus.sdk.feature.feature.group" \
"Eclipse Papyrus" icon.xpm "Eclipse Papyrus" - Papyrus papyrus "Eclipse Papyrus" icon.xpm "Eclipse Papyrus" - Papyrus papyrus
} }
function installEclipseEE(){ function installEclipseEE(){
######Install Eclipse for EE development package ######Install Eclipse for EE development package
installEclipseInstance ee https://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/2023-12/R/eclipse-jee-2023-12-R-linux-gtk-x86_64.tar.gz \ installEclipseInstance ee https://eclipse.mirror.liteserver.nl/technology/epp/downloads/release/2024-06/R/eclipse-jee-2024-06-R-linux-gtk-x86_64.tar.gz \
"https://download.eclipse.org/releases/2023-12/,\ "https://download.eclipse.org/releases/2024-06/,\
https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/,\ https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/,\
https://download.jboss.org/jbosstools/photon/stable/updates/,\ https://download.jboss.org/jbosstools/photon/stable/updates/,\
https://ecd-plugin.github.io/update/,\ https://ecd-plugin.github.io/update/,\
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment