mirror of
https://github.com/MysticRyuujin/guac-install.git
synced 2023-10-10 13:36:56 +02:00
Merge pull request #7 from MysticRyuujin/MSJV
MySQL Connector/J Upgrade
This commit is contained in:
commit
4e2c96a84c
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Version Numbers of Guacamole and MySQL Connection/J to download
|
||||
VERSION="0.9.12"
|
||||
MCJVERSION = "5.1.43"
|
||||
|
||||
# Grab a password for MySQL Root
|
||||
read -s -p "Enter the password that will be used for MySQL Root: " mysqlrootpassword
|
||||
@ -34,12 +36,12 @@ echo "GUACAMOLE_HOME=/etc/guacamole" >> /etc/default/tomcat8
|
||||
wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/source/guacamole-server-${VERSION}-incubating.tar.gz
|
||||
wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-${VERSION}-incubating.war
|
||||
wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-auth-jdbc-${VERSION}-incubating.tar.gz
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.41.tar.gz
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MCJVERSION}.tar.gz
|
||||
|
||||
# Extract Guacamole Files
|
||||
tar -xzf guacamole-server-${VERSION}-incubating.tar.gz
|
||||
tar -xzf guacamole-auth-jdbc-${VERSION}-incubating.tar.gz
|
||||
tar -xzf mysql-connector-java-5.1.41.tar.gz
|
||||
tar -xzf mysql-connector-java-${MCJVERSION}.tar.gz
|
||||
|
||||
# MAKE DIRECTORIES
|
||||
mkdir /etc/guacamole
|
||||
@ -59,7 +61,7 @@ cd ..
|
||||
mv guacamole-${VERSION}-incubating.war /etc/guacamole/guacamole.war
|
||||
ln -s /etc/guacamole/guacamole.war /var/lib/tomcat8/webapps/
|
||||
ln -s /usr/local/lib/freerdp/* /usr/lib/x86_64-linux-gnu/freerdp/.
|
||||
cp mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar /etc/guacamole/lib/
|
||||
cp mysql-connector-java-${MCJVERSION}/mysql-connector-java-${MCJVERSION}-bin.jar /etc/guacamole/lib/
|
||||
cp guacamole-auth-jdbc-${VERSION}-incubating/mysql/guacamole-auth-jdbc-mysql-${VERSION}-incubating.jar /etc/guacamole/extensions/
|
||||
|
||||
# Configure guacamole.properties
|
||||
@ -91,4 +93,4 @@ cat guacamole-auth-jdbc-${VERSION}-incubating/mysql/schema/*.sql | mysql -u root
|
||||
|
||||
# Cleanup
|
||||
rm -rf guacamole-*
|
||||
rm -rf mysql-connector-java-5.1.41*
|
||||
rm -rf mysql-connector-java-${MCJVERSION}*
|
||||
|
@ -1,4 +1,7 @@
|
||||
# Version Numbers of Guacamole and MySQL Connection/J to download
|
||||
VERSION="0.9.12"
|
||||
MCJVERSION = "5.1.43"
|
||||
|
||||
SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred|rtrimstr("/")')
|
||||
|
||||
# Stop Tomcat
|
||||
@ -24,6 +27,12 @@ wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-auth-j
|
||||
tar -xzf guacamole-auth-jdbc-${VERSION}-incubating.tar.gz
|
||||
cp guacamole-auth-jdbc-${VERSION}-incubating/mysql/guacamole-auth-jdbc-mysql-${VERSION}-incubating.jar /etc/guacamole/extensions/
|
||||
|
||||
# Upgrade the MySQL Connector-J
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MCJVERSION}.tar.gz
|
||||
tar -xzf mysql-connector-java-${MCJVERSION}.tar.gz
|
||||
cp mysql-connector-java-${MCJVERSION}/mysql-connector-java-${MCJVERSION}-bin.jar /etc/guacamole/lib/
|
||||
rm -rf mysql-connector-java-${MCJVERSION}*
|
||||
|
||||
# Check if there is an schema upgrade file, if there is run it (will prompt for password)
|
||||
if [ -f "guacamole-auth-jdbc-${VERSION}-incubating/mysql/schema/upgrade/upgrade-pre-${VERSION}.sql" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user