I was looking around for the installation how to for Guac on FreeNAS jail but was unable to find one so I decided to write down the steps I took during the installation and post it here.
from
http://guac-dev.org/:
Create new jail with default settings
Login to the jail Shell by clicking on shell icon in Jail section in FreeNAS gui or by doing
jexec # csh from FreeNAS shell where # is the jail id that you can check by doing
jls
(for all the ports below when asked leave default settings)
Code:
portsnap fetch extract
cd /usr/ports/graphics/cairo
make install clean
cd /usr/ports/net/libvncserver
make install clean
cd /usr/ports/misc/ossp-uuid
make install clean
cd /usr/ports/x11-toolkits/pango
make install clean
cd /usr/ports/security/libssh2
make install clean
cd /usr/ports/java/openjdk7
make install clean
cd /usr/ports/www/jetty
make install clean
cd /usr/ports/databases/mysql56-server
make install clean
OR if you don't want to stare on the screen for an hour you can do: (it will still take some time but will not require your interaction until it finishes)
Code:
portsnap fetch extract && cd /usr/ports/graphics/cairo && make -DBATCH install clean && cd /usr/ports/net/libvncserver && make -DBATCH install clean && cd /usr/ports/misc/ossp-uuid && make -DBATCH install clean && cd /usr/ports/x11-toolkits/pango && make -DBATCH install clean && cd /usr/ports/security/libssh2 && make -DBATCH install clean && cd /usr/ports/java/openjdk7 && make -DBATCH install clean && cd /usr/ports/www/jetty && make -DBATCH install clean && cd /usr/ports/databases/mysql56-server && make -DBATCH install clean
Thanks to Deviant0ne for this next part. Go ahead or give him a like or something on the post below.
Install older version of FreeRDP to make RDP work:
Code:
mkdir ~/old_freerdp
svn co -r 387082 svn://svn.freebsd.org/ports/head/net/freerdp ~/old_freerdp
cd ~/old_freerdp && make install clean BATCH=yes
Download Guacamole server source, Guacamole web app, Guacamole jdbc auth modules and MySQL connector for JAVA
Code:
cd ~
fetch http://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-0.9.8.tar.gz
fetch http://sourceforge.net/projects/guacamole/files/current/binary/guacamole-0.9.8.war
fetch http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-0.9.8.tar.gz
fetch http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.36.tar.gz
Extract what needs to be extracted
Code:
tar -zxvf guacamole-server-0.9.8.tar.gz
tar -zxvf guacamole-auth-jdbc-0.9.8.tar.gz
tar -zxvf mysql-connector-java-5.1.36.tar.gz
Configure, compile and install Guacamole Server
Code:
cd ~/guacamole-server-0.9.8
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" --with-init-dir=/etc/rc.d
make install
Edit ~/.cshrc (i recommend ee ) and add this under the other setenv lines and save the file
Code:
setenv GUACAMOLE_HOME /usr/local/jetty/.guacamole
Create some directories and move some files
Code:
mkdir /usr/local/jetty/.guacamole /usr/local/jetty/.guacamole/extensions /usr/local/jetty/.guacamole/lib
mv ~/mysql-connector-java-5.1.36/*.jar /usr/local/jetty/.guacamole/lib/
mv ~/guacamole-auth-jdbc-0.9.8/mysql/*.jar /usr/local/jetty/.guacamole/extensions/
mv ~/guacamole-*.war /usr/local/jetty/webapps/guacamole.war
Start MySQL server
Code:
service mysql-server onestart
Set the database up
Code:
mysqladmin -u root password 'YOUR_NEW_ROOT_PASS_FOR_MYSQL'
mysql -u root -p
create database GUACAMOLE_DB_NAME;
create user 'GUACAMOLE_USERNAME'@'localhost' identified by 'GUACAMOLE_USER_PASS';
grant select,insert,update,delete on GUACAMOLE_DB_NAME.* to 'GUACAMOLE_USERNAME'@'localhost';
flush privileges;
quit
cd ~/guacamole-auth-jdbc-0.9.8/mysql/schema
cat ./*.sql | mysql -u root -p GUACAMOLE_DB_NAME
Edit /usr/local/jetty/.guacamole/guacamole.properties (again I recommend ee) the file will be empty (it does not exist yet) type this in and save:
Code:
# MySQL properties
mysql-hostname: localhost
mysql-port: 3306
mysql-database: GUACAMOLE_DB_NAME
mysql-username: GUACAMOLE_USERNAME
mysql-password: GUACAMOLE_USER_PASS
Start Jetty and Guacd
Code:
service jetty onestart
service guacd start
Now you should see Jetty start page on
http://jour_jail_ip:8080 and Guacamole Login page at:
http://your_jail_ip:8080/guacamole/
Default admin login and pass to Guacamole is
guacadmin/guacadmin
If everything is working ok you can make Guacamole start automatically with your jail by doing this:
Edit /etc/rc.conf type this in at the end of file and save:
Code:
mysql_enable="YES"
jetty_enable="YES"
guacd_enable="YES"
Edit /etc/rc.d/guacd and after:
Code:
try-restart)
status && restart
;;
add this and save:
Code:
quietstart)
start
;;
Restart your jail and verify that everything is working.