温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

jumpserver的安装

发布时间:2020-07-24 22:05:19 来源:网络 阅读:922 作者:MC不洗头 栏目:建站服务器

环境准备

1.关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
getneforce

jumpserver的安装

vim /etc/sysconfig/selinux

把selinux那行改成SELINUX=disable
jumpserver的安装
2.修改字符集

 localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
 export LC_ALL=zh_CN.UTF-8
 echo 'LANG=zh_CN.UTF-8' > /etc/sysconfig/i18n

jumpserver的安装

准备Python3和虚拟环境

1.

yum -y install wget libselinux-python sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git

jumpserver的安装
2.下载Python

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz

xz -d Python-3.6.1.tar.xz

tar -zxvf Python-3.6.1.tar

cd Python-3.6.1

./configure && make && make install 

cd /opt/

python3 -m venv py3

source /opt/py3/bin/activate

jumpserver的安装
前面出现py3的话那就没毛病了

下载jumpserver

1.可以到百度云盘上下载:https://pan.baidu.com/s/1BVYRF7M-akKjUOoYZPBi7Q (提取密码:v5rs),下载完以后传到虚拟机里

2.下载完以后他的压缩包是rar的,所以我们需要下载rar这个命令

wget http://www.rarlab.com/rar/rarlinux-x64-5.3.0.tar.gz
tar -zxvf rarlinux-x64-5.3.0.tar.gz  -C   /usr/local/
ln -s /usr/local/rar/rar /usr/local/bin/rar
ln -s /usr/local/rar/unrar /usr/local/bin/unrar

3.解压jumpserver

rar x jumpserver.rar

4.安装rpm依赖包

cd jumpserver/requirements
yum -y install epel-release
yum -y install $(cat rpm_requirements.txt)

5.安装Python库依赖

pip install -r requirements.txt
yum -y install redis
 systemctl start redis
 lsof -i:6379

jumpserver的安装
6.安装MySQL

yum -y install mariadb mariadb-devel mariadb-server
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
lsof -i:3306

jumpserver的安装
7.设置mysql

 mysql_secure_installation
 mysql -p123(密码)
 create database jumpserver default charset 'utf8';
  grant all on jumpserver.* to 'localhost'@'192.168.199.188' identified by 'localhost@123';
    flush privileges;
show databases;

jumpserver的安装
8.安装 python3 mysql驱动: mysqlclient

 pip install mysqlclient

jumpserver的安装
9.修改jumpserver配置文件

 cp config_example.py config.py

10.启动

cd utlis
bash make_migrations.sh
python run_server.py &

执行了python run_server.py &以后打开网页输入IP+:8080
账号密码都是admin

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI