mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 00:44:48 +00:00
fix (install.py): ubuntu auto install mysql-server
1. auto install mysql server
This commit is contained in:
@@ -131,9 +131,9 @@ class PreSetup(object):
|
|||||||
self.db_host,
|
self.db_host,
|
||||||
self.db_pass))
|
self.db_pass))
|
||||||
if self._is_ubuntu:
|
if self._is_ubuntu:
|
||||||
cmd1 = 'echo mysql-server mysql-server/root_password select '' | debconf-set-selections'
|
cmd1 = "echo mysql-server mysql-server/root_password select '' | debconf-set-selections"
|
||||||
cmd2 = 'echo mysql-server mysql-server/root_password_again select '' | debconf-set-selections'
|
cmd2 = "echo mysql-server mysql-server/root_password_again select '' | debconf-set-selections"
|
||||||
cmd3 = 'apt-get -y install mysql-server'
|
cmd3 = "apt-get -y install mysql-server"
|
||||||
bash('%s; %s; %s' % (cmd1, cmd2, cmd3))
|
bash('%s; %s; %s' % (cmd1, cmd2, cmd3))
|
||||||
bash('service mysql start')
|
bash('service mysql start')
|
||||||
bash('mysql -e "create database %s default charset=utf8"' % self.db)
|
bash('mysql -e "create database %s default charset=utf8"' % self.db)
|
||||||
|
Reference in New Issue
Block a user