Public Repository

Last pushed: 5 months ago
Short Description
openresty
Full Description

Tag: 1.0

启动缓存

启动Redis1: # nohup /usr/servers/redis-2.8.19/src/redis-server /usr/chapter6/redis_6660.conf &
启动Redis2: # nohup /usr/servers/redis-2.8.19/src/redis-server /usr/chapter6/redis_6661.conf &

启动Twemproxy:# /usr/servers/twemproxy-0.4.0/src/nutcracker -d -c /usr/chapter6/nutcracker.yml

验证Redis:# /usr/servers/redis-2.8.19/src/redis-cli -p 1111 (twemproxy端口,也可单独访问 6660, 6661)

启动数据库

启动Mysql: # service mysql start
启动Atlas: # /usr/local/mysql-proxy/bin/mysql-proxyd chapter6 start
登录Atlas验证:# mysql -h127.0.0.1 -P1112 -uroot -p123456
mysql> use chapter6;
mysql> select * from ad where sku_id=1;

启动Tomcat:

启动tomcat1:# /usr/servers/tomcat-server1/bin/startup.sh
启动tomcat2:# /usr/servers/tomcat-server2/bin/startup.sh

测试:

curl http://127.0.0.1:8080/ad?id=1

test1

curl http://127.0.0.1:8090/ad?id=2

test2

启动Nginx:

启动Nginx:# /usr/servers/nginx/sbin/nginx

访问Nginx:# links http://127.0.0.1/ad/2

重载Nginx:# /usr/servers/nginx/sbin/nginx -s reload
停止Nginx:# /usr/servers/nginx/sbin/nginx -s quit

关闭命令:

关闭Nginx: # /usr/servers/nginx/sbin/nginx -s quit

关闭tomcat1:# /usr/servers/tomcat-server1/bin/shutdown.sh
关闭tomcat2:# /usr/servers/tomcat-server2/bin/shutdown.sh

关闭Mysql: # service mysql stop
关闭Atlas: # /usr/local/mysql-proxy/bin/mysql-proxyd chapter6 stop

关闭Twemproxy、Redis: 用kill -9 杀掉进程

Docker Pull Command
Owner
shenqian