Ubuntu18.04搭建jumpserver

安装 ubuntu18.04
1 install默认安装即可

Ubuntu18.04搭建jumpserver

文章插图

Ubuntu18.04搭建jumpserver

文章插图

Ubuntu18.04搭建jumpserver

文章插图

Ubuntu18.04搭建jumpserver

文章插图

Ubuntu18.04搭建jumpserver

文章插图

Ubuntu18.04搭建jumpserver

文章插图

Ubuntu18.04搭建jumpserver

文章插图
jumpserver
堡垒机简介
Jumpserver 为管理后台, 管理员可以通过 Web 页面进行资产管理、用户管理、资产授权等操作,
用户可以通过 Web 页面进行资产登录, 文件管理等操作koko 为 SSH Server 和 Web Terminal Server。用户可以使用自己的账户通过 SSH 或者 Web Terminal 访问 SSH 协议和 Telnet 协议资产
Luna 为 Web Terminal Server 前端页面, 用户使用 Web Terminal 方式登录所需要的组件Guacamole
为 RDP 协议和 VNC 协议资产组件, 用户可以通过 Web Terminal 来连接 RDP 协议和 VNC 协议资产
(暂时只能通过 Web Terminal 来访问)
Jumpserver 默认端口为 8080/tcp 配置文件 jumpserver/config.yml
koko 默认 SSH 端口为 2222/tcp, 默认 Web Terminal 端口为 5000/tcp 配置文件在 koko/config.yml
Guacamole 默认端口为 8081/tcp, 配置文件 /config/Tomcat9/conf/server.xml
Nginx 默认端口为 80/tcp
redis 默认端口为 6379/tcp
MySQL 默认端口为 3306/tcp
Protocol Server name Port
TCP Jumpserver 8080
TCP koko 2222, 5000
TCP Guacamole 8081
TCP Db 3306
TCP Redis 6379
TCP Nginx 80
1、 创建Python3.6虚拟环境
2、 安装python3.6
1 安装依赖包:
配置apt源
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
cd /etc/apt/sources.list.d/
安装vim
apt-get install vim
sudo vim aliyun.list(不做也可以)
(deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
【Ubuntu18.04搭建jumpserver】deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
更新升级
设置root密码
sudo passwd root
安装openssh-server
Sudo apt-get install openssh-server
配置IP地址
apt-get update && apt-get -y upgrade
apt-get -y install wget gcc libffi-dev git
修改字符集
apt-get -y install language-pack-zh-hans
echo 'LANG="zh_CN.UTF-8"' > /etc/default/locale
重新打开终
端验证 echo $LANG
2 安装python3.6 (ubuntu安装了python3.6.9)
apt-get -y install python3.6 python3.6-dev python3.6-venv
3 建立python虚拟环境
cd /opt
apt-get install python3-venv -y
python3.6 -m venv py3
source /opt/py3/bin/activate
此时提示符发生变化
4 自动载入python虚拟环境
cd /opt
git clone
echo 'source /opt/autoenv/activate.sh' >> ~/.bashrc
source ~/.bashrc
5 下载安装Jumpserver
cd /opt
source /opt/py3/bin/activate
git clone
echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env
安装jumpserver依赖包
cd /opt/jumpserver/requirements
#首次进入会有按Y提示
apt-get -y install $(cat deb_requirements.txt)
6 安装 Python 库依赖
pip install --upgrade pip setuptools
pip install -r requirements.txt
# 如果下载速度很慢, 可以换国内源
(pipinstall–upgradepipsetuptools-i
pipinstall-rrequirements.txt-i )
这一步可能会报错(执行apt-get install python3.6-dev libmysqlclient-dev)
在执行pip install -r requirements.txt,如果报超时错误,多执行几遍直到完全安装


推荐阅读