05/9/14

Atlas2.1 安装记录

操作系统: centos 6.2  32位或者64位

1、  rpm包安装(推荐)。

下载地址:https://github.com/Qihoo360/Atlas/releases

wget https://github.com/Qihoo360/Atlas/releases/download/1.0.1/Atlas-1.0.1-1.el6.x86_64.rpm

rpm -ivh Atlas-1.0.1-1.el6.x86_64.rpm

2、  源码编译安装。

环境依赖:glib(2.32.x)、libevent(1.4以上)、Lua(5.1.x)、OpenSSL(0.9.8以上)

Yum安装依赖:

yum install -y libevent-devel lua-devel openssl-devel flex mysql-devel

yum install -y xz gettext-devel

glib一般都会版本比较低,而yum安装的版本可能并不能达到要求,所以需要手动编译安装。推荐版本glib2.32.4。

glib源码安装:

wget http://ftp.gnome.org/pub/gnome/sources/glib/2.32/glib-2.32.4.tar.xz

xz -d glib-2.32.4.tar.xz

tar xvf glib-2.32.4.tar

cd glib-2.32.4

./configure

make  &&  make install

ldconfig

注意:ldconfig这步骤不能缺少,否则编译安装Atlas的时候可能会用老的glib,然后提示版本不对。如果文件/etc/ld.so.conf没有/usr/local/lib这一行,请手动添加。

atlas 源码安装:

wget https://github.com/Qihoo360/Atlas/archive/2.1.tar.gz
mv 2.1 atlas2.1.tar.gz
tar zxvf atlas2.1.tar.gz
cd Atlas-2.1/

vim bootstrap.sh

修改prefix路径,/opt/phpdba/atlas_proxy

修改mysql_config路径,/opt/phpdba/mysql/bin/mysql_config

修改pkgconfig路径,/usr/local/lib/pkgconfig

./bootstrap.sh
make && make install

 

 

10/29/13

MySQL中间件 Atlas-1.0.3 安装记录

1、wget https://github.com/Qihoo360/Atlas/archive/1.0.3.tar.gz -o Atlas-1.0.3.tar.gz

2、tar zxvf Atlas-1.0.3.tar.gz

3、cd Atlas-1.0.3

4、vim bootstrap.sh

#!/bin/sh
base=$(cd “$(dirname “$0″)”; pwd)
cd $base
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure –with-mysql=/opt/phpdba/mysql/bin/mysql_config –prefix=/opt/phpdba/atlas_mysql_proxy CFLAGS=”-DHAVE_LUA_H -O2″ LDFLAGS=”-lm -ldl -lcrypto” LUA_CFLAGS=”-I/usr/local/include/” LUA_LIBS=”-L/usr/local/lib -llua”

5、./bootstrap.sh glib版本低,升级之

checking for GLIB… configure: error: Package requirements (glib-2.0 >= 2.32.0) were not met:

Requested ‘glib-2.0 >= 2.32.0′ but version of GLib is 2.22.5

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

6、升级glib

a、wget http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.3.tar.xz

b、xz -d glib-2.36.3.tar.xz && tar xvf glib-2.36.3.tar

c、cd glib-2.36.3 &&  ./configure && make

保存信息:

/root/chen-123/glib-2.36.3/missing: line 81: automake-1.13: command not found
WARNING: ‘automake-1.13′ is missing on your system.
You should only need it if you modified ‘Makefile.am’ or
‘configure.ac’ or m4 files included by ‘configure.ac’.
The ‘automake’ program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[4]: *** [Makefile.in] 错误 127
make[4]: Leaving directory `/root/chen-123/glib-2.36.3/docs/reference/glib’
make[3]: *** [all-recursive] 错误 1
make[3]: Leaving directory `/root/chen-123/glib-2.36.3/docs/reference’
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/root/chen-123/glib-2.36.3/docs’
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/chen-123/glib-2.36.3′
make: *** [all] 错误 2

d、wget http://ftp.gnu.org/gnu/automake/automake-1.13.3.tar.gz  &&  tar zxvf  automake-1.13.3.tar.gz  && cd automake-1.13.3 &&  ./configure

错误信息:

checking whether autoconf is recent enough… no
configure: error: Autoconf 2.65 or better is required.

e、wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && tar zxvf  autoconf-2.69.tar.gz && cd autoconf-2.69 && ./configure && make && make install

f、cd automake-1.13.3 && ./configure && make   &&make install

g、cd glib-2.36.3 &&  ./configure && make

报错:

configure.ac:66: error: version mismatch.  This is Automake 1.13.3,
configure.ac:66: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:66: comes from Automake 1.13.2.  You should recreate
configure.ac:66: aclocal.m4 with aclocal and run automake again.
gtk-doc.make:32: warning: EXTRA_DIST multiply defined in condition TRUE …
docs/reference/glib/Makefile.am:85:   ‘gtk-doc.make’ included from here
Makefile.decl:8: … ‘EXTRA_DIST’ previously defined here
docs/reference/glib/Makefile.am:2:   ‘Makefile.decl’ included from here
WARNING: ‘automake-1.13′ is probably too old.

h、cd automake-1.13.3 &&  make uninstall  && wget http://ftp.gnu.org/gnu/automake/automake-1.13.2.tar.gz  &&  tar zxvf  automake-1.13.2.tar.gz  && cd automake-1.13.2 &&  ./configure && make && make install

i、cd glib-2.36.3 &&  ./configure && make && make install

7、cd Atlas-1.0.3  &&  ./bootstrap.sh && make && make install    安装完成