Turn off the firewall and SElinux
systemctl stop firewalld.service
setenforce 0
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
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
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
cd Python-3.6.1
./configure && make && make install
Python establish a virtual environment
cd /opt/
python3 -m venv py3
source /opt/py3/bin/activate
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
Extract to / usr / local: tar -xzvf rarlinux-x64-5.3.0.tar.gz
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
After extracting into rar / optrar x jumpserver.rar
mv jumpserver/ /opt
cd jumpserver/requirements
yum -y install epel-release
yum -y install $(cat rpm_requirements.txt)
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 某包全名
Install python library dependencies pip install -r requirements.txt
installed Redis, Jumpserver make use Redis cache and celery broke
yum -y install redis
systemctl start redis
Installing MySQL
yum -y install mariadb mariadb-devel mariadb-server
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
Mysql password settings, such as password set to 123456
mysql_secure_installation
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;
Installation python3 mysql driver: mysqlclient pip install mysqlclient
modify configuration files jumpserver
cd /opt/jumpserver
cp config_example.py config.py
vim config.py
(Without modification, directly save and exit)
Generating a data initialization, and the database table structure
cd /opt/jumpserver/utils
bash make_migrations.sh
As information appears, it means that the operation was successful
run Jumpserver
cd /opt/jumpserver
python run_server.py &
Browser to access their IP + 80 ports.
Default account: admin password: admin