WO2015188617A1 - 一种MySQL数据库的安装方法及装置 - Google Patents

一种MySQL数据库的安装方法及装置 Download PDF

Info

Publication number
WO2015188617A1
WO2015188617A1 PCT/CN2015/070215 CN2015070215W WO2015188617A1 WO 2015188617 A1 WO2015188617 A1 WO 2015188617A1 CN 2015070215 W CN2015070215 W CN 2015070215W WO 2015188617 A1 WO2015188617 A1 WO 2015188617A1
Authority
WO
WIPO (PCT)
Prior art keywords
installation
mysql
script
node
installing
Prior art date
Application number
PCT/CN2015/070215
Other languages
English (en)
French (fr)
Inventor
吴秋鹏
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015188617A1 publication Critical patent/WO2015188617A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the invention relates to the technical field of installing a MySQL database, in particular to a method and a device for installing a MySQL database.
  • FIG. 1 is a schematic diagram of user operations for installing a large number of MySQL databases according to the related art. As shown in FIG. 1 , if an operation and maintenance personnel manually install and configure one station, it takes a lot of effort and time, and it is also prone to error. The technical requirements of the operation and maintenance personnel are also relatively high.
  • the invention provides a method and a device for installing a MySQL database to solve the above technical problem, in view of the problem that the installation method of the MySQL database in the related art consumes too much effort and time.
  • a method of installing a MySQL database including:
  • the server of each installation node obtains the MySQL installation package, the MySQL installation script, and the configuration files corresponding to each installation node from the subscription server;
  • the server of each installation node is based on the MySQL installation package and the MySQL installation foot
  • the MySQL database is installed in batches; the MySQL database is run according to the configuration file.
  • the method includes:
  • a configuration file of each installation node is generated according to the installation information and the MySQL configuration information.
  • the method further includes:
  • connection address is used to connect to the subscription server
  • the step of installing, by the server of each installation node, the MySQL database in batch according to the MySQL installation package and the MySQL installation script includes:
  • the server of each installation node invokes an installation entry script; the MySQL installation script is invoked according to the installation entry script;
  • the servers of each installation node install the MySQL database in batches according to the MySQL installation script and the MySQL installation package.
  • the installation information includes at least one of the following:
  • a device for installing a MySQL database comprising a node configuration module and a server for each installation node, wherein:
  • the node configuration module is configured to: configure multiple installation nodes;
  • the server of each installation node is set to: obtain a MySQL installation package, a MySQL installation script, and a configuration file corresponding to each installation node from the subscription server; The package and the MySQL installation script, install the MySQL database in batches; run the MySQL database according to the configuration file.
  • the device further includes an information configuration module and a file generation module, where:
  • the information configuration module is configured to: configure installation information and MySQL configuration information corresponding to each installation node;
  • the file generating module is configured to: generate a configuration file of each installation node according to the installation information and the MySQL configuration information.
  • the device further includes an address setting module, a directory generating module, and an uploading module, where:
  • the address setting module is configured to: set a connection address of the subscription server; wherein the connection address is used to connect to the subscription server;
  • the directory generation module is configured to: place the MySQL installation package into an installation directory; write the MySQL installation script to the installation directory;
  • the uploading module is configured to: upload the MySQL installation package, the MySQL installation script, and the configuration file to the subscription server.
  • the servers of the respective installation nodes are further configured to:
  • the installation information includes at least one of the following:
  • a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the installation of any of the above-described MySQL databases.
  • a carrier carrying the computer program A carrier carrying the computer program.
  • the installation information and the MySQL configuration information of the installation node are set centrally.
  • the configuration file is generated, and the MySQL installation package, the MySQL installation script, and the configuration file are automatically sent to the target node by the tool, and the batch quick installation is realized, which solves the problem that the installation method of the MySQL database in the related technology consumes too much energy and time. It reduces the cumbersomeness and complexity of large-scale installation of MySQL, greatly shortens the installation time, greatly reduces the possibility of misoperation, and ensures the success rate and correctness of the installation.
  • 1 is a schematic diagram of user operations for installing a large number of MySQL databases according to the related art
  • FIG. 2 is a flowchart of a method for installing a MySQL database according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of user operation using the batch installation tool of the present invention, in accordance with an embodiment of the present invention
  • FIG. 4 is a structural block diagram of a device for installing a MySQL database according to an embodiment of the present invention.
  • FIG. 5 is a structural block diagram of a batch installation system of a MySQL database according to an embodiment of the present invention.
  • FIG. 6 is a schematic flow chart of batch installation of a MySQL database according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method and an apparatus for installing a MySQL database.
  • the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • FIG. 2 is a flowchart of a method for installing a MySQL database according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps (step S202 - step S206):
  • Step S202 configuring a plurality of installation nodes.
  • the configuration file of each installation node can be implemented by the following preferred implementation manners: configuring installation information and MySQL configuration information corresponding to each installation node; and generating configuration files of each installation node according to the installation information and the MySQL configuration information.
  • the installation information may include at least one of the following: a network interconnection protocol IP address, an installation user, a login type, and a root user login password.
  • Step S204 The server of each installation node obtains a MySQL installation package, a MySQL installation script, and a configuration file corresponding to each installation node from the FTP server.
  • step S206 the servers of each installation node install the MySQL database in batches according to the MySQL installation package and the MySQL installation script; and run the MySQL database according to the configuration file.
  • the server of each installation node installs the MySQL database according to the MySQL installation package and the MySQL installation script, which can be implemented by the following preferred embodiments: the server of each installation node invokes the installation entry script; the MySQL installation script is invoked according to the installation entry script; The servers of each installation node install the MySQL database in batches according to the MySQL installation script and the MySQL installation package.
  • the installation information of the installation node and the MySQL configuration information are set centrally, and the configuration file is generated, and the MySQL installation package, the MySQL installation script, and the configuration file are automatically sent to the target node by the tool, thereby realizing rapid installation in batches and solving related problems.
  • the MySQL database installation method in the technology consumes too much effort and time, reduces the cumbersomeness and complexity of large-scale installation of MySQL, greatly shortens the installation time, greatly reduces the possibility of misoperation, and ensures the success of the installation. Rate and correctness.
  • the foregoing method of the embodiment further includes: setting a connection address of the FTP server; wherein the connection address is used to connect to the FTP Server; place the MySQL installation package in the installation directory; write the MySQL installation script to the installation directory; upload the MySQL installation package, MySQL installation script, and configuration file to the FTP server.
  • Step A Set the FTP server connection information in the tool setting interface.
  • Step B Put the MySQL installation package in the installation directory of the tool.
  • Step C Write the shell script for installing MySQL according to actual needs and put it in the installation directory.
  • Step D Open the installation node centralized configuration interface, add multiple target nodes to install MySQL, and configure the installation information of each node (such as IP address, installation user, login type (Telnet or ssh), root user login password) and MySQL. Configuration information, click the Save button when the configuration is complete.
  • Step E Open the batch installation interface and click the Install button to automatically install the MySQL database for all target nodes.
  • step D In the above operational flow, the order of execution of steps A, B, C and step D is not specifically limited.
  • system information of the installation node and the MySQL configuration information are set in a centralized manner, and the configuration file is generated, and the installation package, the installation script, and the configuration file are automatically sent to the target node by the tool, thereby achieving the purpose of rapid batch installation.
  • the user operation diagram of the embodiment of the present invention using the batch installation tool of the present invention can reduce the cumbersomeness and complexity of large-scale installation of MySQL by using the installation method provided by the schematic diagram, and greatly shorten the installation time.
  • the present invention greatly Reduce the possibility of misoperation and ensure the success rate and correctness of the installation.
  • this embodiment provides a device for installing a MySQL database, which is used to implement the above embodiment.
  • 4 is a structural block diagram of a device for installing a MySQL database according to an embodiment of the present invention. As shown in FIG. 4, the device includes a node configuration module 10 and a server 20 for each installation node. The structure is described in detail below.
  • a node configuration module 10 configured to configure multiple installation nodes
  • the server 20 of each installation node is connected to the node configuration module 10 for obtaining a MySQL installation package, a MySQL installation script, and a configuration file corresponding to each installation node from the FTP server; and installing the MySQL database in batches according to the MySQL installation package and the MySQL installation script; According to Set the file to run the MySQL database.
  • the installation information of the installation node and the MySQL configuration information are collectively set, the configuration file is generated, and the MySQL installation package, the MySQL installation script, and the configuration file are automatically sent to the target node by the tool, thereby realizing rapid installation in batches and solving related problems.
  • the MySQL database installation method in the technology consumes too much effort and time, reduces the cumbersomeness and complexity of large-scale installation of MySQL, greatly shortens the installation time, greatly reduces the possibility of misoperation, and ensures the success of the installation. Rate and correctness.
  • the configuration file is obtained according to the installation information and the MySQL configuration information corresponding to each installation node. Therefore, the embodiment provides a preferred implementation manner, that is, the device further includes: an information configuration module, configured to configure The installation information and MySQL configuration information corresponding to each installation node; the file generation module is configured to generate a configuration file of each installation node according to the installation information and the MySQL configuration information.
  • the foregoing installation information may include at least one of the following: a network interconnection protocol IP address, an installation user, a login type, and a root user login password.
  • the apparatus further includes: an address setting module, configured to set a connection address of the FTP server; wherein the connection address is used to connect to the FTP server; and the directory generation module is configured to place the MySQL installation package Install the directory; write the MySQL installation script to the installation directory; upload the module to upload the MySQL installation package, MySQL installation script and configuration file to the FTP server.
  • an address setting module configured to set a connection address of the FTP server; wherein the connection address is used to connect to the FTP server
  • the directory generation module is configured to place the MySQL installation package Install the directory; write the MySQL installation script to the installation directory; upload the module to upload the MySQL installation package, MySQL installation script and configuration file to the FTP server.
  • the server 30 of each installation node is further configured to: invoke the installation entry script; invoke the MySQL installation script according to the installation entry script; and install the MySQL database in batch according to the MySQL installation script and the MySQL installation package.
  • FIG. 5 is a structural block diagram of a batch installation system of a MySQL database according to an embodiment of the present invention. As shown in FIG. 5, the system includes the following modules:
  • the configuration interface of each installation node is used to set the installation of the node.
  • Information and MySQL configuration information includes at least the IP address, the installation user, the login type (Telnet or ssh), the root user login password, etc.
  • the format of the MySQL configuration information is the same as the actual configuration file of MySQL, and can be freely filled according to the actual situation.
  • the installation parameter file is generated by the installation node centralized configuration module according to the interface configuration content, and includes two parts of information, one is installation node information, such as: IP address, installation user, login type (Telnet or ssh), root user login password, etc. Second, MySQL configuration information, such as: bind-address, basedir, datadir and so on.
  • Tool setting module setting FTP server information, installation timeout information, etc.
  • An FTP server is required during the installation of the installation package.
  • Bulk installation module upload the MySQL installation package, installation shell script, installation parameter file and generated MySQL configuration file to the FTP server, and log in to each installation through Telnet or ssh protocol according to the information of all installation nodes set by the installation node centralized configuration module. Node, download the MySQL installation package from the FTP server, install the shell script, install the parameter file and the generated MySQL configuration file, and then execute the installation shell script. Logging in to each installation node is a concurrent process.
  • the following is a schematic diagram of the process of installing the MySQL database in batches according to the embodiment of the present invention.
  • the process includes the following steps. :
  • Step 1 Start the batch installation tool, open the installation node centralized configuration interface, add multiple server nodes to install MySQL, configure the installation information of each node (such as IP address, installation user, login type (Telnet or ssh), root user Login password) and MySQL configuration information.
  • each node such as IP address, installation user, login type (Telnet or ssh), root user Login password
  • MySQL configuration information such as IP address, installation user, login type (Telnet or ssh), root user Login password
  • Step 2 After the configuration is complete, click the Save button and the tool will generate the installation configuration file and MySQL configuration file for the installation script to read.
  • Step 3 Set the FTP server connection address, specifically IP, port, user, and password.
  • Step 4 Place the MySQL installation package into the installation directory of the tool.
  • Step 5 Write the MySQL installation shell script to the installation directory of the tool according to actual needs.
  • Step 6 Click the Install button to launch the batch installation.
  • Step 7 Upload the installation content to the FTP server, including the MySQL installation package, the installation entry shell script, the MySQL installation shell script, the generated installation configuration file, and the MySQL configuration file.
  • Step 8 Log in to each installation server via ssh or Telnet.
  • Step 9 Obtain the installation contents from the FTP server, including the MySQL installation package, the installation entry shell script, the MySQL installation shell script, the generated installation configuration file, and the MySQL configuration file.
  • Step 10 Call the installation entry script, the script reads and creates the installation user according to the installation configuration file, and then calls the MySQL installation script written by the user.
  • Step 11 Call the MySQL installation script to install the database.
  • Step 12 Copy the MySQL configuration file to the MySQL installation directory.
  • the embodiment of the invention also discloses a computer program, comprising program instructions, which when executed by the computer, enable the computer to execute the installation method of any of the above MySQL databases.
  • a carrier carrying the computer program A carrier carrying the computer program.
  • Embodiments of the present invention relate to batch installation of a MySQL database. More specifically, it is a local centralized configuration of all installation nodes, automated remote batch installation of MySQL tools and implementation methods.
  • the invention solves the problem that the installation method of the MySQL database in the related technology consumes too much effort and time, reduces the cumbersomeness and complexity of large-scale installation of MySQL, greatly shortens the installation time, greatly reduces the possibility of misoperation, and ensures The success rate and correctness of the installation.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the installation information of the installation node and the MySQL configuration information are collectively set, and the configuration file is generated, and the MySQL installation package, the MySQL installation script, and the configuration file are automatically sent to the target node by the tool, thereby realizing rapid batch installation and solving.
  • the installation method of the MySQL database in the related art consumes too much effort and time, reduces the cumbersomeness and complexity of large-scale installation of MySQL, greatly shortens the installation time, greatly reduces the possibility of misoperation, and ensures installation. Success rate and correctness. Therefore, the present invention has strong industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

一种MySQL数据库的安装方法及装置。其中,该方法包括:配置多个安装节点(S202);各个安装节点的服务器从预订服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件(S204);各个安装节点的服务器根据MySQL安装包和MySQL安装脚本,批量安装MySQL数据库;根据配置文件运行MySQL数据库(S206)。通过上述方法,实现了MySQL数据库的批量快速安装,解决了相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,减少了大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间,大大降低了误操作的可能性,确保安装的成功率和正确性。

Description

一种MySQL数据库的安装方法及装置 技术领域
本发明涉及MySQL数据库的安装技术领域,特别是涉及一种MySQL数据库的安装方法及装置。
背景技术
随着信息化时代的变革,特别是去“IOE(Internet of Everything,万物互联)”运动不断深化发展,对关联数据库管理系统MySQL数据库的应用需求越来越广,像互联网、通讯、金融等行业复杂的业务系统需要部署大量的MySQL数据库,如何快速高效的安装大量MySQL数据库就成为一个问题。
图1是根据相关技术的安装大量MySQL数据库的用户操作示意图,如图1所示,如果靠运维人员手工一台台安装和配置的话,需要花费很多精力和时间,而且也很容易出错,对运维人员的技术要求也比较高。
针对相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,目前尚未提出有效的解决方案。
发明内容
针对相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,本发明提供了一种MySQL数据库的安装方法及装置,用以解决上述技术问题。
为解决上述技术问题,采用如下技术方案:
一种MySQL数据库的安装方法,包括:
配置多个安装节点;
各个安装节点的服务器从预订服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件;
各个安装节点的服务器根据所述MySQL安装包和所述MySQL安装脚 本,批量安装MySQL数据库;根据所述配置文件运行所述MySQL数据库。
可选地,配置多个安装节点的步骤之后,所述方法包括:
配置各个安装节点对应的安装信息和MySQL配置信息;
根据所述安装信息和所述MySQL配置信息,生成各个安装节点的配置文件。
可选地,所述各个安装节点的服务器从预订服务器获取MySQL安装包和MySQL安装脚本的步骤之前,所述方法还包括:
设置所述预订服务器的连接地址;其中,所述连接地址用于连接到所述预订服务器;
将所述MySQL安装包放置到安装目录;
编写所述MySQL安装脚本放置到安装目录;
将所述MySQL安装包、所述MySQL安装脚本和所述配置文件上传至所述预订服务器。
可选地,所述各个安装节点的服务器根据所述MySQL安装包和所述MySQL安装脚本,批量安装MySQL数据库的步骤包括:
各个安装节点的服务器调用安装入口脚本;根据所述安装入口脚本调用所述MySQL安装脚本;
各个安装节点的服务器根据所述MySQL安装脚本和所述MySQL安装包,批量安装MySQL数据库。
可选地,所述安装信息包括以下至少之一:
网络互联协议IP地址、安装用户、登陆类型、root用户登陆密码。
一种MySQL数据库的安装装置,包括节点配置模块及各个安装节点的服务器,其中:
所述节点配置模块设置成:配置多个安装节点;
各个安装节点的服务器设置成:从预订服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件;根据所述MySQL安装 包和所述MySQL安装脚本,批量安装MySQL数据库;根据所述配置文件运行所述MySQL数据库。
可选地,所述装置还包括信息配置模块和文件生成模块,其中:
所述信息配置模块设置成:配置各个安装节点对应的安装信息和MySQL配置信息;
所述文件生成模块设置成:根据所述安装信息和所述MySQL配置信息,生成各个安装节点的配置文件。
可选地,所述装置还包括地址设置模块、目录生成模块和上传模块,其中:
所述地址设置模块设置成:设置所述预订服务器的连接地址;其中,所述连接地址用于连接到所述预订服务器;
所述目录生成模块设置成:将所述MySQL安装包放置到安装目录;编写所述MySQL安装脚本放置到安装目录;
所述上传模块设置成:将所述MySQL安装包、所述MySQL安装脚本和所述配置文件上传至所述预订服务器。
可选地,所述各个安装节点的服务器,还设置成:
调用安装入口脚本;根据所述安装入口脚本调用所述MySQL安装脚本;根据所述MySQL安装脚本和所述MySQL安装包,批量安装MySQL数据库。
可选地,所述安装信息包括以下至少之一:
网络互联协议IP地址、安装用户、登陆类型、root用户登陆密码。
一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的MySQL数据库的安装方法。
一种载有所述计算机程序的载体。
通过本发明实施例,集中设置安装节点的安装信息和MySQL配置信息, 生成配置文件,由工具自动把MySQL安装包、MySQL安装脚本和配置文件下发到目标节点上,实现了批量快速安装,解决了相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,减少了大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间,大大降低了误操作的可能性,确保安装的成功率和正确性。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图概述
图1是根据相关技术的安装大量MySQL数据库的用户操作示意图;
图2是根据本发明实施例的MySQL数据库的安装方法的流程图;
图3是根据本发明实施例的使用本发明批量安装工具的用户操作示意图;
图4是根据本发明实施例的MySQL数据库的安装装置的结构框图;
图5是根据本发明实施例的MySQL数据库的批量安装系统的结构框图;
图6是根据本发明实施例的批量安装MySQL数据库的流程示意图。
本发明的较佳实施方式
为了解决相关技术MySQL数据库的安装方法耗费过多精力和时间的问题,本发明实施例提供了一种MySQL数据库的安装方法及装置,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。
本实施例提供了一种MySQL数据库的安装方法,图2是根据本发明实施例的MySQL数据库的安装方法的流程图,如图2所示,该方法包括以下步骤(步骤S202-步骤S206):
步骤S202,配置多个安装节点。
在该步骤之后,生成各个安装节点的配置文件。生成各个安装节点的配置文件可以通过以下优选实施方式实现:配置各个安装节点对应的安装信息和MySQL配置信息;根据安装信息和MySQL配置信息,生成各个安装节点的配置文件。其中,安装信息可以包括以下至少之一:网络互联协议IP地址、安装用户、登陆类型、root用户登陆密码。
步骤S204,各个安装节点的服务器从FTP服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件。
步骤S206,各个安装节点的服务器根据MySQL安装包和MySQL安装脚本,批量安装MySQL数据库;根据配置文件运行MySQL数据库。
在该步骤中,各个安装节点的服务器根据MySQL安装包和MySQL安装脚本,安装MySQL数据库,可以通过以下优选实施例实现:各个安装节点的服务器调用安装入口脚本;根据安装入口脚本调用MySQL安装脚本;各个安装节点的服务器根据MySQL安装脚本和MySQL安装包,批量安装MySQL数据库。
通过上述方法,集中设置安装节点的安装信息和MySQL配置信息,生成配置文件,由工具自动把MySQL安装包、MySQL安装脚本和配置文件下发到目标节点上,实现了批量快速安装,解决了相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,减少了大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间,大大降低了误操作的可能性,确保安装的成功率和正确性。
在上述步骤S204之前,即各个安装节点的服务器从FTP服务器获取MySQL安装包和MySQL安装脚本之前,本实施例的上述方法还包括:设置FTP服务器的连接地址;其中,连接地址用于连接到FTP服务器;将MySQL安装包放置到安装目录;编写MySQL安装脚本放置到安装目录;将MySQL安装包、MySQL安装脚本和配置文件上传至FTP服务器。
本发明的MySQL数据库的批量安装的技术方案主要是以下操作流程:
步骤A.在工具设置界面设置FTP服务器连接信息。
步骤B.把MySQL安装包放到工具的安装目录下。
步骤C.根据实际需要编写安装MySQL的shell脚本并放到安装目录下。
步骤D.打开安装节点集中配置界面,添加要安装MySQL的多个目标节点,配置每个节点的安装信息(如IP地址、安装用户、登陆类型(Telnet或ssh)、root用户登陆密码)和MySQL配置信息,配置结束后点击保存按钮。
步骤E.打开批量安装界面,点击安装按钮对所有目标节点自动安装MySQL数据库。
在上述操作流程中,步骤A、B、C与步骤D的执行顺序并无具体限定。
本实施例集中设置安装节点的系统信息和MySQL配置信息,生成配置文件,由工具自动把安装包、安装脚本和配置文件下发到目标节点上,达到了批量快速安装的目的。
一方面,只要在安装前一次性设置所有安装节点的信息,在安装过程中无需用户交互,无需手工登陆连接各节点,安装完成后也无需再修改MySQL配置文件,如图3所示的根据本发明实施例的使用本发明批量安装工具的用户操作示意图,通过运用该示意图提供的安装方法,可以减少大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间。
另一方面,安装前能够检查各安装节点的配置信息,确认准备无误后再执行安装,并由安装脚本自动修改MySQL的配置文件,相对于传统的手工逐一安装和修改配置的方法,本发明大大降低了误操作的可能性,确保安装的成功率和正确性。
对应于上述实施例介绍的MySQL数据库的安装方法,本实施例提供了一种MySQL数据库的安装装置,该装置用以实现上述实施例。图4是根据本发明实施例的MySQL数据库的安装装置的结构框图,如图4所示,该装置包括:节点配置模块10和各个安装节点的服务器20。下面对该结构进行详细介绍。
节点配置模块10,用于配置多个安装节点;
各个安装节点的服务器20,连接至节点配置模块10,用于从FTP服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件;根据MySQL安装包和MySQL安装脚本,批量安装MySQL数据库;根据配 置文件运行MySQL数据库。
通过上述装置,集中设置安装节点的安装信息和MySQL配置信息,生成配置文件,由工具自动把MySQL安装包、MySQL安装脚本和配置文件下发到目标节点上,实现了批量快速安装,解决了相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,减少了大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间,大大降低了误操作的可能性,确保安装的成功率和正确性。
在本实施例中,配置文件是根据各个安装节点对应的安装信息和MySQL配置信息得到的,因此,本实施例提供了一种优选实施方式,即上述装置还包括:信息配置模块,用于配置各个安装节点对应的安装信息和MySQL配置信息;文件生成模块,用于根据安装信息和MySQL配置信息,生成各个安装节点的配置文件。
在本实施例中,上述安装信息可以包括以下至少之一:网络互联协议IP地址、安装用户、登陆类型、root用户登陆密码。
在本实施例中,优选地,上述装置还包括:地址设置模块,用于设置FTP服务器的连接地址;其中,连接地址用于连接到FTP服务器;目录生成模块,用于将MySQL安装包放置到安装目录;编写MySQL安装脚本放置到安装目录;上传模块,用于将MySQL安装包、MySQL安装脚本和配置文件上传至FTP服务器。
在本实施例中,优选地,各个安装节点的服务器30,还用于:调用安装入口脚本;根据安装入口脚本调用MySQL安装脚本;根据MySQL安装脚本和MySQL安装包,批量安装MySQL数据库。
基于上述实施例介绍的MySQL数据库的安装方法及装置,本实施例提供一种MySQL数据库的批量安装系统,用以实现上述实施例。图5是根据本发明实施例的MySQL数据库的批量安装系统的结构框图,如图5所示,该系统包括以下模块:
1.安装节点集中配置模块,提供可视化的配置界面,可以添加多个需要安装MySQL的安装节点,每个安装节点的配置界面用来设置该节点的安装 信息和MySQL配置信息,系统信息至少包括IP地址、安装用户、登陆类型(Telnet或ssh)、root用户登陆密码等,MySQL配置信息的格式和MySQL的实际配置文件相同,可以根据实际情况自由填写。配置结束后每个安装节点生成供安装脚本读取的安装参数文件和MySQL配置文件。
其中,安装参数文件,由安装节点集中配置模块根据界面配置内容生成,包含两部分信息,一是安装节点信息,例如:IP地址、安装用户、登陆类型(Telnet或ssh)、root用户登陆密码等,二是MySQL的配置信息,例如:bind-address、basedir、datadir等。
2.工具设置模块,设置FTP服务器信息,安装超时信息等。安装时传输安装包过程中需要用到一台FTP服务器。
3.批量安装模块:把MySQL安装包、安装shell脚本、安装参数文件和生成的MySQL配置文件上传到FTP服务器,根据安装节点集中配置模块设置的所有安装节点信息,通过Telnet或ssh协议登陆各个安装节点,从FTP服务器下载MySQL安装包、安装shell脚本、安装参数文件和生成的MySQL配置文件,然后执行安装shell脚本。登陆各安装节点是同时进行的并发过程。
4.安装入口shell脚本:首先读取安装参数文件,创建安装用户和设置环境变量,切换到安装用户调用MySQL安装脚本执行数据库的安装,然后把安装节点集中配置模块生成的MySQL配置文件拷贝到MySQL安装目录,初始化授权表,设置root账户密码,最后启动MySQL数据库。
下面结合上述实施例介绍的MySQL数据库的批量安装系统,介绍批量安装MySQL数据库的流程,图6是根据本发明实施例的批量安装MySQL数据库的流程示意图,如图6所示,该流程包括以下步骤:
步骤1:启动批量安装工具,打开安装节点集中配置界面,添加要安装MySQL的多个服务器节点,配置每个节点的安装信息(如IP地址、安装用户、登陆类型(Telnet或ssh)、root用户登陆密码)和MySQL配置信息。
步骤2:配置结束后点击保存按钮,工具会生成供安装脚本读取的安装配置文件和MySQL配置文件。
步骤3:设置FTP服务器连接地址,具体为IP、端口、用户和密码。
步骤4:放置MySQL安装包到工具的安装目录下。
步骤5:根据实际需要编写MySQL安装shell脚本放到工具的安装目录下。
步骤6:点击安装按钮启动批量安装。
步骤7:上传安装内容到FTP服务器,包括MySQL安装包、安装入口shell脚本、MySQL安装shell脚本、生成的安装配置文件和MySQL配置文件。
步骤8:通过ssh或Telnet登陆各安装服务器。
步骤9:从FTP服务器取得安装内容,包括MySQL安装包、安装入口shell脚本、MySQL安装shell脚本、生成的安装配置文件和MySQL配置文件。
步骤10:调用安装入口脚本,脚本读取并根据安装配置文件创建安装用户,然后调用用户编写的MySQL安装脚本。
步骤11:调用MySQL安装脚本安装数据库。
步骤12:拷贝MySQL配置文件到MySQL安装目录。
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的MySQL数据库的安装方法。
一种载有所述计算机程序的载体。
本发明实施例涉及批量安装MySQL数据库。更具体的说,是一种本地集中配置所有安装节点、自动化远程批量安装MySQL的工具及其实现方法。解决了相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,减少了大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间,大大降低了误操作的可能性,确保安装的成功率和正确性。
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。
工业实用性
通过本发明实施例,集中设置安装节点的安装信息和MySQL配置信息,生成配置文件,由工具自动把MySQL安装包、MySQL安装脚本和配置文件下发到目标节点上,实现了批量快速安装,解决了相关技术中MySQL数据库的安装方法耗费过多精力和时间的问题,减少了大规模安装MySQL的繁琐程度和复杂度,极大的缩短了安装时间,大大降低了误操作的可能性,确保安装的成功率和正确性。因此本发明具有很强的工业实用性。

Claims (12)

  1. 一种MySQL数据库的安装方法,包括:
    配置多个安装节点;
    各个安装节点的服务器从预订服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件;
    各个安装节点的服务器根据所述MySQL安装包和所述MySQL安装脚本,批量安装MySQL数据库;根据所述配置文件运行所述MySQL数据库。
  2. 如权利要求1所述的MySQL数据库的安装方法,其中,配置多个安装节点的步骤之后,所述方法包括:
    配置各个安装节点对应的安装信息和MySQL配置信息;
    根据所述安装信息和所述MySQL配置信息,生成各个安装节点的配置文件。
  3. 如权利要求1所述的MySQL数据库的安装方法,其中,所述各个安装节点的服务器从预订服务器获取MySQL安装包和MySQL安装脚本的步骤之前,所述方法还包括:
    设置所述预订服务器的连接地址;其中,所述连接地址用于连接到所述预订服务器;
    将所述MySQL安装包放置到安装目录;
    编写所述MySQL安装脚本放置到安装目录;
    将所述MySQL安装包、所述MySQL安装脚本和所述配置文件上传至所述预订服务器。
  4. 如权利要求1所述的MySQL数据库的安装方法,其中,所述各个安装节点的服务器根据所述MySQL安装包和所述MySQL安装脚本,批量安装MySQL数据库的步骤包括:
    各个安装节点的服务器调用安装入口脚本;根据所述安装入口脚本调用 所述MySQL安装脚本;
    各个安装节点的服务器根据所述MySQL安装脚本和所述MySQL安装包,批量安装MySQL数据库。
  5. 如权利要求2所述的MySQL数据库的安装方法,其中,所述安装信息包括以下至少之一:
    网络互联协议IP地址、安装用户、登陆类型、root用户登陆密码。
  6. 一种MySQL数据库的安装装置,包括节点配置模块及各个安装节点的服务器,其中:
    所述节点配置模块设置成:配置多个安装节点;
    各个安装节点的服务器设置成:从预订服务器获取MySQL安装包、MySQL安装脚本以及各个安装节点对应的配置文件;根据所述MySQL安装包和所述MySQL安装脚本,批量安装MySQL数据库;根据所述配置文件运行所述MySQL数据库。
  7. 如权利要求6所述的MySQL数据库的安装装置,所述装置还包括信息配置模块和文件生成模块,其中:
    所述信息配置模块设置成:配置各个安装节点对应的安装信息和MySQL配置信息;
    所述文件生成模块设置成:根据所述安装信息和所述MySQL配置信息,生成各个安装节点的配置文件。
  8. 如权利要求6所述的MySQL数据库的安装装置,所述装置还包括地址设置模块、目录生成模块和上传模块,其中:
    所述地址设置模块设置成:设置所述预订服务器的连接地址;其中,所述连接地址用于连接到所述预订服务器;
    所述目录生成模块设置成:将所述MySQL安装包放置到安装目录;编写所述MySQL安装脚本放置到安装目录;
    所述上传模块设置成:将所述MySQL安装包、所述MySQL安装脚本和所述配置文件上传至所述预订服务器。
  9. 如权利要求6所述的MySQL数据库的安装装置,其中,所述各个安装节点的服务器,还设置成:
    调用安装入口脚本;根据所述安装入口脚本调用所述MySQL安装脚本;根据所述MySQL安装脚本和所述MySQL安装包,批量安装MySQL数据库。
  10. 如权利要求7所述的MySQL数据库的安装装置,其中,所述安装信息包括以下至少之一:
    网络互联协议IP地址、安装用户、登陆类型、root用户登陆密码。
  11. 一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行权利要求1-5中任一项所述的MySQL数据库的安装方法。
  12. 一种载有权利要求11所述计算机程序的载体。
PCT/CN2015/070215 2014-06-11 2015-01-06 一种MySQL数据库的安装方法及装置 WO2015188617A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410256630.5A CN105224348A (zh) 2014-06-11 2014-06-11 一种MySQL数据库的安装方法及装置
CN201410256630.5 2014-06-11

Publications (1)

Publication Number Publication Date
WO2015188617A1 true WO2015188617A1 (zh) 2015-12-17

Family

ID=54832854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/070215 WO2015188617A1 (zh) 2014-06-11 2015-01-06 一种MySQL数据库的安装方法及装置

Country Status (2)

Country Link
CN (1) CN105224348A (zh)
WO (1) WO2015188617A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020857A (zh) * 2016-04-06 2016-10-12 杭州沃趣科技股份有限公司 一种用于Oracle Real Application Cluster数据库集群的自动部署方法
CN112035435A (zh) * 2020-08-26 2020-12-04 浪潮云信息技术股份公司 MySQL主从集群安装部署方法及集群系统

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325954A (zh) * 2016-08-30 2017-01-11 广西电网有限责任公司 一种Oracle和Weblogic组合一键自动部署方法
CN106325951B (zh) * 2016-08-30 2018-03-06 广西电网有限责任公司 一种支持多数据库、多中间件类型的应用系统自动化部署方法
CN106406856A (zh) * 2016-08-30 2017-02-15 广西电网有限责任公司 一种Oracle单机一键自动部署方法
CN106383724A (zh) * 2016-08-30 2017-02-08 广西电网有限责任公司 一种Tomcat和Sql Server组合一键自动部署方法
CN106775810A (zh) * 2016-11-16 2017-05-31 深圳市中博睿存科技有限公司 分布式文件系统中配置文件的写入方法及装置
CN108228197B (zh) * 2016-12-20 2021-07-16 阿里巴巴集团控股有限公司 一种在集群中安装软件的方法和装置
CN108280023B (zh) * 2017-01-04 2022-11-01 深圳市中兴通讯技术服务有限责任公司 任务执行方法、装置和服务器
CN109408068A (zh) * 2017-08-30 2019-03-01 深圳互联先锋科技有限公司 一种软件安装方法及系统
CN110007934B (zh) * 2019-03-27 2022-09-13 北京东方国信科技股份有限公司 分布式数据库部署方法及装置
CN111782231B (zh) * 2020-07-14 2022-10-11 厦门市美亚柏科信息股份有限公司 服务部署方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110036A (zh) * 2007-08-22 2008-01-23 中兴通讯股份有限公司 一种批量安装操作系统的方法和装置
CN101251802A (zh) * 2008-03-11 2008-08-27 浪潮电子信息产业股份有限公司 Oracle RAC的无人值守自动安装的方法
WO2010148812A1 (zh) * 2009-11-20 2010-12-29 中兴通讯股份有限公司 一种软件集成方法、安装方法及软件集成装置、安装装置
CN103744695A (zh) * 2013-12-25 2014-04-23 新浪网技术(中国)有限公司 基于pxe的操作系统远程安装方法和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102455915A (zh) * 2010-10-18 2012-05-16 卓望数码技术(深圳)有限公司 一种分布式系统的自动化配置方法及服务器
CN103019791B (zh) * 2012-12-19 2016-08-10 中国电子科技集团公司第十五研究所 软件部署方法及软件部署系统
CN103475690B (zh) * 2013-06-17 2016-06-08 上海携程商务有限公司 Memcached节点配置方法及装置
CN103399800B (zh) * 2013-08-07 2016-04-13 山东大学 基于Linux并行计算平台的动态负载均衡方法
CN103607462B (zh) * 2013-11-22 2018-05-01 曙光信息产业股份有限公司 一种集群nas部署系统及其部署方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110036A (zh) * 2007-08-22 2008-01-23 中兴通讯股份有限公司 一种批量安装操作系统的方法和装置
CN101251802A (zh) * 2008-03-11 2008-08-27 浪潮电子信息产业股份有限公司 Oracle RAC的无人值守自动安装的方法
WO2010148812A1 (zh) * 2009-11-20 2010-12-29 中兴通讯股份有限公司 一种软件集成方法、安装方法及软件集成装置、安装装置
CN103744695A (zh) * 2013-12-25 2014-04-23 新浪网技术(中国)有限公司 基于pxe的操作系统远程安装方法和系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020857A (zh) * 2016-04-06 2016-10-12 杭州沃趣科技股份有限公司 一种用于Oracle Real Application Cluster数据库集群的自动部署方法
CN112035435A (zh) * 2020-08-26 2020-12-04 浪潮云信息技术股份公司 MySQL主从集群安装部署方法及集群系统
CN112035435B (zh) * 2020-08-26 2024-04-30 浪潮云信息技术股份公司 MySQL主从集群安装部署方法及集群系统

Also Published As

Publication number Publication date
CN105224348A (zh) 2016-01-06

Similar Documents

Publication Publication Date Title
WO2015188617A1 (zh) 一种MySQL数据库的安装方法及装置
US10860339B2 (en) Autonomous creation of new microservices and modification of existing microservices
US10873510B2 (en) Packaging tool for first and third party component deployment
US9563544B2 (en) Framework for automated testing of mobile apps
WO2018006789A1 (zh) 一种参数校验方法和装置、以及网管服务器和计算机存储介质
CN105487892B (zh) 一种Linux环境下的云中GIS服务部署系统
US9672140B1 (en) Processing special requests at dedicated application containers
US9602599B2 (en) Coordinating application migration processes
WO2021203979A1 (zh) 运维处理方法、装置及计算机设备
US20170171034A1 (en) Dynamic/on-demand packaging as part of deployment
WO2018036342A1 (zh) 基于csar的模型文件的可视化设计方法及装置
US20190327236A1 (en) System and method to securely execute datacenter management operations remotely
US20160149987A1 (en) Methods, systems, and computer readable media for automatic generation of programming-language-neutral representation of web application protocol interactions that implement network test
CN113127009A (zh) 大数据管理平台的自动化部署方法和装置
Sandobalin et al. End-to-end automation in cloud infrastructure provisioning
CN106445611B (zh) 大数据节点系统及自动部署方法
US20170364381A1 (en) Data center configuration
WO2015184878A1 (zh) 移动应用统一登录处理方法及装置
CN106878333B (zh) 一种第三方认证方法、装置和应用系统服务器
US11113357B2 (en) Method and system for onboarding a virtual network function package utilized by one or more network services
CN112217693B (zh) 一种控制器测试方法、装置、电子设备及存储介质
CN115185599A (zh) 基于Golang的项目部署方法、系统及存储介质
CN106033211B (zh) 一种控制涂胶机台胶头清洗的方法及装置
CN113014416A (zh) 自动配置管理网络设备的方法、系统、设备和存储介质
CN112685051A (zh) 自动执行shell脚本的方法、装置、平台及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15805908

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15805908

Country of ref document: EP

Kind code of ref document: A1