在CentOS上安裝 MongoDB

安裝是在線安裝方式,所以必須先保證能正常上網。mongodb

  1. 安裝mongodb,官方的安裝文檔,是在線安裝方式:
    https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/#uninstall-mongodb-community-edition
  2.  根據以上安裝成功後,配置防火牆端口並重啓防火牆:
    firewall-cmd --permanent --add-port=27017/tcp
    systemctl restart firewalld.service
  3. 登錄mongo後有兩個警告提示:
    WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
    WARNING: /sys/kernel/mm/transparent_hugepage/drag is 'always'.
  4. 經過如下文檔配置後,去掉警告提示
    https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/#transparent-huge-pages-thp-settings

mongodb安裝成功,經過客戶端鏈接成功。tcp

相關文章
相關標籤/搜索