mirror of
https://github.com/MysticRyuujin/guac-install.git
synced 2023-10-10 13:36:56 +02:00
Updated to work with 0.9.10
Also removed downloaded files
This commit is contained in:
parent
8ee0b24834
commit
68412434fc
@ -1,15 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# WORKING ON UBUNTU 16.04 LTS
|
# WORKING ON UBUNTU 16.04.1 LTS
|
||||||
|
|
||||||
read -s -p "Enter the password that will be used for MySQL Root: " MYSQLROOTPASSWORD
|
read -s -p "Enter the password that will be used for MySQL Root: " MYSQLROOTPASSWORD
|
||||||
read -s -p "Enter the password that will be used for the Guacamole database: " GUACDBUSERPASSWORD
|
read -s -p "Enter the password that will be used for the Guacamole database: " GUACDBUSERPASSWORD
|
||||||
|
|
||||||
#Install Stuff
|
#Install Stuff
|
||||||
apt-get install docker.io mysql-client wget
|
apt-get install docker.io mysql-client wget jq
|
||||||
|
|
||||||
# Download the guacamole auth files for MySQL
|
# Download the guacamole auth files for MySQL
|
||||||
wget -O guacamole-auth-jdbc-0.9.9.tar.gz http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-0.9.9.tar.gz
|
SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred')
|
||||||
tar -xzf guacamole-auth-jdbc-0.9.9.tar.gz
|
wget $SERVER/incubator/guacamole/0.9.10-incubating/binary/guacamole-auth-jdbc-0.9.10-incubating.tar.gz
|
||||||
|
tar -xzf guacamole-auth-jdbc-0.9.10-incubating.tar.gz
|
||||||
|
|
||||||
# Start MySQL
|
# Start MySQL
|
||||||
docker run --restart=always --detach --name=mysql --env="MYSQL_ROOT_PASSWORD=$MYSQLROOTPASSWORD" --publish 3306:3306 mysql
|
docker run --restart=always --detach --name=mysql --env="MYSQL_ROOT_PASSWORD=$MYSQLROOTPASSWORD" --publish 3306:3306 mysql
|
||||||
@ -17,7 +18,8 @@ docker run --restart=always --detach --name=mysql --env="MYSQL_ROOT_PASSWORD=$MY
|
|||||||
# Create the Guacamole database and the user account
|
# Create the Guacamole database and the user account
|
||||||
echo "create database guacamole_db; create user 'guacamole_user'@'localhost' identified by \"$GUACDBUSERPASSWORD\";GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';flush privileges;" | mysql -h 127.0.0.1 -P 3306 -u root -p$MYSQLROOTPASSWORD
|
echo "create database guacamole_db; create user 'guacamole_user'@'localhost' identified by \"$GUACDBUSERPASSWORD\";GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';flush privileges;" | mysql -h 127.0.0.1 -P 3306 -u root -p$MYSQLROOTPASSWORD
|
||||||
|
|
||||||
cat guacamole-auth-jdbc-0.9.9/mysql/schema/*.sql | mysql -u root -p$MYSQLROOTPASSWORD -h 127.0.0.1 -P 3306 guacamole_db
|
cat guacamole-auth-jdbc-0.9.10-incubating/mysql/schema/*.sql | mysql -u root -p$MYSQLROOTPASSWORD -h 127.0.0.1 -P 3306 guacamole_db
|
||||||
|
|
||||||
docker run --restart=always --name guacd -d glyptodon/guacd
|
docker run --restart=always --name guacd -d glyptodon/guacd
|
||||||
docker run --restart=always --name guacamole --link mysql:mysql --link guacd:guacd -e MYSQL_HOSTNAME=127.0.0.1 -e MYSQL_DATABASE=guacamole_db -e MYSQL_USER=guacamole_user -e MYSQL_PASSWORD=$GUACDBUSERPASSWORD --detach -p 8080:8080 glyptodon/guacamole
|
docker run --restart=always --name guacamole --link mysql:mysql --link guacd:guacd -e MYSQL_HOSTNAME=127.0.0.1 -e MYSQL_DATABASE=guacamole_db -e MYSQL_USER=guacamole_user -e MYSQL_PASSWORD=$GUACDBUSERPASSWORD --detach -p 8080:8080 glyptodon/guacamole
|
||||||
|
rm -rf guacamole-auth-jdbc-0.9.10-incubating*
|
||||||
|
Loading…
Reference in New Issue
Block a user