1. the Source package is usually compressed using targz. the name contains only version information, which is much smaller than the RPM Package and binary package, the decompressed file contains the INSTALL-SOURCE file, which can be downloaded from the MySQL website (http: wwwmysqlcomdownloads), for example, m 1. download source code package
SOURCE code package is often compressed tar.gz, the name only contains version information, the size is much smaller than the RPM Package, binary package, the decompressed file contains INSTALL-SOURCE file, can be from the MySQL official website (http://www.mysql.com/downloads) download, such as: mysql-5.5.17.tar.gz
2. CMake
Before using the source code package to install MySQL instances, we will first introduce the cmake compilation tool. Before MySQL 5.5, the configure tool was used to compile the source code. in MySQL 5.5, cmake was used for compilation. This is a more advanced compilation configuration tool than make, according to different platforms, different compilers, production of the corresponding Makefile or vcproj project, so first from the official website (http://www.cmake.org) download and install the cmake tool.
Install the gcc package before installing cmake
Rpm-ivh kernel-headers-2.6.18-308.el5.x86_64.rpm
Rpm-ivh glibc-headers-2.5-81.x86_64.rpm
Rpm-ivh glibc-devel-2.5-81.x86_64.rpm
Rpm-ivh gcc-4.1.2-52.el5.x86_64.rpm
Rpm-ivh libstdc ++ devel-4.1.2-52.el5.x86_64.rpm
Rpm-ivh gcc-c ++-4.1.2-52. el5.x86 _ 64.rpm
Install cmake
/Mysql/cmake-2.8.3
./Configure
Gmake & make install
3. install mysql 5.5.17
1. create a mysql system Group and user
Groupadd mysql
Useradd-g mysql
2. set limits on operating system resources
Vi/etc/security/limits. conf
Mysql soft nproc 2047
Hard nproc 16384
Mysql soft nofile 1024
Mysql hard nofile 65536
Installation package
# Rpm-ivh ncurses-devel-5.5-24.20060715.x86_64.rpm
# Rpm-ivh bison-2.3-2.1.x86_64.rpm
Initialize DB
# Sh scripts/mysql_install_db -- user = mysql -- basedir =/opt/mysql -- datadir =/opt/mysql/data
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
Support-files/mysql. server to the right place for your system
Please remember to set a password for the MySQL root USER!
To do so, start the server, then issue the following commands:
/Opt/mysql/bin/mysqladmin-u root password 'new-password'
/Opt/mysql/bin/mysqladmin-u root-h mysql password 'new-password'
Alternatively you can run:
/Opt/mysql/bin/mysql_secure_installation
Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon:
Cd/opt/mysql;/opt/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Cd/opt/mysql-test; perl mysql-test-run.pl
Please report any problems with the/opt/mysql/scripts/mysqlbug script!
4. start Mysql Sever
Configure service
# Cp/opt/mysql/files/mysql. server/etc/init. d/mysql -- configure basedir and datadir
Configure mysql parameter file my. cnf
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.