MySQL Agent Atlas in CentOS7.0 in the source installation practice (set to start)

Source: Internet
Author: User
Tags lua openssl

Tip: To remove SQL filtering (no WHERE clause update and delete) function, you can first modify the source code :

Modify File Atlas-2.2.1\plugins\proxy\proxy-plugin.c

Modify method Is_in_blacklist, return false directly


Dependent Packages:

Glib-2.32.4.tar.xz

Glibc-devel libevent-devel lua-devel openssl-devel Flex mysql-devel xz Gettext-devel

Step command:

#  Installing the Dependency package yum install -ylibevent-devel libffi-devel lua-devel openssl-devel  flexyum install -y mysql-devel #  Source Installation glibyum install -y  xzgettext-develtar xvf glib-2.32.4.tar.xzcd glib-2.32.4./configuremakemake install #   If the compilation is not successful, try the following yum install -y gcc glibc-develglib2-devel  #  Source Installation Atlastar xvfatlas-2.2.1.tar.gzcd atlas-2.2.1vi ./plugins/proxy/proxy-plugin.c/ is_in_ blacklist  #  Add  /** */  Comment before the beginning and last line of the method body: wq ./configure --prefix=/usr/ local/mysql-proxy cflags= "-dhave_lua_h -o2"  ldflags= "-lm -ldl -lcrypto"  LUA_ cflags= "-i/usr/local/include"  lua_libs= "-l/usr/local/lib -llua"  glib_cflags= "-I/usr/local/ include/glib-2.0 -i/usr/local/lib/glib-2.0/include -i/usr/local/include/glib-2.0/glib/" GLIB_ libs= "-l/usr/local/lib -lglib-2.0"  gmodule_cflags= "-i/usr/local/include"  gmodule_libs= "-l/usr/local/lib -lgmodule-2.0"  GTHREAD_CFLAGS= "- I/usr/local/include " gthread_libs="-l/usr/local/lib -lgthread-2.0 "makemake install #  Package the green installation file for Atlas cd /usr/localtar -zcvf/tmp/atlas-2.2.1.el7.x86_64-modify.tar.gz mysql-proxy/*  --exclude log/*


# set up Atlas as a service and enable automatic boot

# Description: The author has tested only on CentOS7.0 and has not been tested for reliability and stability!

Cp/tmp/atlas/etc/rc.d/init.d/atlaschmod +x/etc/rc.d/init.d/atlaschkconfig--add Atlaschkconfig Atlas on


The contents of the/tmp/atlas file are as follows:

#!/bin/sh#author:huangfufanfeng <[email protected]> #chkconfig: 2345 80 90#description: atlas autorun#your instance  nameinstance_name=testcase  "$"  in      "Start"          /usr/local/mysql-proxy/bin/mysql-proxyd  $instance _name start         ;;       "Stop")          /usr/local/ mysql-proxy/bin/mysql-proxyd  $instance _name stop       ;;       "Restart")          /usr/local/ mysql-proxy/bin/mysql-proxyd  $instance _name restart      ;;       "status")          /usr/local/ mysql-proxy/bin/mysql-proxyd  $instance _name status       ;;      *)    echo  "usage: service atlas start/stop/restart/status "                                        ;;    esac

Use the following command:

Service Atlas StartService Atlas StopService Atlas Statusservice Atlas Restart


This article is from the "twists and turns ◇2015" blog, please be sure to keep this source http://huangfuff.blog.51cto.com/2632203/1603692

MySQL Agent Atlas in CentOS7.0 in the source installation practice (set to start)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.