jumpserver跳板機(jī)部署
查看linux版本
[root@tbj /server/tools]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
保證服務(wù)器配置好yum源
[root@tbj ~]# cd /etc/yum.repos.d/
[root@tbj yum.repos.d]# curl -o 163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
[root@tbj yum.repos.d]# sed -i 's/\$releasever/7/g' /etc/yum.repos.d/163.repo
[root@tbj yum.repos.d]# sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/163.repo
[root@tbj yum.repos.d]# yum -y install epel-release
[root@tbj yum.repos.d]# yum clean all
第一個(gè)里程碑:安裝python
1.安裝git與python依賴包
yum install -y git wget sqlite-devel xz gcc automake zlib-devel openssl-devel
2.編譯安裝python-3.6.1
下載:
[root@tbj tools]# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
[root@tbj tools]# tar xvf Python-3.6.1.tar.xz
[root@tbj tools]# cd Python-3.6.1/
[root@tbj Python-3.6.1]# ./configure && make && make install
2.安裝跳板機(jī)jumpserver:
鏈接: https://pan.baidu.com/s/1A2HMzW5z1CU53-ki91ntqA 提取碼: i4qs
[root@tbj ~]# cd /usr/local
[root@tbj local]# git clone https://github.com/jumpserver/jumpserver.git
[root@tbj local]# unzip jumpserver-rpm.zip
3.將jumpserver切換到主線版本:
[root@tbj tools]# cd jumpserver-rpm/jumpserver
[root@tbj jumpserver]# git checkout master
....
Already on 'master'
第二個(gè)里程碑:
- 下載數(shù)據(jù)庫,這里用的mariadb
設(shè)置開機(jī)自啟動(dòng)
yum install -y mariadb-server mariadb
systemctl restart mariadb
systemctl enable mariadb
2.創(chuàng)建數(shù)據(jù)庫jumpserver,指定字符集為utf8 :
CREATE DATABASE jumpserver CHARACTER SET utf8 COLLATE utf8_general_ci;
創(chuàng)建表:
grant all on jumpserver.* to jumpserver@'%' identified by "123456";
grant all on jumpserver.* to jumpserver@'localhost' identified by "123456";
刪除空表:
drop user ''@'localhost';
drop user ''@'tbj';
刷新表:
flush privileges;
第三個(gè)里程碑:
升級(jí)python的pip到最新版
不然后面執(zhí)行會(huì)報(bào)錯(cuò)
新建一個(gè)pip目錄,然后新建一個(gè)pip.ini文件
在pip.ini文件輸入:
[root@tbj ~]# cat /pip/pip.ini
[global]
index-url = https://pypi.douban.com/simple //國內(nèi)豆瓣的服務(wù)器
trusted-host = pypi.douban.com
[root@tbj ~]#
[root@tbj ~]# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow
升級(jí)pip的命令
python -m pip install --upgrade pip
第四個(gè)里程碑:
執(zhí)行安裝腳本
[root@tbj ~]# cd /usr/local/jumpserver/install/
[root@tbj local]# python install.py
...
.....
開始關(guān)閉防火墻和selinux
setenforce: SELinux is disabled
請(qǐng)輸入您服務(wù)器的IP地址,用戶瀏覽器可以訪問 [10.0.0.11]:
是否安裝新的MySQL服務(wù)器? (y/n) [y]: n
請(qǐng)輸入數(shù)據(jù)庫服務(wù)器IP [127.0.0.1]: 172.16.1.11
請(qǐng)輸入數(shù)據(jù)庫服務(wù)器端口 [3306]:
請(qǐng)輸入數(shù)據(jù)庫服務(wù)器用戶 [jumpserver]:
請(qǐng)輸入數(shù)據(jù)庫服務(wù)器密碼: 123456
請(qǐng)輸入使用的數(shù)據(jù)庫 [jumpserver]:
連接數(shù)據(jù)庫成功
請(qǐng)輸入SMTP地址: smtp.163.com
請(qǐng)輸入SMTP端口 [25]:
請(qǐng)輸入賬戶: 賬戶@163.com
請(qǐng)輸入密碼: xxxxx
請(qǐng)登陸郵箱查收郵件, 然后確認(rèn)是否繼續(xù)安裝
是否繼續(xù)? (y/n) [y]: y
開始寫入配置文件
開始安裝Jumpserver ...
開始更新jumpserver
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
請(qǐng)輸入管理員用戶名 [admin]: lcx
請(qǐng)輸入管理員密碼: [5Lov@wife]: 123456
請(qǐng)?jiān)俅屋斎牍芾韱T密碼: [5Lov@wife]: 123456
Starting jumpserver service: [ OK ]
安裝成功,Web登錄請(qǐng)?jiān)L問http://ip:8000, 祝你使用愉快。
請(qǐng)?jiān)L問 https://github.com/jumpserver/jumpserver/wiki 查看文檔
給jumpserver服務(wù)加入開機(jī)自啟動(dòng)!不然下次開機(jī)就懵逼了
echo /usr/local/jumpserver/service.sh start >>/etc/rc.d/rc.local
第五個(gè)里程碑:
瀏覽器輸入http://10.0.0.11:8000
輸入設(shè)置的管理員用戶名和密碼
jumpserver的監(jiān)控功能














