translated

This commit is contained in:
Flynn 2017-03-04 16:30:28 +08:00
parent bb04238321
commit 27de7694a4

View File

@ -1,18 +1,24 @@
ucasFL translating
How to Install MariaDB 10 on Debian and Ubuntu
如何在 Debian 和 Ubuntu 上安装 MariaDB 10
============================================================
MariaDB is a free and open source fork of the popular MySQL database management server software. It is developed under the GPLv2 (General Public License version 2) by the original developers of MySQL and is intended to remain open source.
MariaDB 是深受欢迎的数据库管理服务器软件 MySQL 的一个免费并且开源的分支。它由 MySQL 的原开发者在 GPLv2通用公共许可证 2 版)下开发,并保持开源。
It is designed to achieve high compatibility with MySQL. For starters, you can read [MariaDB vs MySQL][5] features for more information and importantly, it is used by big companies/organizations such as Wikipedia, WordPress.com, Google plus and many more.
它被设计来实现 MySQL 的高兼容性。对于初学者,可以阅读 [MariaDB vs MySQL][5] 来了解关于它们的特性的更多信息。更重要的是,它被一些大公司/组织使用,比如 Wikipedia、WordPress.com 和 Google plus ,除此之外还有更多的。
In this article, we will show you how to install MariaDB 10.1 stable version in various Debian and Ubuntu distribution releases.
在这篇文章中,我将向你们展示如何在 Debian 和 Ubuntu 发行版中安装 MariaDB 10.1 稳定版。
### Install MariaDB in Debian and Ubuntu
### 在 Debian 和 Ubuntu 上安装 MariaDB
1. Before installing MariaDB, youll have to import the repository key and add the MariaDB repository with the following commands:
1. 在安装之前 MariaDB 之前,你需要通过下面的命令导入仓库密匙并获取 MariaDB 仓库
#### On Debian 10(Sid)
#### 在 Debian 10(Sid) 上
```
$ sudo apt-get install software-properties-common
@ -21,6 +27,7 @@ $ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mari
```
#### On Debian 9 (Stretch)
#### 在 Debian 9(Stretch) 上
```
$ sudo apt-get install software-properties-common
@ -29,6 +36,7 @@ $ sudo add-apt-repository 'deb [arch=amd64] http://www.ftp.saix.net/DB/mariadb/r
```
#### On Debian 8 (Jessie)
#### 在 Debian 8(Jessie) 上
```
$ sudo apt-get install software-properties-common
@ -37,6 +45,7 @@ $ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net
```
#### On Debian 7 (Wheezy)
#### 在 Debian 7(Wheezy) 上
```
$ sudo apt-get install python-software-properties
@ -45,6 +54,7 @@ $ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mari
```
#### On Ubuntu 16.10 (Yakkety Yak)
#### 在 Ubuntu 16.10(Yakkety Yak) 上
```
$ sudo apt-get install software-properties-common
@ -53,6 +63,7 @@ $ sudo add-apt-repository 'deb [arch=amd64,i386] http://www.ftp.saix.net/DB/mari
```
#### On Ubuntu 16.04 (Xenial Xerus)
#### 在 Ubuntu 16.04 (Xenial Xerus) 上
```
$ sudo apt-get install software-properties-common
@ -61,6 +72,7 @@ $ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net
```
#### On Ubuntu 14.04 (Trusty)
#### 在 Ubuntu 14.04 (Trusty) 上
```
$ sudo apt-get install software-properties-common
@ -69,6 +81,7 @@ $ sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://www.ftp.saix.net
```
2. Then update the system packages sources list, and install MariaDB server like so:
2. 然后,更新系统安装包列表,并像下面这样安装 MariaDB 服务器:
```
$ sudo apt-get update
@ -76,22 +89,28 @@ $ sudo apt-get install mariadb-server
```
During the course of installation, youll be asked to configure the MariaDB server; set a secure root user password in the interface below.
安装过程中,将会请求你配置 MariaDB 服务器;在下面的页面中设置一个安全的 root 用户密码:
[
![Set New Root Password for MariaDB](http://www.tecmint.com/wp-content/uploads/2017/02/Set-New-Root-Password-for-MariaDB.png)
][6]
Set New Root Password for MariaDB
为 MariaDB 设置新的 Root 密码
Re-enter the password and press [Enter] to continue with the installation process.
重新输入密码并按下 [ENTER] 键来继续安装。
[
![Repeat MariaDB Password](http://www.tecmint.com/wp-content/uploads/2017/02/Repeat-MariaDB-Password.png)
][7]
Repeat MariaDB Password
重复输入 MariaDB 密码
3. When the installation of MariaDB packages completes, start the database server daemon for the mean time and enable it to start automatically at the next boot as follows:
当 MariaDB 安装包安装完成以后,启动数据库服务器 daemon同时启用它使得在下次开机时它能够像下面这样自动启动
```
------------- On SystemD Systems -------------
@ -110,14 +129,21 @@ $ sudo service mysql status
][8]
Start MariaDB Service
开启 MariaDB 服务
4. Then run the `mysql_secure_installation` script to secure the database where you can:
4. 然后,运行 `mysql_secure_installation` 脚本来保护数据库,在这儿你可以:
1. set root password (if not set in the configuration step above).
2. disable remote root login
3. remove test database
4. remove anonymous users and
5. reload privileges
1. 设置 root 密码(如果在上面的配置环节你没有进行设置的话)。
2. 禁止远程 root 登录
3. 移除测试数据库
4. 移除匿名用户
5. 重装特权
```
$ sudo mysql_secure_installation
@ -127,8 +153,10 @@ $ sudo mysql_secure_installation
][9]
Secure MariaDB Installation
保护 MariaDB 安装
5. Once the database server is secured, check its installed version and login to the MariaDB command shell as follows:
5. 一旦数据库服务器受保护以后,可以使用下面的 shell 命令查看已安装版本和登录 MariaDB
```
$ mysql -V
@ -139,17 +167,25 @@ $ mysql -u root -p
][10]
Check MariaDB Version
查看 MariaDB 版本
To start learning MySQL/MariaDB, read through:
开始学习 MySQL/MariaDB 请阅读:
1. [Learn MySQL / MariaDB for Beginners Part 1][1]
2. [Learn MySQL / MariaDB for Beginners Part 2][2]
3. [MySQL Basic Database Administration Commands Part III][3]
4. [20 MySQL (Mysqladmin) Commands for Database Administration Part IV][4]
1. [MySQL / MariaDB 初学者学习指南 — Part 1][1]
2. [MySQL / MariaDB 初学者学习指南 — Part 2][2]
3. [MySQL 基本数据库管理命令 — Part III][3]
4. [针对数据库管理员的 20 个 MySQL (Mysqladmin) 命令][4]
And check out these 4 useful commandline tools to [monitor MySQL/MariaDB performance][11] in Linux and also go through these [15 useful MySQL/MariaDB performance tuning and optimization tips][12].
查看在 Linux 中[监控 MySQL/MariaDB 性能][11]的四个有用的命令行工具,同时浏览 [15 个有用的 MySQL/MariaDB 性能调整和优化技巧][12]。
Thats all. In this article, we showed you how to install MariaDB 10.1 stable version in various Debian and Ubuntu releases. You can send us any questions/thoughts via the comment form below.
这就是本文的全部内容了。在这篇文章中,我们向你展示了如何在 Debian 和 Ubuntu 的不同发行版中安装 MariaDB 10.1 稳定版。你可以通过下面的评论框给我们提任何问题或者想法。
--------------------------------------------------------------------------------
@ -157,6 +193,9 @@ Thats all. In this article, we showed you how to install MariaDB 10.1 stabl
作者简介:
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.
Aaron Kili 是 Linux 和 F.O.S.S 爱好者,将来的 Linux 系统管理员和网络开发人员,目前是 TecMint 的内容创作者,他喜欢用电脑工作,并坚信分享知识。
--------------------------------------------------------------------------------