CentOS系统下编译安装MySQL以及设置相关yum源的教程_MySQL
编译安装软件通常会遇到各种问题,尤其是在编译lamp这样的多种软件协同工作时各软件还相互影响,尤其是之前安装的软件会影响后边程序的编译安装,出现这种问题常常是之前安装的软件没有导出库文件和头文件,因而导致后面的软件在安装是需要指定前面安装程序的路径时常常提示找不到文件之类的错误,下面以mysql为例
1、安装开发环境
yum groupinstall "Development tools"
2、解决软件包依赖包
安装编译代码需要的包
yum -y install make gcc-c++ cmake bison-devel ncurses-devel
下载MySQL 5.6.14
wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.14.tar.gz tar xvf mysql-5.6.14.tar.gz cd mysql-5.6.14
3、配置编译并安装
cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ -DMYSQL_DATADIR=/usr/local/mysql/data \ -DSYSCONFDIR=/etc \ -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_MEMORY_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \ -DMYSQL_TCP_PORT=3306 \ -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci make && make install
4、导出库搜索
在 /etc/ld.conf.d/mysql.conf 目录下创建相应的conf文件
ldconfig -v | grep mysql
5、导出头文件
ln -sv /usr/local/mysql/include /usr/include/mysql
6、导出帮助文件
vim /etc/man.config MANPATH /usr/local/mysql/man
7、导出二进制路径
vim /etc/profile PATH=/usr/local/mysql/bin:$PATH source /etc/profile
PS:如何使用MySQL yum源来安装更新MySQL相关软件包
MySQL yum库提供了一个简单的和方便的方法来安装和更新MySQL相关的软件包到最新版本。
MySQL yum库文档说明:http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
MySQL yum库支持的平台有:
Red Hat Enterprise Linux 7 / Oracle Linux 7
Red Hat Enterprise Linux 6 / Oracle Linux 6
Red Hat Enterprise Linux 5 / Oracle Linux 5
Fedora 18, 19, and 20
MySQL yum库包括最新的软件包有:
MySQL 5.6 (GA)
MySQL 5.7 (Development Release)
MySQL 5.5 (GA - Red Hat Enterprise Linux and Oracle Linux Only)
MySQL Workbench
MySQL Fabric
MySQL Utilities
MySQL Connector / ODBC
MySQL Connector / Python
RHEL7/CentOS7/Oracle linux7:
# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm # rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
RHEL5/CentOS5/Oracle linux5:
# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el5-5.noarch.rpm
Fedora
# Fedora20
# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-fc20-5.noarch.rpm
#Fedora19
# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-fc19-5.noarch.rpm
# Fedora18
# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-fc18-5.noarch.rpm
以上就是CentOS系统下编译安装MySQL以及设置相关yum源的教程_MySQL的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

Article summary: This article provides detailed step-by-step instructions to guide readers on how to easily install the Laravel framework. Laravel is a powerful PHP framework that speeds up the development process of web applications. This tutorial covers the installation process from system requirements to configuring databases and setting up routing. By following these steps, readers can quickly and efficiently lay a solid foundation for their Laravel project.

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA
