CentOS 7 환경에서 Guacamole(과카몰리) 환경 구성 테스트 내용을 정리 합니다.
가이드 문서
테스트 환경
- CentOS 7 in VirtualBox
[root@localhost ~]# uname -r
3.10.0-957.5.1.el7.x86_64
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@localhost ~]#
환경 구성
작업 공간
# 작업 디렉토리
[root@localhost ~]# mkdir guacamole
[root@localhost ~]# cd guacamole/
[root@localhost guacamole]# pwd
/root/guacamole
[root@localhost guacamole]#
패키지 설치
# Default Package
[root@localhost guacamole]# yum -y install epel-release
[root@localhost guacamole]# rpm -Uvh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
# Required dependencies
[root@localhost guacamole]# yum -y install cairo-devel libjpeg-turbo-devel libjpeg-devel libpng-devel libtool libuuid-devel uuid-devel
# Optional dependencies
[root@localhost guacamole]# yum -y install ffmpeg-devel freerdp-devel pango-devel libssh2-devel libtelnet-devel libvncserver-devel libwebsockets-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel
# 패키지 설치 결과
[root@localhost guacamole]# yum -y install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.anigil.com
* epel: mirror.misakamikoto.network
* extras: mirror.anigil.com
* rpmfusion-free-updates: mirrors.ustc.edu.cn
* updates: mirror.anigil.com
Package epel-release-7-14.noarch already installed and latest version
Nothing to do
[root@localhost guacamole]# yum -y install cairo-devel libjpeg-turbo-devel libjpeg-devel libpng-devel libtool libuuid-devel uuid-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.anigil.com
* epel: mirror.misakamikoto.network
* extras: mirror.anigil.com
* rpmfusion-free-updates: mirrors.ustc.edu.cn
* updates: mirror.anigil.com
Package cairo-devel-1.15.12-4.el7.x86_64 already installed and latest version
Package libjpeg-turbo-devel-1.2.90-8.el7.x86_64 already installed and latest version
Package libjpeg-turbo-devel-1.2.90-8.el7.x86_64 already installed and latest version
Package 2:libpng-devel-1.5.13-8.el7.x86_64 already installed and latest version
Package libtool-2.4.2-22.el7_3.x86_64 already installed and latest version
Package libuuid-devel-2.23.2-65.el7_9.1.x86_64 already installed and latest version
Package uuid-devel-1.6.2-26.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost guacamole]# yum -y install ffmpeg-devel freerdp-devel pango-devel libssh2-devel libtelnet-devel libvncserver-devel libwebsockets-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.anigil.com
* epel: mirror.misakamikoto.network
* extras: mirror.anigil.com
* rpmfusion-free-updates: mirrors.ustc.edu.cn
* updates: mirror.anigil.com
Package ffmpeg-devel-3.4.11-1.el7.x86_64 already installed and latest version
Package freerdp-devel-2.1.1-5.el7_9.x86_64 already installed and latest version
Package pango-devel-1.42.4-4.el7_7.x86_64 already installed and latest version
Package libssh2-devel-1.8.0-4.el7.x86_64 already installed and latest version
Package libtelnet-devel-0.23-1.el7.x86_64 already installed and latest version
Package libvncserver-devel-0.9.9-14.el7_8.1.x86_64 already installed and latest version
Package libwebsockets-devel-3.0.1-2.el7.x86_64 already installed and latest version
Package pulseaudio-libs-devel-10.0-6.el7_9.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-25.el7_9.x86_64 already installed and latest version
Package 1:libvorbis-devel-1.3.3-8.el7.1.x86_64 already installed and latest version
Package libwebp-devel-0.3.0-10.el7_9.x86_64 already installed and latest version
Nothing to do
[root@localhost guacamole]#
Guacmole 소스 다운로드
# Source Downloads
[root@localhost guacamole]# [웹겟] https://downloads.apache.org/guacamole/1.4.0/source/guacamole-server-1.4.0.tar.gz
--2022-09-01 11:27:01-- https://downloads.apache.org/guacamole/1.4.0/source/guacamole-server-1.4.0.tar.gz
Resolving downloads.apache.org (downloads.apache.org)... 135.181.214.104, 88.99.95.219, 2a01:4f9:3a:2c57::2, ...
Connecting to downloads.apache.org (downloads.apache.org)|135.181.214.104|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1099194 (1.0M) [application/x-gzip]
Saving to: ‘guacamole-server-1.4.0.tar.gz’
100%[======================================================================>] 1,099,194 338KB/s in 3.2s
2022-09-01 11:27:05 (338 KB/s) - ‘guacamole-server-1.4.0.tar.gz’ saved [1099194/1099194]
[root@localhost guacamole]#
[root@localhost guacamole]# ll
합계 1076
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
[root@localhost guacamole]#
[root@localhost guacamole]# tar -xzf guacamole-server-1.4.0.tar.gz
[root@localhost guacamole]# ll
합계 1080
drwxrwxr-x. 8 1001 1001 4096 12월 29 2021 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
[root@localhost guacamole]#
소스 컴파일 및 설치
# Source Compile
[root@localhost guacamole]# cd guacamole-server-1.4.0/
[root@localhost guacamole-server-1.4.0]#
[root@localhost guacamole-server-1.4.0]# ./configure --with-init-dir=/etc/init.d
...
------------------------------------------------
guacamole-server version 1.4.0
------------------------------------------------
Library status:
freerdp2 ............ yes
pango ............... yes
libavcodec .......... yes
libavformat.......... yes
libavutil ........... yes
libssh2 ............. yes
libssl .............. yes
libswscale .......... yes
libtelnet ........... yes
libVNCServer ........ no
libvorbis ........... yes
libpulse ............ yes
libwebsockets ....... yes
libwebp ............. yes
wsock32 ............. no
Protocol support:
Kubernetes .... yes
RDP ........... yes
SSH ........... yes
Telnet ........ yes
VNC ........... no
Services / tools:
guacd ...... yes
guacenc .... yes
guaclog .... yes
FreeRDP plugins: /usr/lib64/freerdp2
Init scripts: /etc/init.d
Systemd units: no
Type "make" to compile guacamole-server.
[root@localhost guacamole-server-1.4.0]#
[root@localhost guacamole-server-1.4.0]# make
...
[root@localhost guacamole-server-1.4.0]# make install
...
Guacamole 서비스 구동
# 서비스 구동
[root@localhost guacamole-server-1.4.0]# systemctl enable guacd
guacd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig guacd on
[root@localhost guacamole-server-1.4.0]# systemctl start guacd
[root@localhost guacamole-server-1.4.0]# systemctl status guacd
● guacd.service - LSB: Guacamole proxy daemon
Loaded: loaded (/etc/rc.d/init.d/guacd; bad; vendor preset: disabled)
Active: active (running) since 목 2022-09-01 11:38:50 KST; 4s ago
Docs: man:systemd-sysv-generator(8)
Process: 25998 ExecStart=/etc/rc.d/init.d/guacd start (code=exited, status=0/SUCCESS)
Tasks: 1
CGroup: /system.slice/guacd.service
└─26022 /usr/local/sbin/guacd -p /var/run/guacd.pid
9월 01 11:38:50 localhost.localdomain systemd[1]: Starting LSB: Guacamole proxy daemon...
9월 01 11:38:50 localhost.localdomain guacd[25998]: Starting guacd: guacd[25999]: INFO: Guacamole...ted
9월 01 11:38:50 localhost.localdomain systemd[1]: Started LSB: Guacamole proxy daemon.
9월 01 11:38:50 localhost.localdomain guacd[25998]: SUCCESS
9월 01 11:38:50 localhost.localdomain guacd[26022]: Listening on host ::1, port 4822
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost guacamole-server-1.4.0]# ps -ef | grep guac
root 26022 1 0 11:38 ? 00:00:00 /usr/local/sbin/guacd -p /var/run/guacd.pid
[root@localhost guacamole-server-1.4.0]#
[root@localhost guacamole-server-1.4.0]# netstat -nltp | grep guacd
tcp6 0 0 ::1:4822 :::* LISTEN 26022/guacd
[root@localhost guacamole]#
Tomcat 설치
# OpenJDK And Tomcat Installation
[root@localhost guacamole]# yum -y install java-1.8.0-openjdk.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.anigil.com
* epel: ftp.iij.ad.jp
* extras: mirror.anigil.com
* rpmfusion-free-updates: mirror.fcix.net
* updates: mirror.anigil.com
Package 1:java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64 already installed and latest version
Nothing to do
[root@localhost guacamole-server-1.4.0]# groupadd tomcat
[root@localhost guacamole-server-1.4.0]# useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat
[root@localhost guacamole-server-1.4.0]# [웹겟] https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.28/bin/apache-tomcat-8.5.28.tar.gz
--2022-09-01 11:44:56-- https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.28/bin/apache-tomcat-8.5.28.tar.gz
Resolving archive.apache.org (archive.apache.org)... 138.201.131.134, 2a01:4f8:172:2ec5::2
Connecting to archive.apache.org (archive.apache.org)|138.201.131.134|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9544774 (9.1M) [application/x-gzip]
Saving to: ‘apache-tomcat-8.5.28.tar.gz’
100%[======================================================================>] 9,544,774 2.33MB/s in 3.9s
2022-09-01 11:45:01 (2.33 MB/s) - ‘apache-tomcat-8.5.28.tar.gz’ saved [9544774/9544774]
[root@localhost guacamole]# mkdir /opt/tomcat
[root@localhost guacamole]# ll
합계 10404
-rw-r--r--. 1 root root 9544774 2월 7 2018 apache-tomcat-8.5.28.tar.gz
drwxrwxr-x. 8 tomcat tomcat 4096 9월 1 11:45 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
[root@localhost guacamole]# tar xvf apache-tomcat-8.5.28.tar.gz -C /opt/tomcat --strip-components=1
...
Tomcat 서비스 구동
# Tomcat Service Start
[root@localhost guacamole]# ll /opt/
합계 0
drwxr-xr-x. 9 root root 147 2월 27 2019 VBoxGuestAdditions-5.2.18
drwxr-xr-x. 2 root root 6 10월 31 2018 rh
drwxr-xr-x. 9 root root 160 9월 1 11:46 tomcat
[root@localhost guacamole]# chown -R tomcat:tomcat /opt/tomcat/
[root@localhost guacamole]# ll /opt/
합계 0
drwxr-xr-x. 9 root root 147 2월 27 2019 VBoxGuestAdditions-5.2.18
drwxr-xr-x. 2 root root 6 10월 31 2018 rh
drwxr-xr-x. 9 tomcat tomcat 160 9월 1 11:46 tomcat
[root@localhost guacamole]#
[root@localhost guacamole]# /opt/tomcat/bin/startup.sh
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@localhost guacamole]# netstat -nltp | grep java
tcp6 0 0 :::8009 :::* LISTEN 26592/java
tcp6 0 0 :::8080 :::* LISTEN 26592/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 26592/java
[root@localhost guacamole]#
Tomcat 서비스 등록
# Tomcat Service 등록
[root@localhost guacamole]# cat /etc/systemd/system/tomcat.service
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment="JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64/jre"
Environment="CATALINA_HOME=/opt/tomcat"
Environment="CATALINA_BASE=/opt/tomcat"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
[root@localhost guacamole]#
[root@localhost opt]# systemctl enable tomcat
Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat.service to /etc/systemd/system/tomcat.service.
[root@localhost guacamole]# systemctl start tomcat
Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.
[root@localhost opt]# systemctl status tomcat
● tomcat.service - Apache Tomcat Web Application Container
Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: disabled)
Active: active (running) since 목 2022-09-01 13:28:42 KST; 4s ago
Process: 2378 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 2388 (java)
Tasks: 17
CGroup: /system.slice/tomcat.service
└─2388 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64/jre/bin/java -Djava.util.loggi...
9월 01 13:28:42 localhost.localdomain systemd[1]: Starting Apache Tomcat Web Application Container...
9월 01 13:28:42 localhost.localdomain systemd[1]: Started Apache Tomcat Web Application Container.
[root@localhost guacamole]#
Guacamole WebUI 설치
# Guacamole WebUI Installaton
[root@localhost guacamole]# [웹겟] https://downloads.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war
--2022-09-01 11:59:20-- https://downloads.apache.org/guacamole/1.4.0/binary/guacamole-1.4.0.war
Resolving downloads.apache.org (downloads.apache.org)... 135.181.214.104, 88.99.95.219, 2a01:4f8:10a:201a::2, ...
Connecting to downloads.apache.org (downloads.apache.org)|135.181.214.104|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12277201 (12M)
Saving to: ‘guacamole-1.4.0.war’
100%[======================================================================>] 12,277,201 2.09MB/s in 7.3s
2022-09-01 11:59:28 (1.60 MB/s) - ‘guacamole-1.4.0.war’ saved [12277201/12277201]
[root@localhost guacamole]# ll
합계 22396
-rw-r--r--. 1 root root 9544774 2월 7 2018 apache-tomcat-8.5.28.tar.gz
-rw-r--r--. 1 root root 12277201 12월 29 2020 guacamole-1.4.0.war
drwxrwxr-x. 8 tomcat tomcat 4096 9월 1 11:45 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
[root@localhost guacamole]#
[root@localhost guacamole]# cp guacamole-1.4.0.war /opt/tomcat/webapps/guacamole.war
[root@localhost guacamole]# ll /opt/tomcat/webapps/
합계 12000
drwxr-x---. 3 tomcat tomcat 4096 9월 1 11:46 ROOT
drwxr-x---. 14 tomcat tomcat 4096 9월 1 11:46 docs
drwxr-x---. 6 tomcat tomcat 83 9월 1 11:46 examples
drwxr-x---. 11 tomcat tomcat 4096 9월 1 12:00 guacamole
-rw-r--r--. 1 tomcat tomcat 12277201 9월 1 11:59 guacamole.war
drwxr-x---. 5 tomcat tomcat 87 9월 1 11:46 host-manager
drwxr-x---. 5 tomcat tomcat 103 9월 1 11:46 manager
[root@localhost guacamole]#
MariaDB 설치
# MariaDB Installation
[root@localhost guacamole]# yum -y install mariadb mariadb-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.anigil.com
* epel: mirror.misakamikoto.network
* extras: mirror.anigil.com
* rpmfusion-free-updates: mirrors.ustc.edu.cn
* updates: mirror.anigil.com
Package 1:mariadb-5.5.68-1.el7.x86_64 already installed and latest version
Package 1:mariadb-server-5.5.68-1.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost guacamole]#
[root@localhost guacamole]# systemctl start mariadb
[root@localhost guacamole]# systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (running) since 목 2022-09-01 13:30:38 KST; 4s ago
Process: 2906 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 2804 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 2905 (mysqld_safe)
Tasks: 20
CGroup: /system.slice/mariadb.service
├─2905 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─3072 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/p...
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: MySQL manual for more instructions.
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: Please report any problems at http://...ra
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: The latest information about MariaDB .../.
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: You can find additional information a...t:
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: http://dev.mysql.com
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: Consider joining MariaDB's strong and...y:
9월 01 13:30:36 localhost.localdomain mariadb-prepare-db-dir[2804]: https://mariadb.org/get-involved/
9월 01 13:30:36 localhost.localdomain mysqld_safe[2905]: 220901 13:30:36 mysqld_safe Logging to '/var/lo...g'.
9월 01 13:30:36 localhost.localdomain mysqld_safe[2905]: 220901 13:30:36 mysqld_safe Starting mysqld dae...sql
9월 01 13:30:38 localhost.localdomain systemd[1]: Started MariaDB database server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost guacamole]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@localhost guacamole]#
MariaDB 초기 설정
# Mariadb 초기 셋팅
[root@localhost guacamole]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
[root@localhost guacamole]#
Guacamole Database 생성
# Guacamole Database Create
MariaDB [(none)]> CREATE DATABASE guacdb CHARACTER SET utf8 COLLATE utf8_general_ci;
MariaDB [(none)]> CREATE USER 'guacdb-user'@'localhost' IDENTIFIED BY '[Password]';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON guacdb.* TO 'guacdb-user'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
[root@localhost guacamole]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 13
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE guacdb CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> CREATE USER 'guacdb-user'@'localhost' IDENTIFIED BY '[Password]';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON guacdb.* TO 'guacdb-user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> EXIT;
Bye
[root@localhost guacamole]#
MySQL Connector 설치
# MySQL Connector Installation
[root@localhost guacamole]# mkdir -p /etc/guacamole/{extensions,lib}
[root@localhost guacamole]# ll /etc/guacamole/
합계 0
drwxr-xr-x. 2 root root 6 9월 1 13:53 extensions
drwxr-xr-x. 2 root root 6 9월 1 13:53 lib
[root@localhost guacamole]#
[root@localhost guacamole]# [웹겟] https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.45.tar.gz
--2022-09-01 13:53:57-- https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.45.tar.gz
Resolving dev.mysql.com (dev.mysql.com)... 104.74.173.121, 2600:1410:2000:194::2e31, 2600:1410:2000:1b1::2e31
Connecting to dev.mysql.com (dev.mysql.com)|104.74.173.121|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://cdn.mysql.com//archives/mysql-connector-java-5.1/mysql-connector-java-5.1.45.tar.gz [following]
--2022-09-01 13:53:57-- https://cdn.mysql.com//archives/mysql-connector-java-5.1/mysql-connector-java-5.1.45.tar.gz
Resolving cdn.mysql.com (cdn.mysql.com)... 23.45.57.22
Connecting to cdn.mysql.com (cdn.mysql.com)|23.45.57.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3467861 (3.3M) [application/x-tar-gz]
Saving to: ‘mysql-connector-java-5.1.45.tar.gz’
100%[======================================================================>] 3,467,861 3.97MB/s in 0.8s
2022-09-01 13:53:59 (3.97 MB/s) - ‘mysql-connector-java-5.1.45.tar.gz’ saved [3467861/3467861]
[root@localhost guacamole]# ll
합계 25784
-rw-r--r--. 1 root root 9544774 2월 7 2018 apache-tomcat-8.5.28.tar.gz
-rw-r--r--. 1 root root 12277201 12월 29 2020 guacamole-1.4.0.war
drwxrwxr-x. 8 tomcat tomcat 4096 9월 1 11:45 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
-rw-r--r--. 1 root root 3467861 11월 22 2017 mysql-connector-java-5.1.45.tar.gz
[root@localhost guacamole]#
[root@localhost guacamole]# tar xf mysql-connector-java-5.1.45.tar.gz
[root@localhost guacamole]# ll
합계 25784
-rw-r--r--. 1 root root 9544774 2월 7 2018 apache-tomcat-8.5.28.tar.gz
-rw-r--r--. 1 root root 12277201 12월 29 2020 guacamole-1.4.0.war
drwxrwxr-x. 8 tomcat tomcat 4096 9월 1 11:45 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
drwxr-xr-x. 3 root root 139 11월 22 2017 mysql-connector-java-5.1.45
-rw-r--r--. 1 root root 3467861 11월 22 2017 mysql-connector-java-5.1.45.tar.gz
[root@localhost guacamole]#
[root@localhost guacamole]# cp mysql-connector-java-5.1.45/mysql-connector-java-5.1.45-bin.jar /etc/guacamole/lib/
[root@localhost guacamole]# ll /etc/guacamole/lib/
합계 980
-rw-r--r--. 1 root root 999810 9월 1 13:54 mysql-connector-java-5.1.45-bin.jar
[root@localhost guacamole]#
[root@localhost guacamole]# [웹겟] https://archive.apache.org/dist/guacamole/1.3.0/binary/guacamole-auth-jdbc-1.3.0.tar.gz
--2022-09-01 13:56:02-- https://archive.apache.org/dist/guacamole/1.3.0/binary/guacamole-auth-jdbc-1.3.0.tar.gz
Resolving archive.apache.org (archive.apache.org)... 138.201.131.134, 2a01:4f8:172:2ec5::2
Connecting to archive.apache.org (archive.apache.org)|138.201.131.134|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15411981 (15M) [application/x-gzip]
Saving to: ‘guacamole-auth-jdbc-1.3.0.tar.gz’
100%[======================================================================>] 15,411,981 2.88MB/s in 6.6s
2022-09-01 13:56:10 (2.21 MB/s) - ‘guacamole-auth-jdbc-1.3.0.tar.gz’ saved [15411981/15411981]
[root@localhost guacamole]# ll
합계 40836
-rw-r--r--. 1 root root 9544774 2월 7 2018 apache-tomcat-8.5.28.tar.gz
-rw-r--r--. 1 root root 12277201 12월 29 2020 guacamole-1.4.0.war
-rw-r--r--. 1 root root 15411981 12월 29 2020 guacamole-auth-jdbc-1.3.0.tar.gz
drwxrwxr-x. 8 tomcat tomcat 4096 9월 1 11:45 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
drwxr-xr-x. 3 root root 139 11월 22 2017 mysql-connector-java-5.1.45
-rw-r--r--. 1 root root 3467861 11월 22 2017 mysql-connector-java-5.1.45.tar.gz
[root@localhost guacamole]#
[root@localhost guacamole]# [웹겟] https://archive.apache.org/dist/guacamole/1.3.0/binary/guacamole-auth-jdbc-1.3.0.tar.gz
--2022-09-01 13:56:02-- https://archive.apache.org/dist/guacamole/1.3.0/binary/guacamole-auth-jdbc-1.3.0.tar.gz
Resolving archive.apache.org (archive.apache.org)... 138.201.131.134, 2a01:4f8:172:2ec5::2
Connecting to archive.apache.org (archive.apache.org)|138.201.131.134|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15411981 (15M) [application/x-gzip]
Saving to: ‘guacamole-auth-jdbc-1.3.0.tar.gz’
100%[======================================================================>] 15,411,981 2.88MB/s in 6.6s
2022-09-01 13:56:10 (2.21 MB/s) - ‘guacamole-auth-jdbc-1.3.0.tar.gz’ saved [15411981/15411981]
[root@localhost guacamole]# ll
합계 40836
-rw-r--r--. 1 root root 9544774 2월 7 2018 apache-tomcat-8.5.28.tar.gz
-rw-r--r--. 1 root root 12277201 12월 29 2020 guacamole-1.4.0.war
-rw-r--r--. 1 root root 15411981 12월 29 2020 guacamole-auth-jdbc-1.3.0.tar.gz
drwxrwxr-x. 8 tomcat tomcat 4096 9월 1 11:45 guacamole-server-1.4.0
-rw-r--r--. 1 root root 1099194 12월 29 2021 guacamole-server-1.4.0.tar.gz
drwxr-xr-x. 3 root root 139 11월 22 2017 mysql-connector-java-5.1.45
-rw-r--r--. 1 root root 3467861 11월 22 2017 mysql-connector-java-5.1.45.tar.gz
[root@localhost guacamole]#
[root@localhost guacamole]# cp guacamole-auth-jdbc-1.3.0/mysql/guacamole-auth-jdbc-mysql-1.3.0.jar /etc/guacamole/extensions/
[root@localhost guacamole]# ll /etc/guacamole/extensions/
합계 5592
-rw-r--r--. 1 root root 5723345 9월 1 13:57 guacamole-auth-jdbc-mysql-1.3.0.jar
[root@localhost guacamole]#
Guacamole DB Schema 구성
# Guacamole DB Schema Import
[root@localhost guacamole]# cd guacamole-auth-jdbc-1.3.0/mysql/schema/
[root@localhost schema]# ll
합계 28
-rw-r--r--. 1 tomcat users 20174 9월 1 2020 001-create-schema.sql
-rw-r--r--. 1 tomcat users 2876 9월 1 2020 002-create-admin-user.sql
drwxr-xr-x. 2 tomcat users 4096 9월 1 13:56 upgrade
[root@localhost schema]#
[root@localhost schema]# cat *.sql | mysql -u root -p guacdb
Enter password:
[root@localhost schema]#
[root@localhost schema]# mysql -u root -p guacdb
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [guacdb]> show tables;
+---------------------------------------+
| Tables_in_guacdb |
+---------------------------------------+
| guacamole_connection |
| guacamole_connection_attribute |
| guacamole_connection_group |
| guacamole_connection_group_attribute |
| guacamole_connection_group_permission |
| guacamole_connection_history |
| guacamole_connection_parameter |
| guacamole_connection_permission |
| guacamole_entity |
| guacamole_sharing_profile |
| guacamole_sharing_profile_attribute |
| guacamole_sharing_profile_parameter |
| guacamole_sharing_profile_permission |
| guacamole_system_permission |
| guacamole_user |
| guacamole_user_attribute |
| guacamole_user_group |
| guacamole_user_group_attribute |
| guacamole_user_group_member |
| guacamole_user_group_permission |
| guacamole_user_history |
| guacamole_user_password_history |
| guacamole_user_permission |
+---------------------------------------+
23 rows in set (0.00 sec)
MariaDB [guacdb]>
# Guacamole Configuration
[root@localhost guacamole]# vim /etc/guacamole/guacamole.properties
[root@localhost guacamole]# cat /etc/guacamole/guacamole.properties
# MySQL properties
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacdb
mysql-username: guacdb-user
mysql-password: [password]
mysql-default-max-connections-per-user: 0
mysql-default-max-group-connections-per-user: 0
[root@localhost guacamole]#
[root@localhost guacamole]# echo "export GUACAMOLE_HOME=/etc/guacamole" >> ~/.bash_profile
[root@localhost guacamole]# source ~/.bash_profile
[root@localhost guacamole]# cat ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export GUACAMOLE_HOME=/etc/guacamole
[root@localhost guacamole]#
서비스 재구동
# Guacamole Service Start
[root@localhost guacamole]# systemctl restart guacd
[root@localhost guacamole]# systemctl restart tomcat
[root@localhost guacamole]#
접속 테스트

admin 계정 : guacadmin / guacadmin


마치며
OS 환경에 따라 Guacamole 컴파일 및 설치 과정에서 오류가 발생할 수 있습니다.
오류 사항을 잘 체크하고 누락된 패키지(라이브러리)에 대해서는 설치 후, 진행하여야 하겠습니다.
1 thought on “[Guacamole] Guacamole(과카몰리) 환경 구성 in CentOS 7”