Last active
July 5, 2019 22:42
-
-
Save bspavel/d6394026eff4df5a88e8991332cc82e0 to your computer and use it in GitHub Desktop.
the installer of the apache guacamole on the raspberry pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#http://www.m-opensolutions.com/?p=936 | |
if [ "$(whoami)" != "root" ]; then | |
echo "Run script as ROOT please. (sudo !!!)" | |
exit | |
fi | |
# Disable Wi-Fi and Bluetooth | |
read -p "Do you want to disable modules Wi-Fi and Bluetooth? <y/N> " prompt | |
if [ "$prompt" = "y" ]; then | |
cat >> /boot/config.txt << "EOF" | |
dtoverlay=pi3-disable-wifi | |
dtoverlay=pi3-disable-bt | |
EOF | |
fi | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install libcairo2-dev -y | |
sudo apt-get install libjpeg62-turbo-dev -y | |
sudo apt-get install libpng12-dev -y | |
sudo apt-get install libossp-uuid-dev -y | |
sudo apt-get install libavcodec-dev libavutil-dev libswscale-dev -y | |
sudo apt-get install libpango1.0-dev -y | |
sudo apt-get install libssh2-1-dev -y | |
sudo apt-get install libtelnet-dev -y | |
sudo apt-get install libvncserver-dev -y | |
sudo apt-get install libpulse-dev -y | |
sudo apt-get install libssl-dev -y | |
sudo apt-get install libvorbis-dev -y | |
sudo apt-get install libwebp-dev -y | |
sudo apt-get install x11vnc -y | |
sudo apt-get install jetty9 -y | |
sudo apt-get install gawk libfreerdp-clibfreerdp -y | |
sudo apt-get install maven -y | |
sudo apt-get install libfreerdp-dev -y | |
sudo apt-get install galternatives openjdk-8-jdk -y | |
wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-0.9.14.tar.gz | |
wget http://sourceforge.net/projects/guacamole/files/current/source/guacamole-client-0.9.14.tar.gz | |
tar xzf guacamole-server-0.9.14.tar.gz | |
cd guacamole-server-0.9.14 | |
./configure --with-init-dir=/etc/init.d | |
make | |
sudo make install | |
sudo update-rc.d guacd defaults | |
sudo ldconfig | |
cd .. | |
tar xzf guacamole-client-0.9.14.tar.gz | |
cd guacamole-client-0.9.14 | |
mvn package | |
sudo cp guacamole/target/guacamole-0.9.14.war /var/lib/jetty9/webapps/guacamole.war | |
sudo mkdir -p /etc/guacamole/extensions | |
sudo cp extensions/guacamole-auth-noauth/target/guacamole-auth-noauth-0.9.14.jar /etc/guacamole/extensions/. | |
cat > /etc/guacamole/guacamole.properties << "EOF" | |
# Guacamole - Clientless Remote Desktop | |
# Copyright (C) 2010 Michael Jumper | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU Affero General Public License for more details. | |
# | |
# You should have received a copy of the GNU Affero General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
# Hostname and port of guacamole proxy | |
guacd-hostname: localhost | |
guacd-port: 4822 | |
# Auth provider class (authenticates user/pass combination, needed if using the provided login screen) | |
#auth-provider: net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvider | |
#basic-user-mapping: /etc/guacamole/user-mapping.xml | |
# NoAuth properties | |
auth-provider: net.sourceforge.guacamole.net.auth.noauth.NoAuthenticationProvider | |
noauth-config: /etc/guacamole/noauth-config.xml | |
EOF | |
cat > /etc/guacamole/user-mapping.xml << "EOF" | |
<user-mapping> | |
<authorize | |
username="pi" | |
password="b89749505e144b564adfe3ea8fc394aa" | |
encoding="md5"> | |
<connection name="pi"> | |
<protocol>vnc</protocol> | |
<param name="hostname">localhost</param> | |
<param name="port">5900</param> | |
<param name="swap-red-blue">false</param> | |
<param name="enable-audio">true</param> | |
</connection> | |
</authorize> | |
</user-mapping> | |
EOF | |
cat > /etc/guacamole/noauth-config.xml << "EOF" | |
<configs> | |
<config name="server" protocol="rdp"> | |
<param name="hostname" value="ipaddress" /> | |
<param name="port" value="3389" /> | |
</config> | |
</configs> | |
EOF | |
echo "reboot system or service" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment