jumpserver 安装
2016-03-22 20:35
961 查看
建议使用 centos 6 mini环境快速安装,安装过一些软件后,其中可能会安装一些不兼容的python库,如pycrypto, django, 会影响快速安装
一、环境
CentOS 6.x x86_64 mini
service iptables stop
关闭SELinux的方法:
修改/etc/selinux/config文件中的SELINUX=”” 为 disabled ,然后重启。
如果不想重启系统,使用命令setenforce 0
二、安装依赖rpm
yum -y install epel-release
yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass lrzsz readline-devel
三、 下载jumpserver
cd /opt
git clone https://github.com/jumpserver/jumpserver.git
四、 执行快速安装脚本
cd jumpserver/install && pip install -r requirements.txt
之前已经安装好了如图
pip freeze
python install.py
运行crontab,定期处理失效连接,定期更新资产信息
cd .. && python manage.py crontab add
注:
1)根据提示输入相关信息,完成安装,完成安装后,请访问web,继续查看后续文档
2)如果启动失败,请返回上层目录,手动运行 ./service.sh start启动
3)如果./service.sh start启动失败
请进入jumpserver目录,手动运行
python manage.py runserver 0.0.0.0:80
python run_websocket.py
4)如果启动失败,可能是由于 80端口和3000端口已经被占用,或者数据库账号密码不对,请检查
五、web登录
默认账号密码 admin 5Lov@wife
注:
在使用Jumpserver过程中,有一步是系统用户推送,
要推送成功,Client端(后端服务器)环境要满足以下条件:
1. 后端服务器需要有python,sudo 环境才能使用推送用户,批量命令等功能
2. 后端服务器如果开启了selinux,请安装 libselinux-python
3. Crypto ‘HAVE_DECL_MPZ_POWM_SEC’等错误。很常见的错误,通常是由于pycrypto的版本问题,请卸载重新安装
pip uninstall pycrypto
rm -rf /usr/lib64/python2.6/site-packages/Crypto/
pip install pycrypto
4. 出现这种错误。
[root@master install]# cd jumpserver/install && pip install -r requirements.txt
Collecting django==1.6 (from -r requirements.txt (line 1))
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, gaierror(-2, ‘Name or service not known’))’: /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, gaierror(-2, ‘Name or service not known’))’: /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, gaierror(-2, ‘Name or service
添加一个参数–disable-pip-version-check
cd jumpserver/install && pip install -r requirements.txt –disable-pip-version-check
六、更新代码
cd /opt/jumpserver
git pull
一、环境
CentOS 6.x x86_64 mini
service iptables stop
关闭SELinux的方法:
修改/etc/selinux/config文件中的SELINUX=”” 为 disabled ,然后重启。
如果不想重启系统,使用命令setenforce 0
二、安装依赖rpm
yum -y install epel-release
yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass lrzsz readline-devel
三、 下载jumpserver
cd /opt
git clone https://github.com/jumpserver/jumpserver.git
四、 执行快速安装脚本
cd jumpserver/install && pip install -r requirements.txt
之前已经安装好了如图
pip freeze
python install.py
运行crontab,定期处理失效连接,定期更新资产信息
cd .. && python manage.py crontab add
注:
1)根据提示输入相关信息,完成安装,完成安装后,请访问web,继续查看后续文档
2)如果启动失败,请返回上层目录,手动运行 ./service.sh start启动
3)如果./service.sh start启动失败
请进入jumpserver目录,手动运行
python manage.py runserver 0.0.0.0:80
python run_websocket.py
4)如果启动失败,可能是由于 80端口和3000端口已经被占用,或者数据库账号密码不对,请检查
五、web登录
默认账号密码 admin 5Lov@wife
注:
在使用Jumpserver过程中,有一步是系统用户推送,
要推送成功,Client端(后端服务器)环境要满足以下条件:
1. 后端服务器需要有python,sudo 环境才能使用推送用户,批量命令等功能
2. 后端服务器如果开启了selinux,请安装 libselinux-python
3. Crypto ‘HAVE_DECL_MPZ_POWM_SEC’等错误。很常见的错误,通常是由于pycrypto的版本问题,请卸载重新安装
pip uninstall pycrypto
rm -rf /usr/lib64/python2.6/site-packages/Crypto/
pip install pycrypto
4. 出现这种错误。
[root@master install]# cd jumpserver/install && pip install -r requirements.txt
Collecting django==1.6 (from -r requirements.txt (line 1))
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, gaierror(-2, ‘Name or service not known’))’: /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, gaierror(-2, ‘Name or service not known’))’: /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘ProtocolError(‘Connection aborted.’, gaierror(-2, ‘Name or service
添加一个参数–disable-pip-version-check
cd jumpserver/install && pip install -r requirements.txt –disable-pip-version-check
六、更新代码
cd /opt/jumpserver
git pull
相关文章推荐
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析
- Python将excel导入到mysql中
- 硬盘安装CentOS 6.2以及添加GRUB启动菜单
- CentOS 6.2实战部署Nginx+MySQL+PHP