1.1 jumpserver跳板机介绍
部署一台监管服务,监管内部技术人员的所有操作
软件官方介绍:https://github.com/jumpserver/jumpserver
1.2 jumpserver软件部署过程
第一个历程:下载安装依赖软件
阿里云epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
清华镜像源信息:
https://mirrors.tuna.tsinghua.edu.cn/help/epel/
yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass lrzsz readline-devel
git --- 版本控制软件,管理开发人员编写的代码程序
python-pip --- 实现pip功能,下载python软件
yum c语言开发的软件
pip python语言开发的软件
gem ruby语言开发的软件
mysql-devel --- 部署好数据库服务
gcc automake autoconf --- 和软件编译或配置有关的软件
python-devel --- python依赖包安装好
readline-devel --- 实现python代码信息补全功能
第二个历程:下载安装jumpserver软件
cd /opt
git clone https://git.coding.net/jumpserver/jumpserver.git
cd jumpserver/install/
pip install -r requirements.txt
[root@jumpserver install]# ll
total 28
-rwxr-xr-x 1 root root 7954 Apr 17 15:12 install.py --- 安装部署有关的文件
-rw-r--r-- 1 root root 286 Apr 17 15:12 requirements.txt --- 安装部署有关的文件
-rw-r--r-- 1 root root 262 Apr 17 15:12 zzjumpserver.sh
修改pip源信息
mkdir ~/.pip -p
vim ~/.pip/pip.conf
cat ~/.pip/pip.conf
[global]
index-url = https://pypi.mirrors.ustc.edu.cn/simple/
[install]
trusted-host=mirrors.ustc.edu.cn
pip install -r requirements.txt --- 批量安装python软件方法
pip freeze --- 显示系统中所有安装python软件
解决安装问题
pip uninstall pycrypto
m -rf /usr/lib64/python2.6/site-packages/Crypto/
m -rf /usr/lib64/python2.6/site-packages/pycrypto-2.6.1-py2.6-linux-x86_64.egg
pip install pycrypto==2.4.1
开始软件初始化部署过程
[root@jumpserver install]# pwd
/opt/jumpserver/install
[root@jumpserver install]# python install.py
启动失败,如何解决:
①. 利用启动脚本
[root@jumpserver jumpserver]# pwd
/opt/jumpserver
[root@jumpserver jumpserver]# ./service.sh start
启动成功:
一个进程:python ./manage.py runserver 0.0.0.0:80 --- 控制用户可以访问web界面
二个进程:python ./run_websocket.py --- 实现远程管理服务器
②. 利用脚本中的命令启动
[root@jumpserver jumpserver]# pwd
/opt/jumpserver
python manage.py runserver 0.0.0.0:80 &>> /tmp/jumpserver.log 2>&1 &
python run_websocket.py &> /dev/null 2>&1 &
还报错:
1)检查环境是否干净
2)相关python软件是否安装正确
3). jumpserver软件应用配置过程
yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass lrzsz readline-devel
cd /opt
git clone https://git.coding.net/jumpserver/jumpserver.git
cd jumpserver/install/
pip install -r requirements.txt
mkdir ~/.pip -p
cat>>~/.pip/pip.conf<<EOF
[global]
index-url = https://pypi.mirrors.ustc.edu.cn/simple/
[install]
trusted-host=mirrors.ustc.edu.cn
EOF
pip uninstall pycrypto
m -rf /usr/lib64/python2.6/site-packages/Crypto/
m -rf /usr/lib64/python2.6/site-packages/pycrypto-2.6.1-py2.6-linux-x86_64.egg
pip install pycrypto==2.4.1
python install.py
cd /opt/jumpserver
./service.sh start