阿帕奇链接mysql_apache guacamole 使用mysql 连接
1.創(chuàng)建一個(gè)臨時(shí)文件夾,用來存放mysql-java連接器
mkdir tempauth
2.下載相關(guān)文件
cd tempauth
wget https://jaist.dl.sourceforge.net/project/guacamole/current/extensions/guacamole-auth-jdbc-0.9.14.tar.gz
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
點(diǎn)擊這里下載 要注意這個(gè)版本只適用于0.9.14的guacamole-server
3.安裝/解壓
tar -zxf mysql-connector-java-5.1.46.tar.gz
tar -zxf guacamole-auth-jdbc-0.9.14.tar.gz
4.將guacamole-auth復(fù)制到GUACAMOLE_HOME的extensions文件下,若無則創(chuàng)建.GUACAMOLE_HOME一般為/etc/guacamole/
cp /etc/guacamole/tmpauth/guacamole-auth-jdbc-0.9.14/mysql/guacamole-auth-jdbc-mysql-0.9.14.jar /etc/guacamole/extensions/
cp /etc/guacamole/tmpauth/mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar /etc/guacamole/lib/
5.創(chuàng)建Guacamole數(shù)據(jù)庫
$ mysql -u root -p
Enter password: password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 233
Server version: 5.5.29-0ubuntu0.12.10.1 (Ubuntu)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE DATABASE guacamole_db;
Query OK, 1 row affected (0.00 sec)
mysql> CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'some_password';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)
mysql> quit
Bye
6.進(jìn)入到/etc/guacamole/sqlauth/guacamole-auth-jdbc-0.9.14/mysql/schema下,執(zhí)行sql腳本
root@ubuntu:/etc/guacamole/sqlauth/guacamole-auth-jdbc-0.9.14/mysql/schema# ls
001-create-schema.sql 002-create-admin-user.sql upgrade
root@ubuntu:/etc/guacamole/sqlauth/guacamole-auth-jdbc-0.9.14/mysql/schema# cat ./*.sql | mysql -u root -p guacamole_db
Enter password:
root@ubuntu:/etc/guacamole/sqlauth/guacamole-auth-jdbc-0.9.14/mysql/schema#
7.配置guacamole.properites相關(guān)信息
# MySQL properties
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_user
mysql-password: some_password
注意,如果沒有配置數(shù)據(jù)庫信息,使用user-mapping.xml 沒有類似歷史訪問記錄,sftp等功能
注意 guacamole-auth-jdbc 一定要和guancd 的版本號(hào)對應(yīng),否則會(huì)出現(xiàn)登陸失敗的情況
可以按照下面的方法查看版本號(hào):
root@ubuntu:/etc/guacamole# /etc/init.d/guacd restart
Stopping guacd: SUCCESS
Starting guacd: guacd[4497]: INFO: Guacamole proxy daemon (guacd) version 0.9.13-incubating started
SUCCESS
#
這里顯示的版本號(hào)為 0.9.23-incubating 下載時(shí)一定要注意下載對應(yīng)版本
日志記錄在/var/log/tomcat8下面 注意為catalina.out文件,有問題及時(shí)查看方便解決
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的阿帕奇链接mysql_apache guacamole 使用mysql 连接的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 云信服务器代码,云信一键登录服务端API
- 下一篇: 使用计算机时 正确的关机顺序是( ),《