Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
b80ad40f
Commit
b80ad40f
authored
Feb 28, 2016
by
yumaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix (install.py): compatable centos7
1. use systemctl stop firewalld 2. add dependence: readline-devel and lrzsz
parent
cac94245
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
install.py
install/install.py
+18
-4
next.py
install/next.py
+1
-1
No files found.
install/install.py
View file @
b80ad40f
...
...
@@ -88,6 +88,13 @@ class PreSetup(object):
if
self
.
dist
==
"centos"
or
self
.
dist
==
"redhat"
or
self
.
dist
==
"fedora"
:
return
True
@property
def
_is_centos7
(
self
):
version
=
platform
.
dist
()[
1
]
if
self
.
_is_redhat
:
if
version
.
startswith
(
"7"
):
return
True
@property
def
_is_ubuntu
(
self
):
if
self
.
dist
==
"ubuntu"
or
self
.
dist
==
"debian"
:
...
...
@@ -146,10 +153,17 @@ class PreSetup(object):
color_print
(
'开始关闭防火墙和selinux'
,
'green'
)
if
self
.
_is_redhat
:
os
.
system
(
"export LANG='en_US.UTF-8' && sed -i 's/LANG=.*/LANG=en_US.UTF-8/g' /etc/sysconfig/i18n"
)
bash
(
'service iptables stop && chkconfig iptables off && setenforce 0'
)
if
self
.
_is_centos7
:
cmd1
=
"systemctl status firewalld 2> /dev/null 1> /dev/null"
cmd2
=
"systemctl stop firewalld"
cmd3
=
"systemctl disable firewalld"
bash
(
'
%
s &&
%
s &&
%
s'
%
(
cmd1
,
cmd2
,
cmd3
))
bash
(
'setenforce 0'
)
else
:
bash
(
'service iptables stop && chkconfig iptables off && setenforce 0'
)
if
self
.
_is_ubuntu
:
os
.
system
(
"export LANG='en_US.UTF-8'"
)
bash
(
"iptables -F"
)
bash
(
"
which iptables &&
iptables -F"
)
bash
(
'which selinux && setenforce 0'
)
def
_test_db_conn
(
self
):
...
...
@@ -189,9 +203,9 @@ class PreSetup(object):
def
_depend_rpm
(
self
):
color_print
(
'开始安装依赖包'
,
'green'
)
if
self
.
_is_redhat
:
bash
(
'yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass'
)
bash
(
'yum -y install git python-pip mysql-devel gcc automake autoconf python-devel vim sshpass
lrzsz readline-devel
'
)
if
self
.
_is_ubuntu
:
bash
(
"apt-get -y --force-yes install git python-pip gcc automake autoconf vim sshpass libmysqld-dev python-all-dev"
)
bash
(
"apt-get -y --force-yes install git python-pip gcc automake autoconf vim sshpass libmysqld-dev python-all-dev
lrzsz libreadline-dev
"
)
@staticmethod
...
...
install/next.py
View file @
b80ad40f
...
...
@@ -99,7 +99,7 @@ class Setup(object):
color_print
(
'安装成功,请访问web, 祝你使用愉快。
\n
请访问 https://github.com/jumpserver/jumpserver 查看文档'
,
'green'
)
def
start
(
self
):
print
"开始安装Jumpserver
, 要求环境为 CentOS 6.5 x86_64
"
print
"开始安装Jumpserver
...
"
self
.
_pull
()
self
.
_sync_db
()
self
.
_input_admin
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment