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
a95e1bb8
Commit
a95e1bb8
authored
9 years ago
by
yumaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix (install.py): compatible fedora
1. compatible fedora (test fedora22)
parent
247e5e7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
install.py
install/install.py
+8
-3
No files found.
install/install.py
View file @
a95e1bb8
...
...
@@ -94,6 +94,11 @@ class PreSetup(object):
if
self
.
dist
==
"centos"
and
self
.
version
.
startswith
(
"7"
):
return
True
@property
def
_is_fedora_new
(
self
):
if
self
.
dist
==
"fedora"
and
int
(
self
.
version
)
>=
20
:
return
True
@property
def
_is_ubuntu
(
self
):
if
self
.
dist
==
"ubuntu"
or
self
.
dist
==
"debian"
:
...
...
@@ -128,7 +133,7 @@ class PreSetup(object):
color_print
(
'开始安装设置mysql (请手动设置mysql安全)'
,
'green'
)
color_print
(
'默认用户名:
%
s 默认密码:
%
s'
%
(
self
.
db_user
,
self
.
db_pass
),
'green'
)
if
self
.
_is_redhat
:
if
self
.
_is_centos7
:
if
self
.
_is_centos7
or
self
.
_is_fedora_new
:
bash
(
'yum -y install mariadb-server mariadb-devel'
)
bash
(
'systemctl enable mariadb.service'
)
bash
(
'systemctl start mariadb.service'
)
...
...
@@ -157,7 +162,7 @@ class PreSetup(object):
color_print
(
'开始关闭防火墙和selinux'
,
'green'
)
if
self
.
_is_redhat
:
os
.
system
(
"export LANG='en_US.UTF-8'"
)
if
self
.
_is_centos7
:
if
self
.
_is_centos7
or
self
.
_is_fedora_new
:
cmd1
=
"systemctl status firewalld 2> /dev/null 1> /dev/null"
cmd2
=
"systemctl stop firewalld"
cmd3
=
"systemctl disable firewalld"
...
...
@@ -171,7 +176,7 @@ class PreSetup(object):
if
self
.
_is_ubuntu
:
os
.
system
(
"export LANG='en_US.UTF-8'"
)
bash
(
"which iptables && iptables -F"
)
bash
(
'which se
linux
&& setenforce 0'
)
bash
(
'which se
tenforce
&& setenforce 0'
)
def
_test_db_conn
(
self
):
bash
(
"pip install mysql-python"
)
...
...
This diff is collapsed.
Click to expand it.
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