安装环境RHEL5.4
1、安装cmake
- #tar zxf cmake-2.8.5.tar.gz
- #cd cmake-2.8.5
- #./bootstrap
- #make
- #make install
2、编译安装mysql-5.5.14
- useradd mysql
- tar zxf mysql-5.5.14.tar.g
- cd mysql-5.5.14
- CFLAGS="-O3" CXX=gcc
- CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti"
- cmake . -LH|more //CMake下查看MySQL的编译配置
- cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DEXTRA_CHARSETS=all
- make
- make install
- chown -R mysql:mysql /usr/local/mysql
- cp support-files/my-medium.cnf /etc/my.cnf
- cd /usr/local/mysql/
- ./scripts/mysql_install_db --user=mysql
- /usr/local/mysql/bin/mysqld_safe --user=mysql &
- /usr/local/mysql/bin/mysql
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 2
- Server version: 5.5.14-log Source distribution
- Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- mysql> show databases;
- +--------------------+
- | Database |
- +--------------------+
- | information_schema |
- | mysql |
- | performance_schema |
- | test |
- +--------------------+
- 4 rows in set (0.01 sec