From b7eb95f85fae9a2d8ac5f930873745196590e8ca Mon Sep 17 00:00:00 2001 From: ibuler Date: Sun, 20 Dec 2015 17:45:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install.py | 10 +++++----- install/next.py | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/install/install.py b/install/install.py index 6bf21b649..2200ad3e2 100755 --- a/install/install.py +++ b/install/install.py @@ -93,7 +93,7 @@ class PreSetup(object): def _setup_mysql(self): color_print('开始安装设置mysql (请手动设置mysql安全)', 'green') - color_print('默认用户名: %s 密码密码: %s' % (self.db_user, self.db_pass), 'green') + color_print('默认用户名: %s 默认密码: %s' % (self.db_user, self.db_pass), 'green') bash('yum -y install mysql-server') bash('service mysqld start') bash('mysql -e "create database %s default charset=utf8"' % self.db) @@ -152,8 +152,8 @@ class PreSetup(object): def _input_mysql(self): while True: - mysql = raw_input('是否使用已经存在的数据库服务器? (y/n) [n]: ') - if mysql != 'y': + mysql = raw_input('是否安装新的MySQL服务器? (y/n) [y]: ') + if mysql != 'n': self._setup_mysql() else: db_host = raw_input('请输入数据库服务器IP [127.0.0.1]: ') @@ -176,11 +176,11 @@ class PreSetup(object): def _input_smtp(self): while True: self.mail_host = raw_input('请输入SMTP地址: ').strip() - mail_port = int(raw_input('请输入SMTP端口 [25]: ').strip()) + mail_port = raw_input('请输入SMTP端口 [25]: ').strip() self.mail_addr = raw_input('请输入账户: ').strip() self.mail_pass = raw_input('请输入密码: ').strip() - if mail_port: self.mail_port = mail_port + if mail_port: self.mail_port = int(mail_port) if self._test_mail(): color_print('\n\t请登陆邮箱查收邮件, 然后确认是否继续安装\n', 'green') diff --git a/install/next.py b/install/next.py index ef7319d67..9c3f1f652 100755 --- a/install/next.py +++ b/install/next.py @@ -29,6 +29,7 @@ class Setup(object): def _input_admin(self): while True: + print admin_user = raw_input('请输入管理员用户名 [%s]: ' % self.admin_user).strip() admin_pass = raw_input('请输入管理员密码: [%s]: ' % self.admin_pass).strip() admin_pass_again = raw_input('请再次输入管理员密码: [%s]: ' % self.admin_pass).strip()