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
c36267dc
Commit
c36267dc
authored
Dec 20, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebase version
parent
b7eb95f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
install.py
install/install.py
+0
-9
next.py
install/next.py
+13
-0
No files found.
install/install.py
View file @
c36267dc
...
@@ -5,7 +5,6 @@ import subprocess
...
@@ -5,7 +5,6 @@ import subprocess
import
time
import
time
import
os
import
os
import
sys
import
sys
import
smtplib
import
MySQLdb
import
MySQLdb
from
smtplib
import
SMTP
,
SMTPAuthenticationError
,
SMTPConnectError
from
smtplib
import
SMTP
,
SMTPAuthenticationError
,
SMTPConnectError
import
ConfigParser
import
ConfigParser
...
@@ -191,14 +190,6 @@ class PreSetup(object):
...
@@ -191,14 +190,6 @@ class PreSetup(object):
break
break
print
print
@staticmethod
def
_pull
():
color_print
(
'开始更新jumpserver'
,
'green'
)
# bash('git pull')
os
.
chdir
(
jms_dir
)
os
.
chmod
(
'logs'
,
0777
)
os
.
chmod
(
'keys'
,
0777
)
def
start
(
self
):
def
start
(
self
):
# self._rpm_repo()
# self._rpm_repo()
# self._depend_rpm()
# self._depend_rpm()
...
...
install/next.py
View file @
c36267dc
...
@@ -6,6 +6,7 @@ import os
...
@@ -6,6 +6,7 @@ import os
import
django
import
django
from
django.core.management
import
execute_from_command_line
from
django.core.management
import
execute_from_command_line
import
shutil
import
shutil
import
urllib
jms_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
)))
jms_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
)))
sys
.
path
.
append
(
jms_dir
)
sys
.
path
.
append
(
jms_dir
)
...
@@ -16,6 +17,7 @@ if django.get_version() != '1.6':
...
@@ -16,6 +17,7 @@ if django.get_version() != '1.6':
from
juser.user_api
import
db_add_user
,
get_object
,
User
from
juser.user_api
import
db_add_user
,
get_object
,
User
from
install
import
color_print
from
install
import
color_print
from
jumpserver.api
import
get_mac_address
class
Setup
(
object
):
class
Setup
(
object
):
...
@@ -27,6 +29,16 @@ class Setup(object):
...
@@ -27,6 +29,16 @@ class Setup(object):
self
.
admin_user
=
'admin'
self
.
admin_user
=
'admin'
self
.
admin_pass
=
'5Lov@wife'
self
.
admin_pass
=
'5Lov@wife'
@staticmethod
def
_pull
():
color_print
(
'开始更新jumpserver'
,
'green'
)
# bash('git pull')
mac
=
get_mac_address
()
version
=
urllib
.
urlopen
(
'http://jumpserver.org/version/?id=
%
s'
%
mac
)
os
.
chdir
(
jms_dir
)
os
.
chmod
(
'logs'
,
0777
)
os
.
chmod
(
'keys'
,
0777
)
def
_input_admin
(
self
):
def
_input_admin
(
self
):
while
True
:
while
True
:
print
print
...
@@ -75,6 +87,7 @@ class Setup(object):
...
@@ -75,6 +87,7 @@ class Setup(object):
def
start
(
self
):
def
start
(
self
):
print
"开始安装Jumpserver, 要求环境为 CentOS 6.5 x86_64"
print
"开始安装Jumpserver, 要求环境为 CentOS 6.5 x86_64"
self
.
_pull
()
self
.
_sync_db
()
self
.
_sync_db
()
self
.
_input_admin
()
self
.
_input_admin
()
self
.
_create_admin
()
self
.
_create_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