zato集群部署

2021-09-22 13:05:33 字數 3692 閱讀 8413

閱讀目錄

回到頂部

$ sudo

su -postgres # os x users may skip it

$ createuser --no-superuser --no-createdb --no-createrole zato1

$ createdb --owner=zato1 zato1

$ psql --dbname zato1 --command="

alter role zato1 with password 'l'

"

postgres@ubuntu:/home/dimite$ psql

psql (

9.3.9

)type

"help

"for

help.

postgres=# create schema zato_schema;

create schema

zato create odb postgresql --odb_host localhost --odb_port 5432 --odb_user zato1 --odb_db_name zato1 --postgresql_schema zato_schema
刪除的話,把create換成delete

回到頂部

zato create cluster --odb_host localhost --odb_port 5432 --odb_user zato1 --odb_db_name zato1 --postgresql_schema zato_schema postgresql localhost 11223

20151 localhost 6379 prod3 techacc1

回到頂部

ca

zato@ubuntu:~$ zato ca create ca crypto

okzato@ubuntu:~$ cd crypto/zato@ubuntu:~/crypto$ ls

ca-material out-cert out-csr out-priv out-pub

ca-web-admin

zato@ubuntu:~$ zato ca create web_admin ~/crypto

ok

web-admin

zato create web_admin --odb_host localhost --odb_port 5432 --odb_user zato1 --odb_db_name zato1 --postgresql_schema zato_schema ./web-admin postgresql ~/crypto/out-pub/web-admin-pub-2015-08-21_03-03-28.pem ~/crypto/out-priv/web-admin-priv-2015-08-21_03-03-28.pem ~/crypto/out-cert/web-admin-cert-2015-08-21_03-03-28.pem ~/crypto/ca-material/ca-cert.pem techacc1
建立新使用者

zato create user ~/web-admin
回到頂部

ca-lb

zato@ubuntu:~$ zato ca create lb_agent ~/crypto/zato_lb_agent1

ok

lbzato create load_balancer ~/load-balancer ~/crypto/out-pub/lb-agent-pub-2015-08-21_03-25-08.pem ~/crypto/out-priv/lb-agent-priv-2015-08-21_03-25-08.pem ~/crypto/out-cert/lb-agent-cert-2015-08-21_03-25-08.pem ~/crypto/ca-material/ca-cert.pem

回到頂部

ca  server

zato@ubuntu:~$ zato ca create server ~/crypto/prod3 server_132

ok

create server

zato create server --odb_host localhost --odb_port 5432 --odb_user zato1 --odb_db_name zato1 --postgresql_schema zato_schema ~/server_132 postgresql localhost 6379 ~/crypto/out-pub/prod3-server_132-pub-2015-08-21_03-42-20.pem ~/crypto/out-priv/prod3-server_132-priv-2015-08-21_03-42-20.pem ~/crypto/out-cert/prod3-server_132-cert-2015-08-21_03-42-20.pem ~/crypto/ca-material/ca-cert.pem prod3 server_132
start it using the zato start command

zato@ubuntu:~$ zato start web-admin

ok

:每個集群由多個共享同乙個sql和redis資料庫的伺服器構成。因此在普通的機子上建立server時,只需要安裝zato,再建立server。其中的odb和redis所在機器的ip和port要根據具體情況寫。

把server加入到負載平衡中:位置:clusters -> (pick one from the table) -> servers -> add to lb/remove from lb/delete

回到頂部

1. server新增到集群後,lb state為down狀態。

這是因為預設配置有問題。開啟clusters -> (pick one from the table) -> load-balancer,把host和埠改為實際的(檢視server中的配置檔案:~/server_130/config/repo/server.conf)

2. curl localhost:11223/my_service1 -d ''可以,但是curl 192.168.174.130:11223/my_service1 -d ''不可以。

原因:預設配置為127.0.0.1,修改兩個地方

2.1 配置檔案:~/load-balancer/config/repo中的zato.conf和lb-agent.conf,把其中的127.0.0.1修改為實際的ip

2.2 修改集群的名字:clusters -> (pick one from the table) -> edit,把localhost改為實際的ip

nginx集群部署詳解 CEPH集群部署詳解

環境說明 1 建立金鑰 所有節點 ssh keygen t rsa 2 拷貝管理節點的金鑰到其他伺服器上,以實現免密登陸 ssh copy id i root ssh id rsa.pub 192.168.139.99 ssh copy id i root ssh id rsa.pub 192.16...

zookeeper集群部署 kafka集群部署

wget wget 解壓到目錄 tar zxvf apache zookeeper 3.5.8 bin.tar.gz c usr local 進入目錄 cd usr local 建立軟連線 ln s usr local apache zookeeper 3.5.8 zookeeper 複製配置檔案 ...

apache tomcat jk集群部署

本文是基於win7 64位系統apache tomcat集群配置 基於apache 2.4.16 x64 和tomcat 7.0.61 windows x64實現均衡負載 本人採用的是tomcat 7.0.61 windows x64。經我測試,下面的配置在tomcat6或7集群是通用的。但是按照下...