centos 7 through setup jumpserver

Turn off the firewall and SElinux

systemctl stop firewalld.service
setenforce 0

centos 7 through setup jumpserver

Modify the character set, or it may report input / output error problem because the Chinese print log

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

centos 7 through setup jumpserver

Python virtual environment and prepare Python3

Installation dependencies

yum -y install wget libselinux-python sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git
centos 7 through setup jumpserver

Compile and install (there must compile installed, otherwise there will be trouble when installing Python library dependency)

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

centos 7 through setup jumpserver

cd Python-3.6.1
./configure && make && make install

centos 7 through setup jumpserver

Python establish a virtual environment

cd /opt/
python3 -m venv py3
source /opt/py3/bin/activate

centos 7 through setup jumpserver

Installation Jumpserver 1.0.0

Download or clone project

In addition to downloading on github, but also can be downloaded onto the disc Baidu Cloud: https://pan.baidu.com/s/1BVYRF7M-akKjUOoYZPBi7Q (extract password: v5rs)

Install unrar RAR
wget http://www.rarlab.com/rar/rarlinux-x64-5.3.0.tar.gz

centos 7 through setup jumpserver
Extract to / usr / local: tar -xzvf rarlinux-x64-5.3.0.tar.gz

centos 7 through setup jumpserver

Then execute the following command

ln -s /usr/local/rar/rar /usr/local/bin/rar
ln -s /usr/local/rar/unrar /usr/local/bin/unrar

At this time, / and the command will be rar unrar command local / under usr / rar. You can create connections under / usr / local / bin
centos 7 through setup jumpserver

After extracting into rar / opt
rar x jumpserver.rar

centos 7 through setup jumpserver
mv jumpserver/ /opt

centos 7 through setup jumpserver

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

centos 7 through setup jumpserver
If an error occurs: A package with a package conflict, it would get rid of one of the packet, the so-called mountain can not accommodate two tigers

rpm -qa |grep 某包(查看是否有某包)
rpm -e 某包全名

centos 7 through setup jumpserver

Install python library dependencies
pip install -r requirements.txt
centos 7 through setup jumpserver
installed Redis, Jumpserver make use Redis cache and celery broke

yum -y install redis
systemctl start redis

centos 7 through setup jumpservercentos 7 through setup jumpserver

Installing MySQL

yum -y install mariadb mariadb-devel mariadb-server
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb

centos 7 through setup jumpserver
centos 7 through setup jumpserver
Mysql password settings, such as password set to 123456

mysql_secure_installation

centos 7 through setup jumpserver

Create a database and authorize 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;

centos 7 through setup jumpserver

Installation python3 mysql driver: mysqlclient
pip install mysqlclient
centos 7 through setup jumpserver
modify configuration files jumpserver

cd /opt/jumpserver
cp config_example.py config.py

vim config.py(Without modification, directly save and exit)
centos 7 through setup jumpserver

Generating a data initialization, and the database table structure

cd /opt/jumpserver/utils
bash make_migrations.sh

centos 7 through setup jumpserver

centos 7 through setup jumpserver
As information appears, it means that the operation was successful
run Jumpserver

cd /opt/jumpserver
python run_server.py & 

centos 7 through setup jumpserver
Browser to access their IP + 80 ports.
Default account: admin password: admin
centos 7 through setup jumpservercentos 7 through setup jumpserver

Guess you like

Origin blog.51cto.com/14375810/2420893