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
dee1d31f
Commit
dee1d31f
authored
Feb 23, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change(with
6be7003a
) 联动改变安装脚本
1. 为init.sh添加执行权限 2. 统一函数功能 修改其他需要改变权限的脚本或目录
parent
363bce82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
next.py
install/next.py
+11
-9
No files found.
install/next.py
View file @
dee1d31f
...
@@ -41,9 +41,6 @@ class Setup(object):
...
@@ -41,9 +41,6 @@ class Setup(object):
version
=
urllib
.
urlopen
(
'http://jumpserver.org/version/?id=
%
s'
%
mac
)
version
=
urllib
.
urlopen
(
'http://jumpserver.org/version/?id=
%
s'
%
mac
)
except
:
except
:
pass
pass
os
.
chdir
(
jms_dir
)
os
.
chmod
(
'logs'
,
0777
)
os
.
chmod
(
'keys'
,
0777
)
def
_input_admin
(
self
):
def
_input_admin
(
self
):
while
True
:
while
True
:
...
@@ -81,16 +78,21 @@ class Setup(object):
...
@@ -81,16 +78,21 @@ class Setup(object):
os
.
system
(
'id
%
s &> /dev/null || useradd
%
s'
%
(
self
.
admin_user
,
self
.
admin_user
))
os
.
system
(
'id
%
s &> /dev/null || useradd
%
s'
%
(
self
.
admin_user
,
self
.
admin_user
))
@staticmethod
@staticmethod
def
_cp_zzsh
():
def
_chmod_file
():
os
.
chdir
(
os
.
path
.
join
(
jms_dir
,
'install'
))
os
.
chdir
(
jms_dir
)
shutil
.
copy
(
'zzjumpserver.sh'
,
'/etc/profile.d/'
)
os
.
chmod
(
'init.sh'
,
0755
)
bash
(
"sed -i 's#/opt/jumpserver#
%
s#g' /etc/profile.d/zzjumpserver.sh"
%
jms_dir
)
os
.
chmod
(
'connect.py'
,
0755
)
os
.
chmod
(
'manage.py'
,
0755
)
os
.
chmod
(
'run_websocket.py'
,
0755
)
os
.
chmod
(
'service.sh'
,
0755
)
os
.
chmod
(
'logs'
,
0777
)
os
.
chmod
(
'keys'
,
0777
)
@staticmethod
@staticmethod
def
_run_service
():
def
_run_service
():
os
.
system
(
'sh
%
s start'
%
os
.
path
.
join
(
jms_dir
,
'service.sh'
))
os
.
system
(
'sh
%
s start'
%
os
.
path
.
join
(
jms_dir
,
'service.sh'
))
print
print
color_print
(
'安装成功,请访问web, 祝你使用愉快。
\n
请访问 https://github.com/
ibul
er/jumpserver 查看文档'
,
'green'
)
color_print
(
'安装成功,请访问web, 祝你使用愉快。
\n
请访问 https://github.com/
jumpserv
er/jumpserver 查看文档'
,
'green'
)
def
start
(
self
):
def
start
(
self
):
print
"开始安装Jumpserver, 要求环境为 CentOS 6.5 x86_64"
print
"开始安装Jumpserver, 要求环境为 CentOS 6.5 x86_64"
...
@@ -98,7 +100,7 @@ class Setup(object):
...
@@ -98,7 +100,7 @@ class Setup(object):
self
.
_sync_db
()
self
.
_sync_db
()
self
.
_input_admin
()
self
.
_input_admin
()
self
.
_create_admin
()
self
.
_create_admin
()
self
.
_c
p_zzsh
()
self
.
_c
hmod_file
()
self
.
_run_service
()
self
.
_run_service
()
...
...
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