基础环境:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# CentOS 7 $ setenforce 0 # 临时关闭,重启后失效 $ systemctl stop firewalld.service # 临时关闭,重启后失效 # 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文 $ 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/locale.conf # CentOS6 $ setenforce 0 # 临时关闭,重启后失效 $ service iptables stop # 临时关闭,重启后失效 # 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文 $ 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 |
安装依赖:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
$ yum -y install wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git $ 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 --prefix=/opt/Python-3.6.1 --enable-optimizations && make && make install # 这里必须执行编译安装,否则在安装 Python 库依赖时会有麻烦... $ cd /opt $ python3 -m venv py3 $ source /opt/py3/bin/activate # 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行 (py3) [root@localhost py3] $ cd /opt $ git clone https://github.com/kennethreitz/autoenv.git $ echo 'source /opt/autoenv/activate.sh' >> ~/.bashrc $ source ~/.bashrc $ echo "source /opt/py3/bin/activate" > /opt/jumpserver/.env |
官方文档:
1:https://jumpserver.readthedocs.io/zh/master/setup_by_centos.htmlSourceByrd's Weblog-https://note.t4x.org/basic/jumpserver-install/
SourceByrd's Weblog-https://note.t4x.org/basic/jumpserver-install/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!