Porting Guides
Total Page:16
File Type:pdf, Size:1020Kb
Kunpeng Database Solution Porting Guides Issue 04 Date 2021-03-30 HUAWEI TECHNOLOGIES CO., LTD. Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd. Trademarks and Permissions and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders. Notice The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied. The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied. Huawei Technologies Co., Ltd. Address: Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: https://www.huawei.com Email: [email protected] Issue 04 (2021-03-30) Copyright © Huawei Technologies Co., Ltd. i Kunpeng Database Solution Porting Guides Contents Contents 1 MySQL 5.7.27 Porting Guide (CentOS 7.6)........................................................................1 1.1 Introduction............................................................................................................................................................................... 1 1.2 Environment Requirements................................................................................................................................................. 2 1.3 Compilation and Installation Process............................................................................................................................... 3 1.4 Configuring the Compilation Environment.................................................................................................................... 3 1.4.1 Configuring the Local Yum Source................................................................................................................................ 3 1.4.2 Upgrading CMake................................................................................................................................................................ 5 1.4.3 Upgrading GCC..................................................................................................................................................................... 7 1.5 Compiling and Installing MySQL....................................................................................................................................... 8 1.6 Troubleshooting..................................................................................................................................................................... 10 1.6.1 CMake Target Version Does Not Take Effect After the Upgrade......................................................................10 1.6.2 CMake Compilation and Installation Failed............................................................................................................. 10 1.6.3 "error:'prctl' was not declared in this scope" Reported........................................................................................11 2 (Recommended) MySQL 8.0.x Porting Guide (CentOS 7.6)........................................13 2.1 Introduction............................................................................................................................................................................ 13 2.2 Environment Requirements............................................................................................................................................... 14 2.3 Compilation and Installation Process.............................................................................................................................15 2.4 Configuring the Compilation Environment.................................................................................................................. 15 2.4.1 Configuring the Local Yum Source.............................................................................................................................. 15 2.4.2 Upgrading CMake............................................................................................................................................................. 17 2.4.3 Upgrading GCC...................................................................................................................................................................19 2.5 Compiling and Installing MySQL..................................................................................................................................... 21 2.6 Troubleshooting..................................................................................................................................................................... 22 2.6.1 CMake Target Version Does Not Take Effect After the Upgrade......................................................................23 2.6.2 CMake Compilation and Installation Failed............................................................................................................. 23 3 MySQL 8.0.x Porting Guide (openEuler 20.03)...............................................................25 3.1 Introduction............................................................................................................................................................................ 25 3.2 Environment Requirements............................................................................................................................................... 26 3.3 Compilation and Installation Process.............................................................................................................................27 3.4 Configuring the Compilation Environment.................................................................................................................. 27 3.4.1 Installing Dependencies.................................................................................................................................................. 27 3.4.2 Upgrading CMake............................................................................................................................................................. 29 Issue 04 (2021-03-30) Copyright © Huawei Technologies Co., Ltd. ii Kunpeng Database Solution Porting Guides Contents 3.4.3 Upgrading GCC...................................................................................................................................................................31 3.5 Configuring the Operating Environment...................................................................................................................... 32 3.5.1 Disabling the Firewall...................................................................................................................................................... 32 3.5.2 Disabling SELinux.............................................................................................................................................................. 33 3.5.3 Creating a User Group and a User.............................................................................................................................. 33 3.5.4 Creating a Data Drive...................................................................................................................................................... 34 3.5.5 Creating a Data Directory...............................................................................................................................................37 3.6 Compiling and Installing MySQL..................................................................................................................................... 37 3.7 Running MySQL.....................................................................................................................................................................40 3.8 Uninstalling MySQL............................................................................................................................................................. 45 4 MariaDB 10.3.8 Porting Guide (CentOS 7.6).................................................................. 46 4.1 Introduction............................................................................................................................................................................ 46 4.2 Environment Requirements............................................................................................................................................... 48 4.3 Configuring the Compilation Environment.................................................................................................................. 49 4.4 Compiling and Installing MariaDB..................................................................................................................................50