1, installation g++
$sudo Apt-get Install Build-essential
Note: This command installs both GCC and make
2, installation CMake
$sudo Apt-get Install CMake
3. Install MySQL
Enter the directory where the MySQL file is located (CD)
$unzip mysql-5.6.4-m7.tar\ (1\). zip
$tar-ZXVF mysql-5.6.4-m7.tar.gz
Enter MYSQL-5.6.4-M7
$CD MYSQL-5.6.4-M7
$groupadd MySQL//So here we're going to build a MSYQL user and group
$useradd-G MySQL mysql-s/usr/sbin/nologin
$mkdir/usr/local/mysql//Create a directory
$mkdir/usr/local/mysql/data
$cmake-dcmake_install_prefix=/usr/local/mysql && make && make INSTALL
At this point can be error, the lack of ncurses library, such as, enter the following command to install
$sudo Apt-get Install Libncurses5-dev
Then delete the CMakeCache.txt in the directory
$sudo RM CMakeCache.txt
Continue operation input Cmake-dcmake .... This command was successfully installed.
4. Configure MySQL
Enter MySQL under the installation directory/usr/local/mysql:
scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysql//Initialize MySQL database
CP support-files/my-medium.cnf/usr/local/mysql/my.cnf//copy configuration file
Chown-r mysql:mysql/usr/local/mysql//Change permissions
VI/USR/LOCAL/MYSQL/MY.CNF//Add the following content
[Mysqld]
Basedir =/usr/local/mysql
DataDir =/usr/local/mysql/data
Log-error =/usr/local/mysql/mysql_error.log
Pid-file =/usr/local/mysql/mysql.pid
user = MySQL
Tmpdir =/tmp
Start MySQL bin/mysqld_safe--user=mysql & or use the following command to add MySQL as a system service.
cd/usr/local/mysql/support-files/
CP./mysql.server/etc/init.d/mysqld
/etc/init.d/mysqld start
[Install MySQL under Linux]linux