- 2.5.1 使用 MySQL Yum 存储库在 Linux 上安装 MySQL2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository
- 2.5.2 使用 MySQL APT 存储库在 Linux 上安装 MySQL2.5.2 Installing MySQL on Linux Using the MySQL APT Repository
- 2.5.3 使用 MySQL SLES 存储库2.5.3 Using the MySQL SLES Repository
- 2.5.4 使用 Oracle 提供的 RPM 软件包在 Linux 上安装 MySQL2.5.4 Installing MySQL on Linux Using RPM Packages from Oracle
- 2.5.5 使用 Oracle 提供的 Debian 软件包在 Linux 上安装 MySQL2.5.5 Installing MySQL on Linux Using Debian Packages from Oracle
- 2.5.6 使用 Docker 容器在 Linux 上部署 MySQL2.5.6 Deploying MySQL on Linux with Docker Containers
- 2.5.7 从本机软件存储库在 Linux 上安装 MySQL2.5.7 Installing MySQL on Linux from the Native Software Repositories
- 2.5.8 在 Linux 上安装 MySQL Juju2.5.8 Installing MySQL on Linux with Juju
- 2.5.9 使用 systemd 管理 MySQL 服务器2.5.9 Managing MySQL Server with systemd
Linux 支持多种不同的 MySQL 安装解决方案。我们建议您使用 Oracle 的其中一种发行版,该发行版有多种安装方法:Linux supports a number of different solutions for installing MySQL. We recommend that you use one of the distributions from Oracle, for which several methods for installation are available:
表 2.9 Linux 安装方法和信息Table 2.9 Linux Installation Methods and Information
| 类型Type | 安装方法Setup Method | 其他信息Additional Information |
|---|---|---|
| AptApt | 启用MySQL Apt 存储库Enable the MySQL Apt repository | 文档Documentation |
| YumYum | 启用 MySQL Yum 存储库Enable the MySQL Yum repository | 文档Documentation |
| ZypperZypper | 启用MySQL SLES 存储库Enable the MySQL SLES repository | 文档Documentation |
| RPMRPM | 下载特定包Download a specific package | 文档Documentation |
| DEBDEB | 下载特定包Download a specific package | 文档Documentation |
| 通用Generic | 下载通用包Download a generic package | 文档Documentation |
| 源代码Source | 从 源Compile from source | 文档Documentation |
| DockerDocker | 使用Oracle 容器注册表。您还可以使用 My Oracle Support 获取 MySQL 企业版。Use the Oracle Container Registry. You can also use My Oracle Support for the MySQL Enterprise Edition. | 文档Documentation |
| Oracle Unbreakable Linux NetworkOracle Unbreakable Linux Network | 使用 ULN 频道Use ULN channels | 文档Documentation |
作为替代方案,您可以使用系统上的包管理器从 Linux 发行版的本机软件存储库中自动下载并安装 MySQL 以及包。这些本机包通常比当前可用版本落后几个版本。您通常也无法安装创新版本,因为这些版本通常在本机存储库中不可用。有关使用本机软件包安装程序的详细信息,请参阅第 2.5.7 节 “从本机软件存储库在 Linux 上安装 MySQL”。As an alternative, you can use the package manager on your system to automatically download and install MySQL with packages from the native software repositories of your Linux distribution. These native packages are often several versions behind the currently available release. You are also normally unable to install innovation releases, since these are not usually made available in the native repositories. For more information on using the native package installers, see Section 2.5.7, “Installing MySQL on Linux from the Native Software Repositories”.
对于许多 Linux 安装,您希望将 MySQL 设置为在计算机启动时自动启动。许多本机软件包安装都会为您执行此操作,但对于源代码、二进制和 RPM 解决方案,您可能需要单独进行设置。所需的脚本 mysql.server 可以在 MySQL 安装目录下的 support-files 目录或 MySQL 源代码树中找到。您可以将其安装为 /etc/init.d/mysql 以自动启动和关闭 MySQL。请参阅第 6.3.3 节“mysql.server — MySQL 服务器启动脚本”。For many Linux installations, you want to set up MySQL to be
started automatically when your machine starts. Many of the native
package installations perform this operation for you, but for
source, binary and RPM solutions you may need to set this up
separately. The required script, mysql.server,
can be found in the support-files directory
under the MySQL installation directory or in a MySQL source tree.
You can install it as /etc/init.d/mysql for
automatic MySQL startup and shutdown. See
Section 6.3.3, “mysql.server — MySQL Server Startup Script”.