MySQL-Proxy binary version of the installation is relatively simple, do not need to say more, the following introduction is loaded Linux source code installation: Install pkg-config: tarzxvfpkg-config-0.
MySQL-Proxy binary version of the installation is relatively simple, do not need to say more, the following introduction is the installation of Linux source code: Install pkg-config: tar zxvf pkg-config-0.
The installation of MySQL-Proxy is relatively simple and does not need to be repeated. The following describes how to install the source code in Linux:
Install pkg-config:
Tar zxvf pkg-config-0.23.tar.gz
Cd pkg-config-0.23
./Configure
Make
Make install
Make sure that the PKG_CONFIG_PATH environment variable contains the relevant pkg-config configuration file path:
Export PKG_CONFIG_PATH = $ PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
Install libevent:
Tar zxvf libevent-1.4.10-stable.tar.gz
Cd libevent-1.4.10-stable
./Configure
Make
Make install
Install glib:
Tar zxvf glib-2.20.0.tar.gz
Cd glib-2.20.0
./Configure
Make
Make install
Install lua:
Tar zxvf lua-5.1.4.tar.gz
Cd lua-5.1.4
If your server is 64-bit, adjust Makefile: vi src/Makefile and add-fPIC to CFLAGS; otherwise, an error occurs:
/Usr/bin/ld:/usr/local/lib/liblua. a (lapi. o ):
Relocation R_X86_64_32 against 'luao _ nilobject _ 'can not be used when making a shared object;
Recompile with-fPIC
/Usr/local/lib/liblua. a: cocould not read symbols: Bad value
Next, you do not need to execute common configure, and make directly:
Make linux
Make install
Install the pkg-config configuration file so that lua can be found when mysql-proxy is compiled:
Cp etc/lua. pc/usr/local/lib/pkgconfig/lua5.1.pc
If you do not perform this step, you will get an error message similar to the following when compiling and installing mysql-proxy later:
Package lua5.1 was not found in the pkg-config search path.
Perhaps you shoshould add the directory containing 'lua5. 1. pc'
To the PKG_CONFIG_PATH environment variable
No package 'lua5. 1' found
Install mysql:
Here we will introduce the complete installation of mysql. In fact, you only need to install the mysql development kit.
Tar zxvf mysql-5.1.33.tar.gz
Mysql-5.1.33 for cd tar zxvf
./Configure
Make
Make install
Cp support-files/mysql. server/etc/init. d/mysql
Chown + x/etc/init. d/mysql
Cp support-files/my-[small | medium | large | huge | innodb-heavy-4G]. cnf/etc/my. cnf
If the skip-federated option exists in my. cnf, comment it out. Otherwise, an error similar to the following occurs during database installation:
[ERROR]/usr/local/libexec/mysqld: unknown option '-- skip-federated'
/Usr/local/bin/mysql_install_db -- user = mysql
/Usr/local/bin/mysqld_safe -- user = mysql &
Ensure that the system can find mysql_config, which will be used in mysql-proxy compilation later:
Export PATH = $ PATH:/usr/local/bin
Make sure that the system can find the mysql database file:
Add vi/etc/ld. so. conf to the/usr/local/lib directory.
Run:/sbin/ldconfig/etc/ld. so. conf
,