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
0715e11c
Commit
0715e11c
authored
Dec 18, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix install bug
parent
1fc86733
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
next.py
install/next.py
+8
-4
jumpserver.conf
jumpserver.conf
+6
-7
No files found.
install/next.py
View file @
0715e11c
...
@@ -14,7 +14,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'jumpserver.settings'
...
@@ -14,7 +14,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'jumpserver.settings'
if
django
.
get_version
()
!=
'1.6'
:
if
django
.
get_version
()
!=
'1.6'
:
setup
=
django
.
setup
()
setup
=
django
.
setup
()
from
juser.user_api
import
db_add_user
,
server_add_u
ser
from
juser.user_api
import
db_add_user
,
get_object
,
U
ser
from
install
import
color_print
from
install
import
color_print
...
@@ -25,7 +25,7 @@ class Setup(object):
...
@@ -25,7 +25,7 @@ class Setup(object):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
admin_user
=
'admin'
self
.
admin_user
=
'admin'
self
.
admin_pass
=
'Lov@wife'
self
.
admin_pass
=
'
5
Lov@wife'
def
_input_admin
(
self
):
def
_input_admin
(
self
):
while
True
:
while
True
:
...
@@ -54,18 +54,22 @@ class Setup(object):
...
@@ -54,18 +54,22 @@ class Setup(object):
execute_from_command_line
([
'manage.py'
,
'syncdb'
,
'--noinput'
])
execute_from_command_line
([
'manage.py'
,
'syncdb'
,
'--noinput'
])
def
_create_admin
(
self
):
def
_create_admin
(
self
):
user
=
get_object
(
User
,
username
=
self
.
admin_user
)
if
user
:
user
.
delete
()
db_add_user
(
username
=
self
.
admin_user
,
password
=
self
.
admin_pass
,
role
=
'SU'
,
name
=
'admin'
,
groups
=
''
,
db_add_user
(
username
=
self
.
admin_user
,
password
=
self
.
admin_pass
,
role
=
'SU'
,
name
=
'admin'
,
groups
=
''
,
admin_groups
=
''
,
email
=
'admin@jumpserver.org'
,
uuid
=
'MayBeYouAreTheFirstUser'
,
is_active
=
True
)
admin_groups
=
''
,
email
=
'admin@jumpserver.org'
,
uuid
=
'MayBeYouAreTheFirstUser'
,
is_active
=
True
)
os
.
system
(
'id
%
s || 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
_cp_zzsh
():
os
.
chdir
(
jms_dir
)
os
.
chdir
(
os
.
path
.
join
(
jms_dir
,
'install'
)
)
shutil
.
copy
(
'zzjumpserver.sh'
,
'/etc/profile.d/'
)
shutil
.
copy
(
'zzjumpserver.sh'
,
'/etc/profile.d/'
)
@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
color_print
(
'安装成功,请访问web .'
)
color_print
(
'安装成功,请访问web .'
)
def
start
(
self
):
def
start
(
self
):
...
...
jumpserver.conf
View file @
0715e11c
#coding: utf8
[
base
]
[
base
]
url
=
http
://
j
url
=
http
://
192
.
168
.
244
.
129
key
=
88
aaaf7ffe3c6c04
key
=
88
aaaf7ffe3c6c04
log
=
debug
log
=
debug
...
@@ -13,12 +11,13 @@ password = mysql234
...
@@ -13,12 +11,13 @@ password = mysql234
database
=
jumpserver
database
=
jumpserver
[
websocket
]
[
websocket
]
web_socket_host
=
j
:
3000
web_socket_host
=
192
.
168
.
244
.
129
:
3000
[
mail
]
[
mail
]
mail_enable
=
1
mail_enable
=
1
email_host
=
smtp
.
exmail
.
qq
.
com
email_host
=
smtp
.
qq
.
com
email_port
=
25
email_port
=
25
email_host_user
=
noreply
@
jumpserver
.
org
email_host_user
=
ibuler
@
qq
.
com
email_host_password
=
jumpserver1234
email_host_password
=
Hudie117
...
qq
email_use_tls
=
True
email_use_tls
=
True
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