当前位置: 首页 > 编程文章 >

CentOS 7环境下正确安装配置MySQL 5.6的方法

CentOS 7环境下正确安装配置MySQL 5.6的方法

作者:江安时间:2026-01-29 11:19:49浏览:520

在CentOS 7系统中,默认使用MariaDB替代MySQL,导致直接通过yum安装mysql-server会失败或安装错误组件。本文介绍如何通过添加MySQL官方社区源rpm包,正确安装MySQL 5.6版本,并包含基础配置及性能优化建议。

本文目录收起

常规Yum安装的误区与MariaDB说明

一、常规Yum安装的误区

此前曾记录过在CentOS 6.5中利用yum快速搭建LNMP环境的过程,但在CentOS 7或7.1系统中能否照此方法安装MySQL 5.6.24?答案是否定的。


[root@typecodes ~]# yum -y install mysql mysql-server mysql-devel
.....................。
....省略部分安装过程....
.....................。

Installed:
 mariadb.x86_64 1:5.5.41-2.el7_0             mariadb-devel.x86_64 1:5.5.41-2.el7_0            

Dependency Installed:
 keyutils-libs-devel.x86_64 0:1.5.8-3.el7 krb5-devel.x86_64 0:1.12.2-14.el7  libcom_err-devel.x86_64 0:1.42.9-7.el7 libselinux-devel.x86_64 0:2.2.2-6.el7 
 libsepol-devel.x86_64 0:2.1.9-3.el7   libverto-devel.x86_64 0:0.2.5-4.el7 openssl-devel.x86_64 1:1.0.1e-42.el7.4 pcre-devel.x86_64 0:8.32-14.el7   
 zlib-devel.x86_64 0:1.2.7-13.el7   

Complete!

从上面的安装结果可以看出,没有安装mysql数据库,而是安装了mariadb数据!因为在CentOS 7和CentOS 7.1系统中,默认安装的mysql是它的分支mariadb。这里引用下百度百科关于mariadb的描述:

MariaDB作为MySQL的一个分支,主要由开源社区维护,采用GPL授权许可。其设计目标是完全兼容MySQL,包括API接口和命令行操作,旨在成为MySQL的无缝替代品。 因此,以下常规的MySQL操作在此环境中均无效:


#######无法把mysql服务加入系统启动
[root@typecodes ~]# chkconfig mysqld on
error reading information on service mysqld: No such file or directory
#######启动不了mysql
[root@typecodes ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.
#######没有安装mysql相关包
[root@typecodes ~]# rpm -qa |grep mysql
php-mysql-5.4.16-23.el7_0.3.x86_64
[root@typecodes ~]#

通过官方源正确安装MySQL 5.6

二、正确的安装步骤

Linux系统自带的仓库通常只保留较旧但稳定的软件版本,无法通过yum直接获取MySQL的高级版本。因此,首先需要安装包含最新MySQL 5系列社区版资源的RPM包。


#######安装rpm包
[root@typecodes ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Retrieving http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Preparing...       ################################# [100%]
Updating / installing...
 1:mysql-community-release-el7-5 ################################# [100%]

此时,检查当前可用的MySQL安装资源:


[root@typecodes ~]# yum repolist enabled | grep "mysql.*-community.*"

mysql-connectors-community/x86_64 MySQL Connectors Community     14
mysql-tools-community/x86_64  MySQL Tools Community      17
mysql56-community/x86_64   MySQL 5.6 Community Server    139

从列出的信息中可以确认,mysql56-community/x86_64 以及 MySQL 5.6 Community Server 是可用的安装源。

基于上述资源,即可直接使用yum命令安装MySQL 5.6版本。


[root@typecodes ~]# yum -y install mysql-community-server

Loaded plugins: axelget, langpacks
No metadata available for base
No metadata available for epel
No metadata available for extras
(Failed to load module fastestmirror: No module named fastestmirror)
repomd.xml                                  | 2.5 kB 00:00:00  
update mysql-connectors-community metadata successfully
(Failed to load module fastestmirror: No module named fastestmirror)
repomd.xml                                  | 2.5 kB 00:00:00  
update mysql-tools-community metadata successfully
(Failed to load module fastestmirror: No module named fastestmirror)
repomd.xml                                  | 2.5 kB 00:00:00  
update mysql56-community metadata successfully
No metadata available for updates
mysql-connectors-community                              | 2.5 kB 00:00:00  
mysql-tools-community                               | 2.5 kB 00:00:00  
mysql56-community                                | 2.5 kB 00:00:00  
(1/3): mysql-connectors-community/x86_64/primary_db                        | 7.3 kB 00:00:00  
(2/3): mysql56-community/x86_64/primary_db                          | 83 kB 00:00:01  
mysql-tools-community/x86_64/p FAILED           ==============================================  ] 19 kB/s | 92 kB 00:00:00 ETA 
http://repo.mysql.com/yum/mysql-tools-community/el/7/x86_64/repodata/3301d2eb425f300dec5a46c4201d08f2cf9232a6-primary.sqlite.bz2: [Errno 12] Timeout on http://repo.mysql.com/yum/mysql-tools-community/el/7/x86_64/repodata/3301d2eb425f300dec5a46c4201d08f2cf9232a6-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 3 seconds')
Trying other mirror.
(3/3): mysql-tools-community/x86_64/primary_db                         | 15 kB 00:00:00  
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.6.24-3.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.24-3.el7 for package: mysql-community-server-5.6.24-3.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) = 5.6.24-3.el7 for package: mysql-community-server-5.6.24-3.el7.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.24-3.el7.x86_64
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.41-2.el7_0 will be obsoleted
---> Package mysql-community-client.x86_64 0:5.6.24-3.el7 will be obsoleting
--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.24-3.el7 for package: mysql-community-client-5.6.24-3.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.6.24-3.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.41-2.el7_0 will be obsoleted
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.41-2.el7_0 for package: 1:mariadb-devel-5.5.41-2.el7_0.x86_64
---> Package mysql-community-libs.x86_64 0:5.6.24-3.el7 will be obsoleting
---> Package perl-PlRPC.noarch 0:0.2026-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2026-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2026-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2026-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2026-14.el7.noarch
--> Running transaction check
---> Package mariadb-devel.x86_64 1:5.5.41-2.el7_0 will be obsoleted
---> Package mysql-community-devel.x86_64 0:5.6.24-3.el7 will be obsoleting
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package           Arch       Version        Repository         Size
=======================================================================================================================================================================
Installing:
 mysql-community-client       x86_64       5.6.24-3.el7       mysql56-community       19 M
  replacing mariadb.x86_64 1:5.5.41-2.el7_0
 mysql-community-devel       x86_64       5.6.24-3.el7       mysql56-community       3.4 M
  replacing mariadb-devel.x86_64 1:5.5.41-2.el7_0
 mysql-community-libs       x86_64       5.6.24-3.el7       mysql56-community       2.0 M
  replacing mariadb-libs.x86_64 1:5.5.41-2.el7_0
 mysql-community-server       x86_64       5.6.24-3.el7       mysql56-community       58 M
Installing for dependencies:
 mysql-community-common       x86_64       5.6.24-3.el7       mysql56-community       256 k
 perl-Compress-Raw-Bzip2       x86_64       2.061-3.el7       base          32 k
 perl-Compress-Raw-Zlib       x86_64       1:2.061-4.el7       base          57 k
 perl-DBI          x86_64       1.627-4.el7       base          802 k
 perl-IO-Compress        noarch       2.061-2.el7       base          260 k
 perl-Net-Daemon         noarch       0.48-5.el7        base          51 k
 perl-PlRPC          noarch       0.2026-14.el7       base          36 k

Transaction Summary
=======================================================================================================================================================================
Install 4 Packages (+7 Dependent packages)

Total download size: 83 M
Downloading packages:
mysql-community-devel-5.6.24-3.el7.x86_64.rpm                         | 3.4 MB 00:00:03  
mysql-community-client-5.6.24-3.el7.x86_64.rpm                         | 19 MB 00:00:05  
mysql-community-server-5.6.24-3.el7.x86_64.rpm                         | 58 MB 00:00:11  
mysql-community-libs-5.6.24-3.el7.x86_64.rpm                         | 2.0 MB 00:00:02  
perl-DBI-1.627-4.el7.x86_64.rpm                             | 0 B 00:00:01 ... 
perl-DBI-1.627-4.el7.x86_64.rpm                             | 802 kB 00:00:00  
(1/6): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm                       | 57 kB 00:00:00  
(2/6): perl-Net-Daemon-0.48-5.el7.noarch.rpm                         | 51 kB 00:00:00  
(3/6): perl-PlRPC-0.2026-14.el7.noarch.rpm                          | 36 kB 00:00:00  
(4/6): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm                       | 32 kB 00:00:00  
(5/6): perl-IO-Compress-2.061-2.el7.noarch.rpm                         | 260 kB 00:00:00  
warning: /var/cache/yum/x86_64/7/mysql56-community/packages/mysql-community-common-5.6.24-3.el7.x86_64.rpm: V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY 00:00:01 ETA 
Public key for mysql-community-common-5.6.24-3.el7.x86_64.rpm is not installed
(6/6): mysql-community-common-5.6.24-3.el7.x86_64.rpm                       | 256 kB 00:00:01  
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                 388 kB/s | 692 kB 00:00:01  
Retrieving key from file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
 Userid  : "MySQL Release Engineering "
 Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
 Package : mysql-community-release-el7-5.noarch (installed)
 From  : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
 Installing : mysql-community-common-5.6.24-3.el7.x86_64                           1/14 
 Installing : mysql-community-libs-5.6.24-3.el7.x86_64                           2/14 
 Installing : mysql-community-client-5.6.24-3.el7.x86_64                           3/14 
 Installing : perl-Net-Daemon-0.48-5.el7.noarch                             4/14 
 Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                          5/14 
 Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                           6/14 
 Installing : perl-IO-Compress-2.061-2.el7.noarch                            7/14 
 Installing : perl-PlRPC-0.2026-14.el7.noarch                             8/14 
 Installing : perl-DBI-1.627-4.el7.x86_64                              9/14 
 Installing : mysql-community-server-5.6.24-3.el7.x86_64                          10/14 
 Installing : mysql-community-devel-5.6.24-3.el7.x86_64                           11/14 
 Erasing : 1:mariadb-devel-5.5.41-2.el7_0.x86_64                            12/14 
 Erasing : 1:mariadb-5.5.41-2.el7_0.x86_64                             13/14 
 Erasing : 1:mariadb-libs-5.5.41-2.el7_0.x86_64                            14/14 
 Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                           1/14 
 Verifying : mysql-community-common-5.6.24-3.el7.x86_64                           2/14 
 Verifying : mysql-community-devel-5.6.24-3.el7.x86_64                           3/14 
 Verifying : mysql-community-client-5.6.24-3.el7.x86_64                           4/14 
 Verifying : perl-PlRPC-0.2026-14.el7.noarch                             5/14 
 Verifying : mysql-community-server-5.6.24-3.el7.x86_64                           6/14 
 Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                          7/14 
 Verifying : mysql-community-libs-5.6.24-3.el7.x86_64                           8/14 
 Verifying : perl-Net-Daemon-0.48-5.el7.noarch                             9/14 
 Verifying : perl-DBI-1.627-4.el7.x86_64                              10/14 
 Verifying : perl-IO-Compress-2.061-2.el7.noarch                            11/14 
 Verifying : 1:mariadb-5.5.41-2.el7_0.x86_64                             12/14 
 Verifying : 1:mariadb-devel-5.5.41-2.el7_0.x86_64                            13/14 
 Verifying : 1:mariadb-libs-5.5.41-2.el7_0.x86_64                            14/14 

Installed:
 mysql-community-client.x86_64 0:5.6.24-3.el7   mysql-community-devel.x86_64 0:5.6.24-3.el7   mysql-community-libs.x86_64 0:5.6.24-3.el7   
 mysql-community-server.x86_64 0:5.6.24-3.el7   

Dependency Installed:
 mysql-community-common.x86_64 0:5.6.24-3.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBI.x86_64 0:1.627-4.el7
 perl-IO-Compress.noarch 0:2.061-2.el7  perl-Net-Daemon.noarch 0:0.48-5.el7   perl-PlRPC.noarch 0:0.2026-14.el7   

Replaced:
 mariadb.x86_64 1:5.5.41-2.el7_0     mariadb-devel.x86_64 1:5.5.41-2.el7_0     mariadb-libs.x86_64 1:5.5.41-2.el7_0     

Complete!

安装后的基础配置与性能优化

三、MySQL安装后的基础配置

完成MySQL安装后,需执行一系列基础配置工作以确保服务正常运行:


#######安装成功后,将其加入开机启动
[root@typecodes ~]# systemctl enable mysqld

#######启动mysql服务进程
[root@typecodes ~]# systemctl start mysqld

#######配置mysql(设置密码等)
[root@typecodes ~]# mysql_secure_installation


NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
  SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.


Set root password? [Y/n] y     [设置root用户密码]
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y     [删除匿名用户]
 ... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y  [禁止root远程登录]
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y   [删除test数据库]
 - Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
 ... Failed! Not critical, keep moving...
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y   [刷新权限]
 ... Success!




All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


Cleaning up...

四、可能的MySQL配置优化 在原始配置文件 /etc/my.cnf 的基础上,可在 [mysqld] 节内增加相应的配置参数。实际应用中,请根据硬件配置及负载情况酌情调整。


#add by feng 120418 --------------------------
#skip-locking
skip-name-resolve
skip-external-locking
key_buffer_size = 256M
#table_cache = 3072
table_open_cache = 3072
read_buffer_size = 2M
read_rnd_buffer_size = 2M
sort_buffer_size = 2M
myisam_sort_buffer_size = 256M
thread_cache_size = 8
query_cache_size= 512M
query_cache_limit= 5M
tmp_table_size=1024M
max_heap_table_size=3000M
max_allowed_packet = 16M
innodb_buffer_pool_size = 512M
innodb_log_file_size = 512M
innodb_additional_mem_pool_size=512M
innodb_log_buffer_size=64M
max_connections=2000
max_user_connections=800
join_buffer_size = 8M
open_files_limit = 65535
#tmpdir=/dev/shm
max_connect_errors=1000
#add by feng 120418 end ---------------------
上一篇
MySQL ALTER命令详解:字段、类型与表名修改

本文汇总了MySQL中ALTER命令的核心用法,涵盖数据表字段的增删改、默认值设置、存储引擎切换及表名重命名。通过DROP、ADD、MODIFY、CHANGE等子句,可灵活调整表结构,例如指定新字段位置或使用FIRST/AFTER关键字,同时需注意单字段无法删除及默认值处理等限制条件。

下一篇
SQL多表联合查询:隐式连接与显式JOIN的区别及优化

本文对比了SQL中通过逗号分隔的多表隐式连接与使用INNER JOIN的显式连接写法。在涉及三个及以上关联表的场景中,显式JOIN语法不仅明确了连接顺序和条件,便于转换为LEFT或RIGHT JOIN处理NULL值情况,还能提升SQL语句的可读性与优化器执行效率,是更推荐的实践方式。

相关文章

更多
CentOS 7配置MySQL源并安装MySQL完整指南

CentOS 7默认使用MariaDB,通过下载mysql57-community-release-el7-9.noarch.rpm包可配置官方YUM源。执行rpm安装后更新缓存,即可使用yum install命令安装mysql-community-server。启动服务后,需从/var/log/mysqld.log获取root临时密码登录,并通过ALTER USER语句设置包含大小写字母、数字和特殊字符的新密码以完成初始化。

2025.06.06 819
CentOS 7.4安装MySQL 5.7.28二进制版完整指南

本文介绍在CentOS 7.4系统中通过二进制包方式安装MySQL 5.7.28的具体步骤。主要涵盖卸载MariaDB依赖、创建mysql用户与数据目录、解压配置二进制文件、执行mysqld初始化生成临时密码、启用SSL连接、编辑my.cnf配置文件以及设置开机自启等关键环节,确保服务稳定运行。

2026.09.19 553
CentOS 6.7下MySQL 5.1与5.7的安装配置指南

本文介绍在CentOS 6.7系统中分别通过yum和二进制包方式安装MySQL 5.1.73及5.7.19的方法。针对5.1版本,主要讲解使用yum命令安装客户端与服务端、修改字符集、设置开机自启及初始密码配置;针对5.7版本,因系统glibc版本限制需下载官方编译好的glibc安装包,详细演示解压、初始化数据库、生成配置文件、调整服务路径并加入开机启动的全过程。

2026.09.19 116
Windows Server 2012 IIS8 PHP环境配置教程

本文介绍在Windows Server 2012数据中心版上搭建IIS8、PHP5.3.20及MySQL5.5.28环境的详细步骤。通过安装服务器角色、配置FastCGI、设置URL Rewrite模块及权限,实现Discuz X2.5论坛的正常运行与伪静态功能。

2025.03.07 985
在UNIX系统下安装与配置MySQL

本文介绍在UNIX环境下安装MySQL 3.22.25版本的完整流程。首先通过解压源码包并执行configure、make及make install命令完成基础安装,随后初始化数据库目录。文章重点强调了默认状态下root用户无密码的安全隐患,演示了如何通过mysqladmin工具为root账号设置强密码,并验证了启用密码认证后的访问控制效果。此外,还介绍了使用mysql.server脚本或修改rc.local文件来实现MySQL服务的自动启停与开机自启动。

2025.07.05 968
CentOS 7 搭建 Java Web 运行环境:JDK、Tomcat 与 MySQL 安装指南

本文介绍在 CentOS 7 系统中手动安装 JDK、Tomcat 和 MySQL 以搭建 Java Web 项目运行环境的完整步骤。内容涵盖旧版本卸载、二进制包解压、环境变量配置、防火墙设置及数据库权限管理,确保服务可正常启动并支持远程连接。

2026.07.12 963

专题推荐

更多
PHP 类与对象定义及继承

先看类声明、对象实例与属性访问。理解对象的创建和销毁后,再读继承、方法重载和关键字对照。已有代码遇到继承行为差异时,可进一步查看 final 方法与反射实例。

PHP 定时任务配置与运行

先确定任务运行间隔以及是否允许重叠。固定时间触发先看 Cron 案例,框架内和常驻服务再读对应示例。

Yii2 队列配置与常驻运行

先用一个最小任务跑通入队和消费,再检查 Web 与 Console 是否加载了相同的队列配置。确认命令能手动运行后再配置 Supervisor,最后验证进程重启时的处理情况。

PHP Session 过期时间设置方法

浏览器关闭、服务端回收和业务规定的闲置超时,可能在不同时间发生。对照配置项与应用层时间戳的做法,检查会话何时仍可读、何时应要求重新登录。

PHP URL 编码和解码方法

URL 路径片段和查询参数对空格的处理方式不同。先比较 urlencode 与 rawurlencode,再沿解码过程核对中文、加号和百分号,检查地址是否被重复编码或提前解码。

在线工具箱

更多
键码查询
键码查询

按下键盘按键时查看浏览器记录的键名和事件信息。

.env 配置检查
.env 配置检查

本地检查 .env 键值语法、引号、重复键及空值,预览解析结果,辅助排查 PHP 和 Laravel 环境配置。

进制转换
进制转换

转换二进制、十进制、十六进制等数值表示,辅助程序调试与进制学习。

HTML 标签安全清理
HTML 标签安全清理

清理 HTML 片段中的标签或危险内容,辅助整理待展示的文本。

文件 Base64 转换
文件 Base64 转换

把文件转为 Base64 文本,也可将编码内容还原为文件,方便接口传输与调试。