国产麒麟系统KylinOS Server V10 SP2安装MySQL 8.0.26—源码编译安装
<h1>一: 操作系统环境检查</h1><h3>1.1 首先确认操作系统版本是KylinOS Server V10 SP2</h3>
<p>麒麟操作系统Kylinos Server V10 SP2使用的安装介质是<br>Kylin-Server-10-SP2-x86-Release-Build09-20210524.iso,执行以下命令查看版本:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">cat</span> /etc/kylin-release</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818103607516-1927362442.png"></p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">cat</span> /proc/version</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818103624135-1949125863.png"></p>
<p> </p>
<h3>1.2 检查系统是否自带MySQL或MariaDB</h3>
<p>通过以下命令检查是否安装:</p>
<div class="cnblogs_code">
<pre>rpm -qa | <span style="color: rgba(0, 0, 255, 1)">grep</span> mariadb</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818103636679-1490900094.png"></p>
<p>如果系统已经安装了其它版本的MySQL或者MariaDB则要将其删除,执行以下命令删除:</p>
<div class="cnblogs_code">
<pre>rpm -e {mariadb-server,mariadb,mariadb-errmessage,mariadb-common}</pre>
</div>
<p> </p>
<h3>1.3 安装编译代码所必须的依赖包</h3>
<p>mysql 8.0源码编译依赖如下包,执行以下命令安装:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y cmake <span style="color: rgba(0, 0, 255, 1)">make</span>
<span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y git <span style="color: rgba(0, 0, 255, 1)">gcc</span> <span style="color: rgba(0, 0, 255, 1)">gcc</span>-c++
<span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y <span style="color: rgba(0, 0, 255, 1)">perl</span>-Data-Dumper <span style="color: rgba(0, 0, 255, 1)">bzip2</span>
<span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y ncurses ncurses-devel ncurses-base ncurses-<span style="color: rgba(0, 0, 0, 1)">libs
</span><span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y openssl openssl-devel openssl-<span style="color: rgba(0, 0, 0, 1)">libs
</span><span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y <span style="color: rgba(0, 0, 255, 1)">bzip2</span> <span style="color: rgba(0, 0, 255, 1)">bzip2</span>-<span style="color: rgba(0, 0, 0, 1)">devel
</span><span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y libtirpc libtirpc-<span style="color: rgba(0, 0, 0, 1)">devel
</span><span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y readline readline-<span style="color: rgba(0, 0, 0, 1)">devel
</span><span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y <span style="color: rgba(0, 0, 255, 1)">perl</span>
<span style="color: rgba(0, 0, 255, 1)">yum</span> <span style="color: rgba(0, 0, 255, 1)">install</span> -y gettext-devel</pre>
</div>
<p>查看cmake、make、gcc、gcc-c++版本以确认安装成功:</p>
<div class="cnblogs_code">
<pre>cmake --<span style="color: rgba(0, 0, 0, 1)">version
</span><span style="color: rgba(0, 0, 255, 1)">make</span> --<span style="color: rgba(0, 0, 0, 1)">version
</span><span style="color: rgba(0, 0, 255, 1)">gcc</span> --<span style="color: rgba(0, 0, 0, 1)">version</span><span style="color: rgba(0, 0, 255, 1)"><br></span></pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818104807603-1815621550.png"></p>
<p> </p>
<h3>1.4 安装编rpcgen</h3>
<p>mysql 8.0的源码编译需要用到rpcgen包,这是用于自动生成RPC服务器程序代码的工具,它以一个规格说明文件(*.x)作为输入,对外输出一个C语言的源程序。</p>
<p>因为这个包没有包含在麒麟系统的安装镜像中,需要下载源码编译安装。</p>
<p>首先,下载rpc的源码包,下载链接:https://codeload.github.com/thkukuk/rpcsvc-proto/tar.gz/refs/tags/v1.4.3</p>
<p>然后,编译安装源码包</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">tar</span> xzvf rpcsvc-proto-<span style="color: rgba(128, 0, 128, 1)">1.4</span>.<span style="color: rgba(128, 0, 128, 1)">3</span>.<span style="color: rgba(0, 0, 255, 1)">tar</span><span style="color: rgba(0, 0, 0, 1)">.gz
cd rpcsvc</span>-proto-<span style="color: rgba(128, 0, 128, 1)">1.4</span>.<span style="color: rgba(128, 0, 128, 1)">3</span><span style="color: rgba(0, 0, 0, 1)">
.</span>/autogen.<span style="color: rgba(0, 0, 255, 1)">sh</span><span style="color: rgba(0, 0, 0, 1)">
.</span>/<span style="color: rgba(0, 0, 0, 1)">configure
</span><span style="color: rgba(0, 0, 255, 1)">make</span> & <span style="color: rgba(0, 0, 255, 1)">make</span> <span style="color: rgba(0, 0, 255, 1)">install</span></pre>
</div>
<p>最后,查看rpcgen版本确认安装成功</p>
<div class="cnblogs_code">
<pre>rpcgen --version</pre>
</div>
<p>输出如下图:</p>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105020807-987491602.png"></p>
<p> </p>
<h1>二:准备MySQL源码包</h1>
<p>此文档安装社区版MySQL 8.0.26,此版本可与Kylinos V10 SP2兼容。</p>
<h3>2.1 下载MySQL源码包</h3>
<p>打开MySQL官网下载页面(https://downloads.mysql.com/archives/community/ ),选择正确的筛选条件</p>
<ul>
<li>Product Version 选择MySQL 8.0.26,</li>
<li>Operating System 选择Source Code,</li>
<li>OS Version 选择All Operating Systems(Generic)(Architecture Independent)</li>
</ul>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105136751-1562961391.png"></p>
<p> 下方源码包列表会出现两个选择,第一个不带boost的源码,第二个带boost的源码,这里我们直接选择第二个mysql-boost-8.0.26.tar.gz,省去单独安装boost的繁琐操作。</p>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105155389-1047496327.png"></p>
<p> </p>
<h3>2.2 上传MySQL源码包</h3>
<p>将MySQL 8.0.26的源码包上传到/root/Documents目录并解压,之后在解压的源码包目录中创建编译目录light,因为不允许在源码目录直接编译。</p>
<div class="cnblogs_code">
<pre>cd /root/<span style="color: rgba(0, 0, 0, 1)">Documents
</span><span style="color: rgba(0, 0, 255, 1)">tar</span> xzvf mysql-boost-<span style="color: rgba(128, 0, 128, 1)">8.0</span>.<span style="color: rgba(128, 0, 128, 1)">26</span>.<span style="color: rgba(0, 0, 255, 1)">tar</span><span style="color: rgba(0, 0, 0, 1)">.gz
cd mysql</span>-<span style="color: rgba(128, 0, 128, 1)">8.0</span>.<span style="color: rgba(128, 0, 128, 1)">26</span>
<span style="color: rgba(0, 0, 255, 1)">mkdir</span><span style="color: rgba(0, 0, 0, 1)"> light
cd light</span></pre>
</div>
<p> </p>
<h1>三:编译安装MySQL</h1>
<h3>3.1 cmake</h3>
<p>我将几乎能用到的全部选项都开启,供参考。实际可以根据自己需要修改,比如关闭Innodb引擎之外的其它引擎、修改安装目录、是否创建SYSTEMD服务文件等。</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">cmake .. \
</span>-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-<span style="color: rgba(128, 0, 128, 1)">8.0</span>.<span style="color: rgba(128, 0, 128, 1)">26</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITH_SYSTEMD=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DENABLED_LOCAL_INFILE=<span style="color: rgba(0, 0, 0, 1)">ON \
</span>-DWITH_INNODB_MEMCACHED=<span style="color: rgba(0, 0, 0, 1)">ON \
</span>-DWITH_SSL=<span style="color: rgba(0, 0, 0, 1)">system \
</span>-DWITH_INNOBASE_STORAGE_ENGINE=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITH_FEDERATED_STORAGE_ENGINE=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITH_BLACKHOLE_STORAGE_ENGINE=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITH_ARCHIVE_STORAGE_ENGINE=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITHOUT_EXAMPLE_STORAGE_ENGINE=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITH_PERFSCHEMA_STORAGE_ENGINE=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DCOMPILATION_COMMENT=<span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">zsd edition</span><span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DDOWNLOAD_BOOST=<span style="color: rgba(128, 0, 128, 1)">0</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DWITH_BOOST=/root/Documents/mysql-<span style="color: rgba(128, 0, 128, 1)">8.0</span>.<span style="color: rgba(128, 0, 128, 1)">26</span>/<span style="color: rgba(0, 0, 0, 1)">boost \
</span>-DMYSQL_UNIX_ADDR=/data/mysql/data/<span style="color: rgba(0, 0, 0, 1)">mysqld.sock \
</span>-DSYSCONFDIR=/data/mysql/<span style="color: rgba(0, 0, 0, 1)">data \
</span>-DMYSQL_DATADIR=/data/<span style="color: rgba(0, 0, 0, 1)">mysql \
</span>-DFORCE_INSOURCE_BUILD=<span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)"> \
</span>-DCMAKE_CXX_COMPILER=/usr/bin/g++<span style="color: rgba(0, 0, 0, 1)"> \
</span>-DCMAKE_C_COMPILER=/usr/bin/<span style="color: rgba(0, 0, 255, 1)">gcc</span></pre>
</div>
<p> </p>
<h3>3.2 make</h3>
<p>mysql 8源码编译对内存需求较大,最好准备32G以上内存;</p>
<p>为了提高编译速度,可以根据CPU核数开启并行编译,这里我使用12个并行编译。</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">make</span> -j <span style="color: rgba(128, 0, 128, 1)">12</span></pre>
</div>
<p> </p>
<h3>3.3 make install</h3>
<p>make编译完成后就可以安装了,安装目录对应cmake中的 <span class="cnblogs_code">-DCMAKE_INSTALL_PREFIX</span> </p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">make</span> <span style="color: rgba(0, 0, 255, 1)">install</span></pre>
</div>
<p> </p>
<h1>四:配置启动MySQL</h1>
<h3>4.1 创建mysql用户</h3>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">groupadd mysql
useradd </span>-M -g mysql -s /sbin/nologin mysql</pre>
</div>
<p> </p>
<h3>4.2 创建数据目录</h3>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">mkdir</span> /data/mysql/{data,log,redo,undo,arch} -<span style="color: rgba(0, 0, 0, 1)">p
</span><span style="color: rgba(0, 0, 255, 1)">chown</span> mysql.mysql /data -R</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105518472-61546992.png"></p>
<p> </p>
<h3>4.3 创建mysql环境变量</h3>
<p>创建mysql目录软连接</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">ln</span> -s /usr/local/mysql-<span style="color: rgba(128, 0, 128, 1)">8.0</span>.<span style="color: rgba(128, 0, 128, 1)">26</span>/usr/local/mysql</pre>
</div>
<p>创建mysql环境变量配置文件</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">echo</span> <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">MYSQL_HOME=/usr/local/mysql</span><span style="color: rgba(128, 0, 0, 1)">'</span> >>/etc/profile.d/mysql.<span style="color: rgba(0, 0, 255, 1)">sh</span>
<span style="color: rgba(0, 0, 255, 1)">echo</span> <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">PATH=$PATH:$MYSQL_HOME/bin</span><span style="color: rgba(128, 0, 0, 1)">'</span> >>/etc/profile.d/mysql.<span style="color: rgba(0, 0, 255, 1)">sh</span>
<span style="color: rgba(0, 0, 255, 1)">echo</span> <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">export PATH</span><span style="color: rgba(128, 0, 0, 1)">'</span> >>/etc/profile.d/mysql.<span style="color: rgba(0, 0, 255, 1)">sh</span><span style="color: rgba(0, 0, 0, 1)">
source</span>/etc/profile.d/mysql.<span style="color: rgba(0, 0, 255, 1)">sh</span></pre>
</div>
<p> </p>
<h3>4.4 创建my.cnf配置文件</h3>
<p>编辑 <span class="cnblogs_code">/etc/my.cnf</span> 文件</p>
<div class="cnblogs_code">
<pre>vim /etc/my.cnf</pre>
</div>
<p>输入以下内容到/etc/my.cnf中,此配置将data、redolog、undo、binlog分别置于独立目录。</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(128, 0, 0, 1); font-weight: bold">[</span><span style="color: rgba(128, 0, 0, 1)">mysql</span><span style="color: rgba(128, 0, 0, 1); font-weight: bold">]</span><span style="color: rgba(0, 0, 0, 1)">
socket</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/data/mysqld.sock
</span><span style="color: rgba(128, 0, 0, 1); font-weight: bold">[</span><span style="color: rgba(128, 0, 0, 1)">mysqld</span><span style="color: rgba(128, 0, 0, 1); font-weight: bold">]</span><span style="color: rgba(0, 0, 0, 1)">
###base config###
server-id</span>=210<span style="color: rgba(0, 0, 0, 1)">
basedir</span>=<span style="color: rgba(0, 0, 0, 1)">/usr/local/mysql
datadir</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/data
socket</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/data/mysqld.sock
pid-file</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/data/mysqld.pid
log-error</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/log/mysqld.log
###query config###
join_buffer_size </span>=<span style="color: rgba(0, 0, 0, 1)"> 128M
sort_buffer_size </span>=<span style="color: rgba(0, 0, 0, 1)"> 16M
read_buffer_size </span>=<span style="color: rgba(0, 0, 0, 1)"> 16M
read_rnd_buffer_size </span>=<span style="color: rgba(0, 0, 0, 1)"> 8M
###open table config###
table_open_cache</span>=2000<span style="color: rgba(0, 0, 0, 1)">
table_open_cache_instances</span>=16<span style="color: rgba(0, 0, 0, 1)">
###connection config###
max_connections</span>=2000<span style="color: rgba(0, 0, 0, 1)">
thread_cache_size</span>=200<span style="color: rgba(0, 0, 0, 1)">
###binlog config###
log_bin</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/log/binlog
log_bin_index</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/log/binlog.index
binlog_format</span>=<span style="color: rgba(0, 0, 0, 1)">ROW
max_binlog_size</span>=<span style="color: rgba(0, 0, 0, 1)">1G
binlog_cache_size</span>=<span style="color: rgba(0, 0, 0, 1)">16M
binlog_expire_logs_seconds</span>=604800<span style="color: rgba(0, 0, 0, 1)">
enforce_gtid_consistency</span>=<span style="color: rgba(0, 0, 0, 1)">ON
gtid_mode</span>=<span style="color: rgba(0, 0, 0, 1)">ON
###general log config###
general_log</span>=<span style="color: rgba(0, 0, 0, 1)">OFF
general_log_file</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/log/mysqld.gnl
###slow query config###
log_output</span>=<span style="color: rgba(0, 0, 0, 1)">FILE
long_query_time</span>=1<span style="color: rgba(0, 0, 0, 1)">
slow_query_log</span>=<span style="color: rgba(0, 0, 0, 1)">ON
slow_query_log_file</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/log/mysqld.slow
###innodb redo log config###
innodb_log_file_size</span>=<span style="color: rgba(0, 0, 0, 1)">1G
innodb_log_files_in_group</span>=3<span style="color: rgba(0, 0, 0, 1)">
innodb_log_buffer_size</span>=<span style="color: rgba(0, 0, 0, 1)">16M
innodb_log_group_home_dir</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/redo
innodb_redo_log_archive_dirs</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/arch
###innodb undo log config###
#innodb_max_undo_log_size</span>=<span style="color: rgba(0, 0, 0, 1)">1G
#innodb_undo_tablespaces</span>=2<span style="color: rgba(0, 0, 0, 1)">
innodb_undo_directory</span>=<span style="color: rgba(0, 0, 0, 1)">/data/mysql/undo
###innodb config###
#innodb_data_file_path</span>=<span style="color: rgba(0, 0, 0, 1)">ibdata1:12M:autoextend
#innodb_temp_data_file_path</span>=<span style="color: rgba(0, 0, 0, 1)">ibtmp1:12M:autoextend
#innodb_temp_tablespaces_dir</span>=<span style="color: rgba(0, 0, 0, 1)">./#innodb_temp/
#innodb_autoextend_increment</span>=64<span style="color: rgba(0, 0, 0, 1)">
innodb_buffer_pool_size</span>=<span style="color: rgba(0, 0, 0, 1)">8G
innodb_open_files</span>=10000<span style="color: rgba(0, 0, 0, 1)">
open_files_limit</span>=10000</pre>
</div>
<p> </p>
<h3>4.5 初始化mysql</h3>
<div class="cnblogs_code">
<pre>mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql</pre>
</div>
<p> </p>
<h3>4.6 配置systemd mysqld服务</h3>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">cp</span> /usr/local/mysql/usr/lib/systemd/system/mysqld.service/usr/lib/systemd/system/
<span style="color: rgba(0, 0, 255, 1)">cp</span> /usr/local/mysql/usr/lib/systemd/system/mysqld@.service/usr/lib/systemd/system/<span style="color: rgba(0, 0, 0, 1)">
systemctl enable mysqld</span></pre>
</div>
<p> </p>
<h3>4.7 启动MySQL</h3>
<p>安装完成后MySQL服务默认并未启动,可以通过以下命令查看到状态:</p>
<div class="cnblogs_code">
<pre>systemctl status mysqld</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105848130-99115775.png"></p>
<p> 启动mysql</p>
<div class="cnblogs_code">
<pre>systemctl start mysqld</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105912976-38524913.png"></p>
<p> </p>
<h3>4.8 首次登录mysql</h3>
<p>在MySQL初始化(initialize)完成后会自动为MySQL的root用户生成一个随机初始化密码,并在MySQL的errorlog文件中记录下来,我们要找到它并用它登录MySQL,修改root用户密码后才能执行任何其它操作:</p>
<ul>
<li>找到初始化密码</li>
</ul>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">grep</span> password /data/mysql/log/mysqld.log</pre>
</div>
<p>下图红色方框中即为初始化密码</p>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818105950415-1263905873.png"></p>
<p>使用上面的初始化密码登录MySQL</p>
<div class="cnblogs_code">
<pre>mysql -uroot -p</pre>
</div>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818110026951-1175486769.png"></p>
<p>修改root密码</p>
<p>使用初始化密码登录MySQL后只能执行修改密码的操作,其它任何操作是不能执行的,使用以下命令修改密码:</p>
<div class="cnblogs_code">
<pre>mysql> alter user user()identifiedby<span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">123456</span><span style="color: rgba(128, 0, 0, 1)">'</span>;</pre>
</div>
<p>密码修改成功后,执行以下命令查看MySQL基本信息:</p>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818110209278-818460498.png"></p>
<p><img src="https://img2023.cnblogs.com/blog/1564514/202308/1564514-20230818110216510-914488340.png"></p>
<p> 一切正常,至此安装完成。</p>
<p> </p>
<hr>
<p> </p>
<blockquote>
<p>补充:</p>
<p>为什么没有使用8.0.28版本,而是使用了8.0.26版本呢?</p>
<p>是因为我在实际编译8.0.28的时候遇到了make失败的问题并且研究了很久没有解决,后来改用8.0.27版问题依旧,而8.0.26版本没有出现问题,可以顺利编译成功。而我在Centos8.4版本上编译8.0.28的源代码也可以成功。</p>
<p>初步判断问题是跟麒麟V10 SP2的cmake、gcc、gcc-c++、make的版本有关。</p>
<p>V10 SP2自带的版本如下:</p>
<p>cmake : 3.16.5</p>
<p>make : 4.3</p>
<p>gcc : 7.3.0</p>
<p>gcc-c++ : 7.3.0</p>
<p>Centos8.4自带的版本如下:</p>
<p>cmake : 3.18.2</p>
<p>make : 4.2.1</p>
<p>gcc : 8.4.1</p>
<p>gcc-c++ : 8.4.1</p>
<p>目前我从麒麟官方未拿到对应的更新包,所以这个问题暂时无解,等待V10 SP3发布后更新吧。</p>
</blockquote>
<p> </p>
<p>转自: 国产麒麟系统KylinOS Server V10 SP2安装MySQL 8.0.26—源码编译安装_麒麟v10系统 mysql xtbackup_老哥讲数据库的博客-CSDN博客</p>
<p>参考资料:</p>
<p>fedora下缺少autopoint包的解决办法 - ElNinoT - 博客园 (cnblogs.com)</p>
<p>rpcsvc-proto-1.4 (linuxfromscratch.org)</p>
<p>autoreconf 安装与使用 - 洛笔达 - 博客园 (cnblogs.com)</p><br><br>
来源:https://www.cnblogs.com/masahiro/p/17639919.html
頁:
[1]