Centos 7 安装RocksDB
发表于:2025-02-04 作者:千家信息网编辑
千家信息网最后更新 2025年02月04日,1、安装依赖yum -y install lrzsz git gcc gcc-c++ lz4-devel yum -y install snappy snappy-devel zlib zlib-de
千家信息网最后更新 2025年02月04日Centos 7 安装RocksDB
1、安装依赖
yum -y install lrzsz git gcc gcc-c++ lz4-devel yum -y install snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4 lz4-devel zstd
2、下载安装cmake(gflags-2.2.2对cmake版本有要求)
curl -O https://cmake.org/files/v3.6/cmake-3.6.0-Linux-x86_64.tar.gzmv cmake-3.6.0-Linux-x86_64.tar.gz /opt/cd /opt/tar -xvzf cmake-3.6.0-Linux-x86_64.tar.gz yum remove cmakecat >>/etc/profile <3、安装依赖gflags
wget https://github.com/gflags/gflags/archive/v2.2.2.tar.gz我这里是windows下载好上传的文件包tar -xvzf gflags-2.2.2.tar.gzcd gflags-2.2.2/mkdir buildcd build/cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DINSTALL_HEADERS=ON -DINSTALL_SHARED_LIBS=ON -DINSTALL_STATIC_LIBS=ON ..makemake install添加lib信息cat >>/etc/profile <4、下载安装rocksdb
wget https://github.com/facebook/rocksdb/archive/v6.4.6.tar.gz我这里用的是windows下载的包tar -xvzf rocksdb-6.4.6.tar.gz cd rocksdb-6.4.6/mkdir buildcd buildcmake -DCMAKE_INSTALL_PREFIX=/usr/local/rocksdb ..makemake installcat >>/etc/profile <5、ldb工具进行测试
cd rocksdb-6.4.6/build/tools/[root@es1 tools]# ./ldb -helpldb - RocksDB Toolcommands MUST specify --db=when necessaryThe following optional parameters control if keys/values are input/output as hex or as plain strings: --key_hex : Keys are input/output as hex --value_hex : Values are input/output as hex --hex : Both keys and values are input/output as hexThe following optional parameters control the database internals: --column_family= : name of the column family to operate on. default: default column family --ttl with 'put','get','scan','dump','query','batchput' : DB supports ttl and value is internally timestamp-suffixed --try_load_options : Try to load option file from DB. --ignore_unknown_options : Ignore unknown options when loading option file. --bloom_bits= --fix_prefix_len= --compression_type= --compression_max_dict_bytes= --block_size= --auto_compaction= --db_write_buffer_size= --write_buffer_size= --file_size= Data Access Commands: put [--ttl] get [--ttl] batchput [ ] [..] [--ttl] scan [--from] [--to] [--ttl] [--timestamp] [--max_keys= q] [--start_time= :- is inclusive] [--end_time= :- is exclusive] [--no_value] delete deleterange query [--ttl] Starts a REPL shell. Type help for list of available commands. approxsize [--from] [--to] checkconsistencyAdmin Commands: dump_wal --walfile= [--header] [--print_value] [--write_committed=true|false] compact [--from] [--to] reduce_levels --new_levels= [--print_old_levels] change_compaction_style --old_compaction_style= --new_compaction_style= dump [--from] [--to] [--ttl] [--max_keys= ] [--timestamp] [--count_only] [--count_delim= ] [--stats] [--bucket= ] [--start_time= :- is inclusive] [--end_time= :- is exclusive] [--path= ] load [--create_if_missing] [--disable_wal] [--bulk_load] [--compact] manifest_dump [--verbose] [--json] [--path= ] list_column_families full_path_to_db_directory create_column_family --db= drop_column_family --db= dump_live_files idump [--from] [--to] [--input_key_hex] [--max_keys= ] [--count_only] [--count_delim= ] [--stats] repair backup [--backup_env_uri] [--backup_dir] [--num_threads] [--stderr_log_level= ] restore [--backup_env_uri] [--backup_dir] [--num_threads] [--stderr_log_level= ] checkpoint [--checkpoint_dir] write_extern_sst ingest_extern_sst [--move_files] [--snapshot_consistency] [--allow_global_seqno] [--allow_blocking_flush] [--ingest_behind] [--write_global_seqno] [root@es1 tools]# pwd/root/rocksdb-6.4.6/build/tools[root@es1 tools]# ./ldb --db=/tmp/test_db --create_if_missing put a1 b1OK[root@es1 tools]# ./ldb --db=/tmp/test_db scana1 : b1[root@es1 tools]# ./ldb --db=/tmp/test_db get a1b1[root@es1 tools]# ./ldb --db=/tmp/test_db get a2Failed: NotFound: [root@es1 tools]# cd /tmp/test_db/[root@es1 test_db]# ll总用量 536-rw-r--r--. 1 root root 26 11月 20 11:10 000003.log-rw-r--r--. 1 root root 16 11月 20 11:10 CURRENT-rw-r--r--. 1 root root 37 11月 20 11:10 IDENTITY-rw-r--r--. 1 root root 0 11月 20 11:10 LOCK-rw-r--r--. 1 root root 17288 11月 20 11:11 LOG-rw-r--r--. 1 root root 16731 11月 20 11:10 LOG.old.1574219445796772-rw-r--r--. 1 root root 17288 11月 20 11:10 LOG.old.1574219486641937-rw-r--r--. 1 root root 17288 11月 20 11:11 LOG.old.1574219490543572-rw-r--r--. 1 root root 13 11月 20 11:10 MANIFEST-000001-rw-r--r--. 1 root root 5120 11月 20 11:10 OPTIONS-000005[root@es1 test_db]# more 000003.log
信息
工具
文件
版本
用量
好上
文件包
测试
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
几种软件开发方法的优缺点
网络安全是哪个专业范围
计算机网络技术 -吧
计算机网络安全论文
erp网页版 服务器 iis
网络安全教育视频东莞
怀柔区网络软件开发服务保障
安全的云服务器
游戏服务器配置文件用哪种
苏州常用网络技术
戴尔服务器r820开机黑屏
重庆璧山区安卓软件开发企业
唐山伟信网络技术服务公司
数据库三个主要组件
win10数据库服务
数据库查询和更新的区别
ssm向数据库中插入图片
系统集成和软件开发的区别
芯能科技电力互联网
服务器插上电源滴答滴答的响
数据库课程查询
网络技术公司和科技公司区别
什么是数据库 简述其概念
服务器空间最大的手机
服务器的安全性怎么维护
hp服务器 ilo
包含数据库查询
云南数据网络技术服务市场价
geo数据库能查临床数据吗
原神 链接服务器失败