jumpserver 安装
# CentOS 7 安装jumpserver
$ setenforce 0 # 可以设置配置文件永久关闭
$ systemctl stop iptables.service
$ systemctl stop firewalld.service
1、配置python环境:
[root@centos7-1 opt]# yum -y install wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git
[root@centos7-1 opt]# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
[root@centos7-1 opt]# tar xvf Python-3.6.1.tar.xz && cd Python-3.6.1
[root@centos7-1 opt]# ./configure && make && make install
因为 CentOS 6/7 自带的是 Python2,而 Yum 等工具依赖原来的 Python,为了不扰乱原来的环境我们来使用 Python 虚拟环境
[root@centos7-1 opt]# cd /opt
[root@centos7-1 opt]# python3 -m venv py3
[root@centos7-1 opt]# source /opt/py3/bin/activate
注:看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行
(py3) [root@centos7-1 opt]#
2、安装redis,通过yum安装:
(py3) [root@centos7-1 requirements]# yum -y install redis
(py3) [root@centos7-1 requirements]# systemctl start redis
3、本教程使用 Mysql 作为数据库,如果不使用 Mysql 可以跳过相关 Mysql 安装和配置
(1)# centos7
(py3) [root@centos7-1 requirements]# yum -y install mariadb mariadb-devel mariadb-server # centos7下安装的是mariadb
(py3) [root@centos7-1 requirements]# systemctl start mariadb.service
(py3) [root@centos7-1 requirements]# mysql
MariaDB [(none)]> create database jumpserver default charset 'utf8';
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on jumpserver.* to 'jumpserver'@'127.0.0.1' identified by 'along';
Query OK, 0 rows affected (0.00 sec)
上面已经安装好了python3.6 mysql Redis
4、项目提交较多 git clone 时较大,你可以选择去 Github 项目页面直接下载zip包。
(py3) [root@centos7-1 opt]# cd /opt/
(py3) [root@centos7-1 opt]#git clone --depth=1 https://github.com/jumpserver/jumpserver.git
$ cd /opt/jumpserver/requirements
# 根据当前系统, 选择对应的文件执行即可
# 如 Centos: yum install -y $(cat rpm_requirements.txt)
# 如 Ubuntu: apt-get install -y $(cat deb_requirements.txt)
$ pip install wheel
$ pip install -r requirements.txt
# 确保已经载入 py3 虚拟环境, 中间如果遇到报错一般是依赖包没装全, 可以通过 搜索引擎 解决
$ cd /opt/jumpserver
$ cp config_example.yml config.yml
$ vim config.yml
# 注意 SECRET_KEY 和 BOOTSTRAP_TOKEN 不能使用纯数字字符串,并将数据库配置和redis配置写入文件
$ cd /opt/jumpserver
$ ./jms start # 可以 -d 参数在后台运行 ./jms start -d
# 确保已经载入 py3 虚拟环境, 中间如果遇到报错请参考 FAQ 文档或者 搜索引擎 解决
5、部署koko组件
$ cd /opt
# 访问 https://github.com/jumpserver/koko/releases 下载对应 release 包并解压到 /opt目录
$ wget https://github.com/jumpserver/koko/releases/download/1.5.5/koko-master-linux-amd64.tar.gz
$ tar xf koko-master-linux-amd64.tar.gz
$ chown -R root:root kokodir
$ cd kokodir
$ cp config_example.yml config.yml
$ vim config.yml
# BOOTSTRAP_TOKEN 需要从 jumpserver/config.yml 里面获取, 保证一致
$ ./koko # 可以 -d 参数在后台运行 ./koko -d
6、安装并启动guacamole组件
# 建议使用 docker 部署 guacamole 组件 , 部分环境可能无法正常编译安装
$ cd /opt
$ git clone --depth=1 https://github.com/jumpserver/docker-guacamole.git
$ cd /opt/docker-guacamole
$ tar xf guacamole-server-1.0.0.tar.gz
$ cd /opt/docker-guacamole/guacamole-server-1.0.0
# yum -y localinstall --nogpgcheck https://mirrors.aliyun.com/rpmfusion/free/el/rpmfusion-free-release-7.noarch.rpm https://mirrors.aliyun.com/rpmfusion/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
# Fedora/CentOS/RHEL: yum install -y cairo-devel libjpeg-turbo-devel libpng-devel uuid-devel
# Fedora/CentOS/RHEL: yum install -y ffmpeg-devel freerdp1.2-devel pango-devel libssh2-devel libtelnet-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-devel
# ln -s /usr/local/lib/freerdp /usr/lib64/freerdp
#安装依赖 yum install -y libtool
$ autoreconf -fi
$ ./configure --with-init-dir=/etc/init.d
$ make
$ make install
# 先在当前环境配置好 jdk8 jre8
# Ubuntu: apt-get -y install default-jre default-jdk
# Centos: yum install -y java-1.8.0-openjdk
# 访问 https://tomcat.apache.org/download-90.cgi 下载最新的 tomcat9
$ mkdir -p /config/guacamole /config/guacamole/extensions /config/guacamole/record
$ chmod 777 /config/guacamole/record
$ cd /config
$ wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.29/bin/apache-tomcat-9.0.29.tar.gz
$ tar xf apache-tomcat-9.0.29.tar.gz
$ mv apache-tomcat-9.0.29 tomcat9
$ rm -rf /config/tomcat9/webapps/*
$ sed -i 's/Connector port="8080"/Connector port="8081"/g' /config/tomcat9/conf/server.xml
$ echo "java.util.logging.ConsoleHandler.encoding = UTF-8" >> /config/tomcat9/conf/logging.properties
$ ln -sf /opt/docker-guacamole/guacamole-1.0.0.war /config/tomcat9/webapps/ROOT.war
$ ln -sf /opt/docker-guacamole/guacamole-auth-jumpserver-1.0.0.jar /config/guacamole/extensions/guacamole-auth-jumpserver-1.0.0.jar
$ ln -sf /opt/docker-guacamole/root/app/guacamole/guacamole.properties /config/guacamole/guacamole.properties
$ wget https://github.com/ibuler/ssh-forward/releases/download/v0.0.5/linux-amd64.tar.gz
$ tar xf linux-amd64.tar.gz -C /bin/
$ chmod +x /bin/ssh-forward
# 设置 guacamole 环境
$ export JUMPSERVER_SERVER=http://127.0.0.1:8080 # http://127.0.0.1:8080 指 jumpserver 访问地址
$ echo "export JUMPSERVER_SERVER=http://127.0.0.1:8080" >> ~/.bashrc
# BOOTSTRAP_TOKEN 为 Jumpserver/config.yml 里面的 BOOTSTRAP_TOKEN 值
$ export BOOTSTRAP_TOKEN=******
$ echo "export BOOTSTRAP_TOKEN=******" >> ~/.bashrc
$ export JUMPSERVER_KEY_DIR=/config/guacamole/keys
$ echo "export JUMPSERVER_KEY_DIR=/config/guacamole/keys" >> ~/.bashrc
$ export GUACAMOLE_HOME=/config/guacamole
$ echo "export GUACAMOLE_HOME=/config/guacamole" >> ~/.bashrc
$ export GUACAMOLE_LOG_LEVEL=ERROR
$ echo "export GUACAMOLE_LOG_LEVEL=ERROR" >> ~/.bashrc
$ /etc/init.d/guacd start
$ sh /config/tomcat9/bin/startup.sh
7、下载luna组件
$ cd /opt
# 访问 https://github.com/jumpserver/luna/releases 获取
$ wget https://github.com/jumpserver/luna/releases/download/1.5.5/luna.tar.gz
$ tar xf luna.tar.gz
$ chown -R root:root luna
8、安装nginx略
配置
$ vim /etc/nginx/conf.d/jumpserver.conf
server {
listen 80;
client_max_body_size 100m; # 录像及文件上传大小限制
location /luna/ {
try_files $uri / /index.html;
alias /opt/luna/; # luna 路径, 如果修改安装目录, 此处需要修改
}
location /media/ {
add_header Content-Encoding gzip;
root /opt/jumpserver/data/; # 录像位置, 如果修改安装目录, 此处需要修改
}
location /static/ {
root /opt/jumpserver/data/; # 静态资源, 如果修改安装目录, 此处需要修改
}
location /koko/ {
proxy_pass http://localhost:5000;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log off;
}
location /guacamole/ {
proxy_pass http://localhost:8081/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log off;
}
location /ws/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8070;
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
$ nginx -t
$ nginx -s reload
9、开始使用 Jumpserver
# 检查应用是否已经正常运行
# 服务全部启动后, 访问 jumpserver 服务器 nginx 代理的 80 端口, 不要通过8080端口访问
# 默认账号: admin 密码: admin
jumpserver 安装的更多相关文章
- jumpserver安装详解
环境说明 主机为最小 安装的centos6.9 x86_64. [root@m01 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [ro ...
- JumpServer 安装配置
环境 系统:Centos 7.4 阿里云ECS,单独绑定弹性公网IP 关闭selinux,防火墙对本机公司IP全开 #CentOS 7 $ setenforce 0 # 临时关闭,重启后失效 #修改字 ...
- jumpserver安装
一. 准备 Python3 和 Python 虚拟环境 1.1 安装依赖包 yum -y install wget sqlite-devel xz gcc automake zlib-devel o ...
- jumpserver安装与部署
1.简介 Jumpserver 是一款由Python编写开源的跳板机(堡垒机)系统,实现了跳板机应有的功能.基于ssh协议来管理,客户端无需安装agent.特点: 完全开源,GPL授权 Pyth ...
- CentOS 7下JumpServer安装及配置
环境 系统 # cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) # uname -r 3.10.0-693.21.1.el7. ...
- Jumpserver安装过程
Jumpserver 安装过程 可参照此官方文档搭建: http://docs.jumpserver.org/zh/docs/step_by_step.html 其中,需注意处: # docker ...
- jumpserver安装和使用
jumpserver安装 #centos6 centos7都可用yum -y install git python-pip mysql-devel gcc automake autoconf pyth ...
- jumpserver安装及使用教程
我自己是jumpserver的新手,以下两个链接是比较好的教程: 安装教程:http://blog.csdn.net/wanglei_storage/article/details/51001810 ...
- jumpserver安装教程
centos7系统一步一步安装jumpserver 参照官方文档,查找了百度所有的文档,基本上都是按照官方的文档操作的 官方文档点我-> 安装jumpserver需注意: 1:网络环境要好,有的 ...
- jumpserver 安装详解
一,下载软件 下载前安装依赖软件 yum install -y epel-release yum -y install git python-pip my ...
随机推荐
- MongoDB初始化创建管理员账户登录
1.查看mongodb服务是否开启: ps -ef | grep mongod 2.管理员角色必须在启用--auth认证参数之前创建,否则会没有操作权限.如果之前已经创建过用户,请先删除. kill掉 ...
- MGR并行复制从节点复制线程死锁
1.故障现象 20191113-22:32 datax全量同步t_shop_info表到 eorder所在的实例,t_shop_info表有两个唯一约束.总数据量不超过1w行,同步完成后MGR从库复制 ...
- pytorch learning rate decay
关于learning rate decay的问题,pytorch 0.2以上的版本已经提供了torch.optim.lr_scheduler的一些函数来解决这个问题. 我在迭代的时候使用的是下面的方法 ...
- PyTorch工具
以装饰器添加所有代码对应的tensor的信息 https://github.com/zasdfgbnm/TorchSnooper
- spring-boot-starter-parent的主要作用
SpringBoot项目一般都会配置starter-parent依赖. 示例: <parent> <groupId>org.springframework.boot</g ...
- 采集15个代理IP网站,打造免费代理IP池
采集的站点: 免费代理IP http://ip.yqie.com/ipproxy.htm66免费代理网 http://www.66ip.cn/89免费代理 http://www.89ip.cn/无忧代 ...
- sourceTree 3.X免注册[学习]
一. 在路径C:\****\AppData\Local\Atlassian\SourceTree下创建accounts.json文件 [ { "$id": "1" ...
- apache的虚拟域名rewrite配置以及.htaccess的使用。
在web服务器领域,Apache基本上是一统天下的,虽然现在越来越多的人转向nginx的,但是仍然由于apache的高性能以及强大的功能,还是大多数服务器在使用Apache. apache的安装就先不 ...
- Qt Table Widget常用操作
一.鼠标悬浮在item上 显示提示信息 1.在构造函数开启table Widget控件的鼠标捕获功能 // 开启鼠标捕获功能(实现table widget的悬浮功能) ui.tableWidget-& ...
- RabbitMQ实战场景(一):异步记录用户操作日志
传统的项目开发中业务流程以串行方式,执行了模块1—>模块2–>模块3 而我们知道,这个执行流程其实对于整个程序来讲是有一定的弊端的,主要有几点: (1)整个流程的执行响应等待时间比较长; ...