国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Ubuntu > 正文

ahjesus 安裝mongodb企業版for ubuntu

2024-06-28 13:26:36
字體:
來源:轉載
供稿:網友
ahjesus 安裝mongodb企業版for Ubuntu

導入共匙

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

創建源列表

echo 'deb https://repo.mongodb.com/apt/ubuntu PRecise/mongodb-enterprise/stable multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list

刷新包

sudo apt-get update

安裝企業版

sudo apt-get install mongodb-enterprise

防止意外升級到最新版,可以運行如下命令

echo "mongodb-enterprise hold" | sudo dpkg --set-selectionsecho "mongodb-enterprise-server hold" | sudo dpkg --set-selectionsecho "mongodb-enterprise-shell hold" | sudo dpkg --set-selectionsecho "mongodb-enterprise-mongos hold" | sudo dpkg --set-selectionsecho "mongodb-enterprise-tools hold" | sudo dpkg --set-selections

啟動運行

sudo /etc/init.d/mongod start

驗證啟動成功

驗證是否啟動成功可以到日志文件查看,具體位置在 /var/log/mongodb/mongod.log.

停止

sudo /etc/init.d/mongod stop

重啟

sudo /etc/init.d/mongod restart
附:update失敗 提示有一個舊項的解決辦法更新源至國內我用的是阿里云的源具體的操作是 vi /etc/apt/sources.list  在文件最前面添加以下條目(!!!操作前請做好相應備份!!!)
  deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse  deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse  deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse  deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse  deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse  deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

配置文件

#fork=true #以守護進程的方式運行MongoDB,創建服務器進程,linux有效dbpath=D:/Ruby/mongo/db #指定數據庫路徑logpath=D:/Ruby/mongo/logs/db.log #指定MongoDB日志文件,注意是指定文件不是目錄logappend=true #使用追加的方式寫日志journal=true #啟用日志選項,MongoDB的數據操作將會寫入到journal文件夾的文件里pidfilepath=D:/Ruby/mongo/pids/db.pid #PID File 的完整路徑,如果沒有設置,則沒有PID文件bind_ip=127.0.0.1 # 綁定服務IP,若綁定127.0.0.1,則只能本機訪問,不指定默認本地所有IPport=1986 #指定服務端口號,默認端口27017directoryperdb=true #設置每個數據庫將被保存在一個單獨的目錄oplogSize=100 #設置oplog的大小(MB)auth=true #啟用驗證

具體如何配置 移步官網企業版介紹中查詢

The package configures MongoDB using the/etc/mongod.conffile in conjunction with the control scripts.


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 出国| 镇康县| 金平| 潼南县| 繁昌县| 佳木斯市| 连南| 聂拉木县| 陇西县| 长武县| 灵宝市| 新绛县| 和静县| 禹城市| 卢龙县| 正阳县| 黄龙县| 个旧市| 日喀则市| 安新县| 仙游县| 河池市| 东源县| 福鼎市| 新郑市| 法库县| 双桥区| 锡林浩特市| 定襄县| 金寨县| 兴隆县| 济宁市| 海门市| 河津市| 探索| 新竹市| 康马县| 浦江县| 静海县| 长垣县| 惠来县|