码迷,mamicode.com
首页 > 其他好文 > 详细

jumpserver 跳板机安装教程

时间:2017-08-24 19:59:14      阅读:461      评论:0      收藏:0      [点我收藏+]

标签:jumpserver install

首先确保系统的iptables 和selinux属于关闭状态

[root@dk ~]# ipbatables -F   --临时清空iptables里面的规则 

[root@dk ~]# getenforce   --查看selinux状态  

Disabled

[root@dk ~]# 

software下载地址:    链接:http://pan.baidu.com/s/1pLFjRuF 密码:erdv


安装jumpserver所需的依赖包

[root@dk ~]# yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass readline-devel gcc-c++

[root@dk ~]# yum -y install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel sshpass openldap-devel


解压!  --这里的话 我是把软件包放在了/tmp下面。

[root@dk ~tmp]#  unzip jumpserver-dev.zip 

[root@dk ~tmp]#  cd jumpserver-dev


错误提示:

[root@dk  jumpserver-dev]# pip install 

You are using pip version 7.1.0, however version 9.0.1 is available.

You should consider upgrading via the ‘pip install --upgrade pip‘ command.

You must give at least one requirement to install (see "pip help install")

解决方法 升级pip到9.0 再把python升级为3.5

[root@dk  jumpserver-dev]# pip install --upgrade pip

You are using pip version 7.1.0, however version 9.0.1 is available.

You should consider upgrading via the ‘pip install --upgrade pip‘ command.

/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

  InsecurePlatformWarning

Collecting pip

  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)

    100% |████████████████████████████████| 1.3MB 11kB/s 

Installing collected packages: pip

  Found existing installation: pip 7.1.0

    Uninstalling pip-7.1.0:

      Successfully uninstalled pip-7.1.0

Successfully installed pip-9.0.1

编译安装python 3.5

[root@dk jumpserver-dev]# 

[root@dk tmp]# tar xf Python-3.5.4.tgz 

[root@dk tmp]# cd Python-3.5.4

[root@dk Python-3.5.4]# ./configure --enable-optimizations --enable-shared 

[root@dk Python-3.5.4]#make install

[root@dk Python-3.5.4]# rm -rf /usr/bin/python

[root@dk Python-3.5.4]# ln -sv /usr/local/bin/python3.5 /usr/bin/python

"/usr/bin/python" -> "/usr/local/bin/python3.5"

[root@xiong Python-3.5.4]# 

查看python版本是报错。

[root@xiong Python-3.5.4]# python -V

python: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

解决方法:

[root@dk Python-3.5.4]# ln -sv /usr/local/lib/libpython3.5m.so.1.0 /usr/lib64

"/usr/lib64/libpython3.5m.so.1.0" -> "/usr/local/lib/libpython3.5m.so.1.0"

[root@dk Python-3.5.4]# ldconfig

[root@dk Python-3.5.4]# python -V

Python 3.5.4

[root@xiong Python-3.5.4]# 


[root@xiong jumpserver-dev]# pip install pipreqs

Collecting pipreqs

  Using cached pipreqs-0.4.9-py2.py3-none-any.whl

Collecting yarg (from pipreqs)

  Using cached yarg-0.1.9-py2.py3-none-any.whl

Collecting docopt (from pipreqs)

  Using cached docopt-0.6.2.tar.gz

Collecting requests (from yarg->pipreqs)

  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)

    100% |████████████████████████████████| 92kB 15kB/s 

Collecting idna<2.7,>=2.5 (from requests->yarg->pipreqs)

  Downloading idna-2.6-py2.py3-none-any.whl (56kB)

    100% |████████████████████████████████| 61kB 15kB/s 

Collecting urllib3<1.23,>=1.21.1 (from requests->yarg->pipreqs)

  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)

    100% |████████████████████████████████| 133kB 11kB/s 

Collecting certifi>=2017.4.17 (from requests->yarg->pipreqs)

  Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)

    100% |████████████████████████████████| 358kB 11kB/s 

Collecting chardet<3.1.0,>=3.0.2 (from requests->yarg->pipreqs)

  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)

    100% |████████████████████████████████| 143kB 12kB/s 

Installing collected packages: idna, urllib3, certifi, chardet, requests, yarg, docopt, pipreqs

  Running setup.py install for docopt ... done

Successfully installed certifi-2017.7.27.1 chardet-3.0.4 docopt-0.6.2 idna-2.6 pipreqs-0.4.9 requests-2.18.4 urllib3-1.22 yarg-0.1.9

安装 pip install -r requirements.txt

[root@dk jumpserver-dev]# pip install  -r requirements/requirements.txt 

[root@xiong jumpserver-dev]# 

[root@dk jumpserver-dev]# yum list mysql-python

  File "/usr/bin/yum", line 30

    except KeyboardInterrupt, e:

                            ^

SyntaxError: invalid syntax

解决方法:  --#修改yum安装工具包的python源为2.7版本、   并将python3.5链接为python

vim /usr/bin/yum

#!/usr/bin/python2.6

安装pip install -r requirements.txt 

[root@dk requirements]# pip install -r requirements.txt 

Successfully installed Django-1.11.4 ForgeryPy-0.1 MarkupSafe-1.0 PyYAML-3.12 amqp-2.2.1 ansible-2.3.2.0 asn1crypto-0.22.0 bcrypt-3.1.3 billiard-3.5.0.3 celery-4.1.0 cffi-1.10.0 coreapi-2.3.1 coreschema-0.0.4 cryptography-2.0.3 decorator-4.1.2 django-auth-ldap-1.2.15 django-bootstrap3-9.0.0 django-filter-1.0.4 django-formtools-2.0 django-redis-cache-1.7.1 django-rest-swagger-2.1.2 django-simple-captcha-0.5.5 djangorestframework-3.6.4 djangorestframework-bulk-0.2.1 ecdsa-0.13 enum-compat-0.0.2 eventlet-0.21.0 greenlet-0.4.12 gssapi-1.2.0 itsdangerous-0.24 itypes-1.1.0 jinja2-2.9.6 kombu-4.1.0 ldap3-2.3 openapi-codec-1.3.2 paramiko-2.2.1 passlib-1.7.1 pyasn1-0.3.2 pycparser-2.18 pycrypto-2.6.1 pyldap-2.4.37 pynacl-1.1.2 pytz-2017.2 redis-2.10.6 simplejson-3.11.1 six-1.10.0 sshpubkeys-2.2.0 uritemplate-3.0.0 vine-1.1.4


准备配置文件

[root@dk docs]# cd ..

[root@dk jumpserver-dev]# cp config_example.py config.py

[root@dk jumpserver-dev]# vim config.py 

    class DevelopmentConfig(Config):

    EMAIL_HOST = ‘smtp.exmail.qq.com‘

    EMAIL_PORT = 465

    EMAIL_HOST_USER = ‘a@jumpserver.org‘

    EMAIL_HOST_PASSWORD = ‘somepasswrd‘

    EMAIL_USE_SSL = True

    EMAIL_USE_TLS = False

    EMAIL_SUBJECT_PREFIX = ‘[Jumpserver] ‘

    SITE_URL = ‘http://localhost:8080‘


初始化数据库

[root@dk jumpserver-dev]# cd utils/

[root@dk utils]# sh make_migrations.sh

[root@dk utils]# sh init_db.sh 

Installed 4 object(s) from 1 fixture(s)


安装redis

[root@dk utils]# yum -y install redis

[root@dk utils]# service redis start

启动 :                                                    [确定]


启动服务

[root@dk jumpserver-dev]# python run_server.py 


访问http://ip+8080端口

默认密码都是admin: admin

技术分享

技术分享

到了这就已经安装完成了,上面哪有问题的 大神们可以帮忙指出来 ! 十分感谢


jumpserver 跳板机安装教程

标签:jumpserver install

原文地址:http://dklwj.blog.51cto.com/9199080/1959099

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!