1. 程式人生 > >centos 7 搭建開源堡壘機 Teleport 遇到的問題解決

centos 7 搭建開源堡壘機 Teleport 遇到的問題解決

blog splay mon isp acc ref 6.5 localhost tps

不得不說 centos7 的環境版本就是高,沒有再出現6.5下那些依賴組件的版本支持過低的錯誤了,所以說現在個人用戶還是推薦用7,企業生產環境的話,可能6.5適合一些,至少2年前是這樣。

安裝過程: https://docs.tp4a.com/install/#_1

https://www.cnblogs.com/xuegqcto/p/9052009.html 這個有 mariadb(mysql)的安裝和配置過程

https://blog.csdn.net/noonncmzba/article/details/80104476 這個解決了創建表失敗的問題

配置mysql的時候,需要的命令

> create
database teleport default character set utf8 collate utf8_general_ci; > grant all privileges on teleport to teleport@127.0.0.1 identified by password; > flush privileges;

中間那條 grant all不行就用下面這條(用這條成功的)

grant all privileges on teleport.* to teleport@localhost identified  by password
;
然後 flush privileges;

配置root遠程訪問:https://www.cnblogs.com/24la/p/mariadb-remoting-access.html

要點:要先判斷是不是防火墻開啟了,因為這個端口可能是默認被防火墻攔截了,所以要開放訪問或者關掉防火墻。

關閉防火墻:https://www.cnblogs.com/moxiaoan/p/5683743.html

因為修改web.xml後 ,有時候web服務起不來,有時候起來了訪問不了,所以這個下面的是成功的 web.xml

; codec: utf-8

[common]

; ip=0.0.0.0

; port listen by web server, default to 7190.
; DO NOT FORGET update `common::web-server-rpc` in core.ini if you modified this setting.
port=7190

; log file of web server, default to /var/log/teleport/tpweb.log
; log-file=/var/log/teleport/tpweb.log

; `log-level` can be 0 ~ 4, default to 2.
; LOG_LEVEL_DEBUG     0   log every-thing.
; LOG_LEVEL_VERBOSE   1   log every-thing but without debug message.
; LOG_LEVEL_INFO      2   log information/warning/error message.
; LOG_LEVEL_WARN      3   log warning and error message.
; LOG_LEVEL_ERROR     4   log error message only.
log-level=2

; 0/1. default to 0.
; in debug mode, `log-level` force to 0 and display more message for debug purpose.
debug-mode=0

; `core-server-rpc` is the rpc interface of core server.
; default to `http://127.0.0.1:52080/rpc`.
; DO NOT FORGET update this setting if you modified rpc::bind-port in core.ini.
core-server-rpc=http://127.0.0.1:52080/rpc


[database]

; database in use, should be sqlite/mysql, default to sqlite.
; type=sqlite
type=mysql

; sqlite-file=/usr/local/teleport/data/db/teleport.db

mysql-host=127.0.0.1

mysql-port=3306

mysql-db=teleport

mysql-prefix=tp_

mysql-user=teleport

mysql-password=password

centos 7 搭建開源堡壘機 Teleport 遇到的問題解決