?? Twemproxy Redis ttserver phpadmin memcache

Source: Internet
Author: User
Tags openldap automake

1.system Update

Lang=c

Yum-y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-deve L zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl curl-devel e2fsprogs E2 Fsprogs-devel krb5 krb5-devel libidn libidn-devel OpenSSL openssl-devel openldap openldap-devel Nss_ldap Openldap-clients openldap-servers


2. Pcre Install
path:pcre-8.10

./configure

Make && make install


3. Lua Install
path:lua-5.1.5

Make install

4.luarocks Install
path:luarocks-2.1.0

./configure
Make && make install

5.lua Extension Install
Yum Install Expat-devel

Luarocks Install Lbase64
Luarocks Install Lua-cjson
Luarocks Install Lua-iconv
Luarocks Install Luacrypto
Luarocks Install Luaexpat
Luarocks Install Luasocket
Luarocks Install Luasql-mysql
Luarocks Install Luaxml

Download zlib and install
Luarocks Install Lzlib
Luarocks Install MD5


More see:http://rhomobi.com/topics/186

# Library for Connectting to MySQL
Yum Install Mysql-devel
Luarocks Install Luasql-mysql mysql_incdir=/usr/include/mysql mysql_libdir=/usr/lib64/mysql

6.RHONGX Install
Path:src
Useradd www
./configure--user=www--group=www--prefix=/usr/local/webserver/rhongx--with-http_stub_status_module--with-http_ Ssl_module--with-debug--with-http_gzip_static_module--without-mail_pop3_module--without-mail_imap_module-- Without-http_uwsgi_module--without-http_scgi_module--without-http_ssi_module--add-module=. /lua-nginx-module-0.6.10--add-module=. /ngx_devel_kit-0.2.17--add-module=. /memc-nginx-module--add-module=. /srcache-nginx-module--add-module=. /echo-nginx-module--add-module=. /ngx_cache_purge-1.6--add-module=. /evanmiller-nginx_upstream_hash-2580b21--add-module=. /nginx-gridfs--add-module=. /nginx_upload_module-2.2.0--add-module=. /MASTERZEN-NGINX-UPLOAD-PROGRESS-MODULE-82B35FC--add-module=. /nginx-accesskey-2.0.3--add-module=. /set-misc-nginx-module--add-module=. /iconv-nginx-module

Make && make install
7.update/etc/sysctl.conf

# Disable NetFilter on bridges.
#net. bridge.bridge-nf-call-ip6tables = 0
#net. bridge.bridge-nf-call-iptables = 0
#net. bridge.bridge-nf-call-arptables = 0

# ADD
Net.ipv4.tcp_max_syn_backlog = 65536
Net.core.netdev_max_backlog = 32768
Net.core.somaxconn = 32768

Net.core.wmem_default = 8388608
Net.core.rmem_default = 8388608
Net.core.rmem_max = 16777216
Net.core.wmem_max = 16777216

Net.ipv4.tcp_timestamps = 0
Net.ipv4.tcp_synack_retries = 2
Net.ipv4.tcp_syn_retries = 2

Net.ipv4.tcp_tw_recycle = 1
#net. Ipv4.tcp_tw_len = 1
Net.ipv4.tcp_tw_reuse = 1

Net.ipv4.tcp_mem = 94500000 915000000 927000000
Net.ipv4.tcp_max_orphans = 3276800
#
Net.ipv4.tcp_fin_timeout = 30
Net.ipv4.tcp_keepalive_time = 120
Net.ipv4.ip_local_port_range = 1024 65535

#Redis2.6.17need
Vm.overcommit_memory = 1

# End

8. Start Redis
Mkdir/data/logs/redis/6399-p
/opt/redis-2.6.17/src/redis-server/data/sgcore/ngx/cfg/sg.aof.conf

9. Start Rhongx
/usr/local/webserver/rhongx/sbin/nginx-t-c/data/sgcore/ngx/cfg/ly.ngx.conf
/usr/local/webserver/rhongx/sbin/nginx-c/data/sgcore/ngx/cfg/ly.ngx.conf

#access http://sg1.mangocity.com/api/pdb/SceneryDetail/321/405 not allowed

Ten. Restart Rhongx
Ps-ef | grep "Nginx:master Process" | Grep-v "grep" | Awk-f ' {print $} '
Kill-hup ' PID number '

11, twemproxy-0.4.0
Yum remove autoconf*
autoconf-2.69.tar.gz
Automake-1.12.5.tar
LIBTOOL-2.4.2.TAR.XZ
twemproxy-0.4.0.tar.gz
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
Tar xzvf autoconf-2.69.tar.gz
CD./autoconf-2.69
./configure
Make
make install
tar XZVF AUTOMAKE-1.12.5.TAR.XZ
xz-d automake-1.12.5.tar.xz
Tar XF automake-1.12.5.tar
CD./automake-1.12.5
. Configure
Make
make install
xz-d libtool-2.4.2.tar.xz
Tar XF libtool-2.4.2.tar
CD./libtool-2.4.2
./configure
Make
Make install
CD. /twemproxy-0.4.0
Autoreconf-fvi
./configure--prefix=/usr/src/twemproxy4
Make
make install

[Email protected] twemproxy-0.4.0]# cd/usr/src/twemproxy4/
[email protected] twemproxy4]# LL
Total 8
Drwxr-xr-x 2 root root 4096 Dec 13:25 sbin
Drwxr-xr-x 3 root root 4096 Dec 11:38 share
[Email protected] twemproxy4]# mkdir run conf
[[Email protected] twemproxy4]# CD./conf/
[Email protected] conf]# vim nutcracker.yml

Alpha
listen:10.10.130.93:61390
Hash:fnv1a_64
Distribution:ketama
Auto_eject_hosts:true
Redis:true
Redis_auth:redispassword
server_retry_timeout:2000
Server_failure_limit:1
Servers
-10.10.42.93:6390:1
-10.10.42.93:6392:1
-10.10.42.93:6394:1


Gamma
listen:10.10.130.93:61978
Hash:fnv1a_64
Distribution:ketama
backlog:1024
Auto_eject_hosts:true
server_retry_timeout:3000
Server_failure_limit:3
Servers
-10.10.42.93:1978:1
-10.10.42.93:2978:1
-10.10.42.93:3978:1
-10.10.42.93:4978:1

start the Twemproxy service

Nutcracker- TTest configuration File Nutcracker- D - C /Usr/Src/Twemproxy/Conf/Nutcracker.yml- P /Usr/Src/Twemproxy/Run/Redisproxy.pid- o /Usr/Src/Twemproxy/Run/Redisproxy.log

Nutcracker Usage and command options

Usage:nutcracker [-?HVDDT] [-v verbosity level] [-O output file][-c conf file] [-s stats port] [-A stats addr][-i stats I Nterval] [-P PID file] [-M mbuf size]

Options:
-h,–help: Viewing the Help document, displaying command options
-v,–version: View Nutcracker version
-t,–test-conf: Testing the correctness of the configuration script
-d,–daemonize: Run as Daemon
-d,–describe-stats: Print Status description
-v,–verbosity=n: Set Log level (Default:5, min:0, max:11)
-o,–output=s: Set log output path, default to standard error output (DEFAULT:STDERR)
-c,–conf-file=s: Specifying a Profile path (DEFAULT:CONF/NUTCRACKER.YML)
-s,–stats-port=n: Setting the Status monitoring port, default 22222 (default:22222)
-a,–stats-addr=s: Set Status monitoring IP, default 0.0.0.0 (default:0.0.0.0)
-i,–stats-interval=n: Set the state aggregation interval (default:30000 msec)
-p,–pid-file=s: Specify process PID file path, default off (Default:off)
-m,–mbuf-size=n: Set mbuf block size to bytes units (default:16384 bytes)

12, Ttserver
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.46.tar.gz
wget http://jaist.dl.sourceforge.net/project/tokyocabinet/tokyotyrant/1.1.33/tokyotyrant-1.1.33.tar.gz
Tar zxvf tokyocabinet-1.4.46.tar.gz
CD tokyocabinet-1.4.46
./configure--prefix=/usr/local/tokyocabinet
Make
Make install
Tar zxvf tokyotyrant-1.1.33.tar.gz
CD tokyotyrant-1.1.33
./configure--prefix=/usr/local/ttserver/--with-tc=/usr/local/tokyocabinet/
Make
Make install
/usr/src/ttserver/bin/ttserver-host 10.10.42.201-port 42201-thnum 8-dmn-pid/data/ttserver/ttserver42201.pid-log/d ata/ttserver/log/ttserver42201.log-le-ulog/data/ttserver/ulog/-ulim 128m-sid 42201-mhost 10.10.42.202-mport 42202- rcc-rts/data/ttserver/data/ttserver.rts/data/ttserver/data/database.tch#bnum=10000
/usr/src/ttserver/bin/ttserver-host 10.10.42.202-port 42202-thnum 8-dmn-pid/data/ttserver/ttserver42202.pid-log/d ata/ttserver/log/ttserver42202.log-le-ulog/data/ttserver/ulog/-ulim 128m-sid 42202-mhost 10.10.42.201-mport 42201- rcc-rts/data/ttserver/data/ttserver.rts/data/ttserver/data/database.tch#bnum=10000

13. Redis
wget https://github.com/antirez/redis/archive/3.0.0-rc1.tar.gz
Tar xzvf 3.0.0-rc1.tar.gz
MV Redis-3.0.0-rc1/usr/src/redis3-0

?? Twemproxy Redis ttserver phpadmin memcache

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.