当前位置: 首页 > 工具软件 > ZoneMinder > 使用案例 >

ZoneMinder集群安装

关正雅
2023-12-01

1、配置文件

编辑1081服务器zm.conf

vim /etc/zm/zm.conf

修改ZM_DB_HOS为1080数据库服务器的IP地址。 ZM_SERVER_HOST修改为自己的名字。

ZM_DB_HOST=10.109.6.80
ZM_SERVER_HOST=gj-1081

1082亦同

ZM_DB_HOST=10.109.6.80
ZM_SERVER_HOST=gj-1082

2、数据库

进入1080数据库。

MariaDB [(none)]>mysql -u root -p
MariaDB [(none)]>zm_create.sql
MariaDB [(none)]>"grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
MariaDB [(none)]>GRANT ALL PRIVILEGES ON *.* TO 'zmuser'@'%' IDENTIFIED BY 'zmpass' WITH GRANT OPTION;
MariaDB [(none)]>FLUSH PRIVILEGES;

把/etc/mysql/mariadb.conf.d/50-server.cnf 下面的bind-address 注释掉

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           = 127.0.0.1
service mysql restart
service mariadb restart
service mysqld restart

3、gj-1080 web填写服务器内容。

选项→server 填写所有服务器内容

名称	Url	PathToIndex	PathToZMS	PathToApi	状况	监视器	CpuLoad	Free/Total Memory	Free/Total Swap	RunStats	RunAudit	RunTrigger	RunEventNotification	标记
gj-1080	http://10.109.6.80:80	/zm/index.php	/zm/cgi-bin/nph-zms	/zm/api	Running	0	0.1	6.35GB / 6.87GB	7.81GB / 7.81GB	yes	yes	no	no	
gj-1081	http://10.109.6.81:80	/zm/index.php	/zm/cgi-bin/nph-zms	/zm/api	Running	10	0.5	4.15GB / 6.87GB	7.81GB / 7.81GB	yes	yes	no	no	
gj-1082	http://10.109.6.82:80	/zm/index.php	/zm/cgi-bin/nph-zms	/zm/api	Running	8	0.6	4.66GB / 6.93GB	7.81GB / 7.81GB	yes	yes	no	no	

4、共享存储添加。

 类似资料: