安装Postgre-R spread 受挫折
9812 2003-04-21 06:37:19 谁能帮我装上
HA + PostgreSQL
现有2000分.全送..
安装Postgre-R spread 受挫折 五, 18 四月 2003 20:34
这么费劲么?
a pure, powerful, straight, strong beam of light
[向版主推荐这条信息]
netkiller
Member
发贴数: 77
地区: 深圳特区
注册时间:
三月 2003
回复:安装Postgre-R spread 受挫折 五, 18 四月 2003 23:00
超动时要加-r
postmaster -r -i -D /usr/local/pgsql/data
它说-r不存在。
环境:
两天PC
PC1 192.168.1.5 安装PGSQL与spread Master 主数据库服务器
PC2 192.168.1.10 安装PGSQL Slave
我的安装过程是
tar zxvf spread
tar zxvf postgresql
cd spread
./configure --prefix=/usr/local/spread
make
make install
adduser postgres
cd postgresql
./configure --prefix=/usr/local/pgsql --with-repl-spread=spread_dir
make
make install
su postgres
initdb /usr/local/pgsql
postmaster -i -D /usr/local/pgsql/data
测试
createdb (成功)
psql -l (成功并可以建表)
killall postmaster
安装过程中没有出错。
配置
vi spread.conf
Spread_Segment 127.0.0.255:4803 {
linux1 192.168.1.10
}
上面配置我不解的是。这样写linux1 192.168.1.10 对不对。
linux1 加一台服务器,是我要同步的数据。上面安装好了。并测试可以使用
另一疑问:要不要把自己写加到spread.conf中。如:
Spread_Segment 127.0.0.255:4803 {
localhost 127.0.0.1
linux1 192.168.1.10
}
or
Spread_Segment 127.0.0.255:4803 {
linux0 192.168.1.5
linux1 192.168.1.10
}
启动spread
./spread &
启动
repl_max_remote_processes = 4 # number of remote backends
repl_mgr_port = 5430 # Replication manager port
repl_spread_port = 4803 # Port used for the spread daemon (see spread.conf file)
repl_spread_host = 'localhost' # Host of the spread daemon
repl_spread_group = 'replicationGroup' # The name of the spread group
repl_database = 'testing' # Name of the database being replicated
repl_user = 'postgres' # Name of the user used to replicate data (from step 5)
以上的设置。我不明白。是加在postgres.conf后面还是系统环境变量。
我加在postgres.conf中说没有那些定义。。我在控制台下运行设为环境变量。是OK的。。
然后就是启动PGSQL
postmaster -i -D /usr/local/pgsql/data
启动。。OK
问?????如何测试。
我如何建库,建表,
我应该在PC1上。建库,建表,添加数据的操作会自动同步到PC2上吗???
还是我要在PC1,PC2,上建库,建表。
然后在PC1上添加数据 后会同步到PC2上。。
我看它的说明上说,它是Peer to Peer 这样就可以。。
在PC1,PC2上添加数据。都会同步到对方????
哎。很多很多问号呀?????
E文太差。看的我模模糊糊。。。云山雾照???:(