JeecgBoot集成寶蘭德CacheDB
作者:admin
發(fā)布時(shí)間:2024-02-22
點(diǎn)擊數:
BES CacheDB介紹
BES CacheDB (簡(jiǎn)稱(chēng)BCD)是一款寶蘭德自研的分布式高性能KV存儲數據庫,可完全兼 容Redis協(xié)議標準,支持基于內存和文件的持久化存儲,保證數據的安全可靠。主要解決高并發(fā)、 大數據量場(chǎng)景下的數據訪(fǎng)問(wèn)性能問(wèn)題,具有高性?xún)r(jià)比、高可靠、彈性伸縮、高可用等特點(diǎn)。
BCD部署(單機)
本文采用單節點(diǎn)部署模式,生產(chǎn)環(huán)境請使用集群部署方式。
單節點(diǎn)部署
1、獲取 BCD
發(fā)行版打包文件以及license
文件,并上傳至服務(wù)器。2、解壓部署包,進(jìn)入 bin
目錄。
# cd /opt/cacheServer/master/
# tar -zxvf CACHESERVER-3.1.0-RHEL6-X64.tar.gz
# CACHESERVER-3.1.0-RHEL6-X64/bin/
3、執行命令: ./initstore
初始化存儲。
# ./initstore
4、執行命令 ./startManagement
啟動(dòng)管理中心。
# ./startManagement
Starting BES Cache Server...
More information refer to server log (default:/opt/cacheServer/master/CACHESERVER-3.1.0-RHEL6-X64/logs/server.log)
[root@VM-16-8-opencloudos bin]# tail -f ../logs/server.log
##|2023-12-25 16:42:08.793|INFO|server|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Creating Resource(id=comp/DefaultContextService)|##
##|2023-12-25 16:42:09.088|INFO|deployment|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Assembling app: /opt/cacheServer/master/CACHESERVER-3.1.0-RHEL6-X64/server/lib/system/apps/sysapp|##
##|2023-12-25 16:42:09.822|INFO|com.bes.enterprise.appserver.snapshot.auto.AutoSnapshotFactory|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|The auto snapshot service configuration was not found, it will be ignored.|##
##|2023-12-25 16:42:09.861|INFO|web|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Loading application sysapp at [/sysapp].|##
##|2023-12-25 16:42:09.862|INFO|deployment|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Started Application(path=sysapp)|##
##|2023-12-25 16:42:10.118|INFO|configuration|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Configuring enterprise application: /opt/cacheServer/master/CACHESERVER-3.1.0-RHEL6-X64/system/console|##
##|2023-12-25 16:42:13.617|INFO|deployment|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Assembling app: /opt/cacheServer/master/CACHESERVER-3.1.0-RHEL6-X64/system/console|##
##|2023-12-25 16:42:14.140|INFO|web|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|1 Spring WebApplicationInitializers detected on classpath|##
##|2023-12-25 16:42:14.535|INFO|web|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.|##
##|2023-12-25 16:42:14.546|INFO|web|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Initializing Spring root WebApplicationContext|##
##|2023-12-25 16:42:25.847|INFO|web|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Loading application console at [/console].|##
##|2023-12-25 16:42:25.847|INFO|deployment|_ThreadID=42;_ThreadName=DeploymentService-deployment-on-startup|Started Application(path=console)|##
##|2023-12-25 16:42:26.531|INFO|web|_ThreadID=1;_ThreadName=main|Started compress log service.|##
##|2023-12-25 16:42:26.531|INFO|web|_ThreadID=1;_ThreadName=main|Server startup in 18584 ms|##
##|2023-12-25 16:42:26.676|INFO|web|_ThreadID=17;_ThreadName=Thread-3|Using a shared selector for servlet write/read|##
5、 打開(kāi)瀏覽器,通過(guò)
http://ip:4900/console
訪(fǎng)問(wèn)管理中心控制臺。
6、點(diǎn)擊節點(diǎn)管理,新建節點(diǎn)
7、點(diǎn)擊實(shí)例管理,新增實(shí)例組
8、配置實(shí)例端口和訪(fǎng)問(wèn)密碼
9、返回實(shí)例管理,點(diǎn)擊啟動(dòng),啟動(dòng)實(shí)例組
JeecgBoot集成TongRDS配置及測試
1、 打開(kāi)
JeecgBoot
項目配置文件,修改redis連接配置與上文一致。
2、啟動(dòng)項目,項目成功啟動(dòng)未報錯。
3、啟動(dòng)前端項目,并訪(fǎng)問(wèn)登錄,未見(jiàn)異常。
4、使用
Redis
客戶(hù)端工具連接BCD
查看。緩存數據已正常存入BCD
中。
至此JeecgBoot
集成BES CacheDB
完成。