systemctl stop firewalld.service setenforce 0
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
yum -y install wget libselinux-python sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git
python
cd /usr/local wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz tar xvf Python-3.6.1.tar.xz
cd Python-3.6.1 ./configure && make && make install
cd /opt/ python3 -m venv py3 source /opt/py3/bin/activate
除了在github上下载外,还能够到百度云盘上下载:https://pan.baidu.com/s/1BVYRF7M-akKjUOoYZPBi7Q (提取密码:v5rs)mysql
安装rar unrar
wget http://www.rarlab.com/rar/rarlinux-x64-5.3.0.tar.gzlinux
解压到/usr/local: tar -xzvf rarlinux-x64-5.3.0.tar.gz
git
而后执行如下命令github
ln -s /usr/local/rar/rar /usr/local/bin/rar ln -s /usr/local/rar/unrar /usr/local/bin/unrar
此时,/usr/local/rar下就会有rar命令和unrar命令。能够在/usr/local/bin下建立链接 redis
用rar解压后放到/optrar x jumpserver.rar
sql
mv jumpserver/ /opt
数据库
cd jumpserver/requirements yum -y install epel-release yum -y install $(cat rpm_requirements.txt)
若是发生报错:某包与某包发生冲突,那就干掉其中一包,正所谓一山不容二虎vim
rpm -qa |grep 某包(查看是否有某包) rpm -e 某包全名
安装python库依赖pip install -r requirements.txt
安装Redis, Jumpserver 使用 Redis 作 cache 和 celery brokecentos
yum -y install redis systemctl start redis
安装MySQL
yum -y install mariadb mariadb-devel mariadb-server systemctl enable mariadb systemctl start mariadb systemctl status mariadb
设置mysql密码,好比密码设置为123456
mysql_secure_installation
建立数据库Jumpserver并受权
mysql -p123456 create database jumpserver default charset 'utf8'; grant all on jumpserver.* to 'jumpserver'@'127.0.0.1' identified by 'jumpserver@123'; flush privileges; show databases;
安装 python3 mysql驱动: mysqlclientpip install mysqlclient
修改jumpserver配置文件
cd /opt/jumpserver cp config_example.py config.py
vim config.py
(无需修改,直接保存退出)
生成数据库表结构和初始化数据
cd /opt/jumpserver/utils bash make_migrations.sh
出现如上信息,即表示操做成功
运行Jumpserver
cd /opt/jumpserver python run_server.py &
浏览器中访问本身IP+80端口 。
默认帐号: admin 密码: admin