(py3)虚拟环境下进行;且确保之前的pip已经安装完成了
(py3) [root@jumpserver jumpserver]# cd /server/app/jumpserver/utils (py3) [root@jumpserver utils]# bash make_migrations.sh⑧. 运行jumpserver
(py3) [root@jumpserver utils]# cd /server/app/jumpserver/ (py3) [root@jumpserver jumpserver]# chmod +x jms (py3) [root@jumpserver jumpserver]# ./jms start all -d #-d后台运行jumpserver的使用方法:./jms start|stop|status|restart all
⑨. 访问测试
:8080/
默认 账号:admin
密码:admin 安装 组件在web页面上点击web终端
会看到:
Luna是单独部署的一个程序,你需要部署luna,coco,配置nginx做url分发, 如果你看到了这个页面,证明你访问的不是nginx监听的端口,祝你好运
所以接下来,我们安装luna和coco
安装coco**coco实现了
SSH Server 和 Web Terminal Server 的组件,提供 SSH 和 WebSocket 接口,
使用 Paramiko 和 Flask 开发**
(py3) [root@jumpserver coco]# cd /server/sources/coco/requirements/ (py3) [root@jumpserver requirements]# yum install `cat rpm_requirements.txt` (py3) [root@jumpserver requirements]# pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ (py3) [root@jumpserver requirements]# cp -r /server/sources/coco/ /server/app/ (py3) [root@jumpserver requirements]# cd /server/app/coco/ (py3) [root@jumpserver coco]# cp conf_example.py conf.py (py3) [root@jumpserver coco]# chmod +x cocod (py3) [root@jumpserver coco]# ./cocod start -d Start coco process使用方法:./cocod start|stop|status|restart
安装Web-Terminal前端-Luna组件Luna概述:Luna现在是 Web Terminal 前端,计划前端页面都由该项目提供,Jumpserver 只提供 API,不再负责后台渲染html等
(py3) [root@jumpserver coco]# cd /server/sources/ (py3) [root@jumpserver sources]# tar xf luna.tar.gz (py3) [root@jumpserver sources]# cp -r luna /server/app/ 配置Nginx整合各组件 (py3) [root@jumpserver sources]# yum -y install nginx (py3) [root@jumpserver sources]# vim /etc/nginx/^Cinx.conf 将原先的server{} 段全部替换掉** 最终的结果如下:**
(py3) [root@jumpserver nginx]# grep -Ev "#|^$" /etc/nginx/nginx.conf user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main \'$remote_addr - $remote_user [$time_local] "$request" \' \'$status $body_bytes_sent "$http_referer" \' \'"$http_user_agent" "$http_x_forwarded_for"\'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/conf.d/*.conf; server { listen 80; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location /luna/ { try_files $uri / /index.html; alias /server/app/luna/; } location /media/ { add_header Content-Encoding gzip; root /server/app/jumpserver/data/; } location /static/ { root /server/app/jumpserver/data/; } location /socket.io/ { proxy_buffering off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location / { } } }语法检查
(py3) [root@jumpserver sources]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful运行 Nginx
(py3) [root@jumpserver nginx]# systemctl start nginx (py3) [root@jumpserver nginx]# systemctl enable nginx Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.在web页面上点击
默认信息,确认即可
服务器命令行终端测试:
(py3) [root@jumpserver nginx]# ssh -p2222 admin@10.0.0.161 The authenticity of host \'[10.0.0.161]:2222 ([10.0.0.161]:2222)\' can\'t be established. RSA key fingerprint is SHA256:8MCnHK0t1yfaxyf6fFq1e93fE9JDBc4hG00OlnWelXY. RSA key fingerprint is MD5:b5:6d:74:d6:00:90:f4:93:8f:b8:de:33:14:ea:6b:ee. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added \'[10.0.0.161]:2222\' (RSA) to the list of known hosts. admin@10.0.0.161\'s password: #填写admin的密码admin Administrator, 欢迎使用Jumpserver开源跳板机系统 1) 输入 ID 直接登录 或 输入部分 IP,主机名,备注 进行搜索登录(如果唯一). 2) 输入 / + IP, 主机名 or 备注 搜索. 如: /ip 3) 输入 P/p 显示您有权限的主机. 4) 输入 G/g 显示您有权限的主机组. 5) 输入 G/g + 组ID 显示该组下主机. 如: g1 6) 输入 H/h 帮助. 0) 输入 Q/q 退出.用10.0.0.161就可以直接访问了,不需要再加8080