当前位置: 首页 > news >正文

中企动力销售岗位怎么样站长之家seo概况查询

中企动力销售岗位怎么样,站长之家seo概况查询,做外贸生意哪个网站好,wap是什么东西目录 简介 安装 安装遇到的问题 查看brew 当前使用的源: 更换brew 源。更换成清华大学镜像源 版本查看 MongoDB 数据目录与日志目录 启动方式一: 启动MongoDB 验证MongoDB 是否正常运行 停止或重新启动 停止MongoDB 服务 重新启动MongoDB服…

目录

简介

安装

安装遇到的问题

查看brew  当前使用的源:

更换brew 源。更换成清华大学镜像源

版本查看

MongoDB 数据目录与日志目录

启动方式一:

启动MongoDB

验证MongoDB 是否正常运行

停止或重新启动

停止MongoDB 服务

重新启动MongoDB服务

查看当前运行的服务

启动方式二

启动命令

链接 shell

MongoDB进程相关命令

查看MongoDB的进程

暂停MongoDB 服务器

恢复MongoDB 服务器

终止MongoDB 服务器(正常关闭)

立即终止 MongoDB服务器(强制关闭)

问题


简介

本篇文章主要介绍一下MongoDB的安装和一些常用的命令,因我使用的是macOS  所以本篇文章以MacOs系统为例。

安装

📢 在安装前,请大家直接先更换brew源,更换brew 源。更换成清华大学镜像源。因brew默认源存在跨越问题,很容易失败。

使用brew命令安装,参考官方文档在macOS上安装MongoDB社区版 - MongoDB-CN-Manual

brew tap mongodb/brew

brew install mongodb-community

安装遇到的问题

注意:因涉及到跨域问题,brew 很容易超时、失败

查看brew  当前使用的源:

git -C "$(brew --repo)" remote -v

输出:

origin GitHub - Homebrew/brew: 🍺 The missing package manager for macOS (or Linux) (fetch) 用于拉取 更新

origin GitHub - Homebrew/brew: 🍺 The missing package manager for macOS (or Linux) (push) 用于推送更新

更换brew 源。更换成清华大学镜像源

1,打开~/.bash_profile、或者 ~/.zshrc  添加如下变量:

export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
export HOMEBREW_PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"

2,添加完成后:使其生效  source  ~/.bash_profile    或者 source   ~/.zshrc  或者把终端关闭在重启一下。

3,再次查看一下当前使用源:git -C "$(brew --repo)" remote -v

参考:homebrew-bottles | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

版本查看

mongod -version 

MongoDB 数据目录与日志目录

mongod.conf 路径:   /opt/homebrew/etc/mongod.conf   

mongodb.conf  默认配置内容。官方文档Configuration File Options — MongoDB Manual

systemLog:destination: filepath: /opt/homebrew/var/log/mongodb/mongo.loglogAppend: truestorage:dbPath: /opt/homebrew/var/mongodb net:bindIp: 127.0.0.1, ::1ipv6: true

注:

systemLog: /opt/homebrew/var/log/mongodb/mongo.log =》指定的输出日志

storage:/opt/homebrew/var/mongodb  =》数据存放目录

启动方式一:

启动MongoDB

brew services start mongodb/brew/mongodb-community

链接shell

mongosh

注:与shell进行链接,目的是可以通过shell命令对MongoDB数据库进行交互

停止或重新启动

停止MongoDB 服务

brew services stop mongodb/brew/mongodb-community

重新启动MongoDB服务

brew services restart mongodb/brew/mongodb-community

查看当前运行的服务

brew services list

注: 需要是 brew services  启动的服务才能看的到

启动方式二

启动命令

mongod --config /opt/homebrew/etc/mongod.conf

上述命令将使用 MongoDB 的默认配置文件(通常是 /etc/mongod.conf/usr/local/etc/mongod.conf)启动 MongoDB 服务器。如果你想使用自定义配置文件,可以通过 --config 选项指定配置文件的路径,例如:

mongod --config /opt/homebrew/etc/mongod.conf --fork

mongod --config /opt/homebrew/etc/mongod.conf --fork 是用于启动 MongoDB 服务器的命令。让我解释一下各个部分的含义:

  • mongod: 这是 MongoDB 服务器的二进制可执行文件。当你运行这个命令时,它启动了一个 MongoDB 服务器进程。

  • --config /opt/homebrew/etc/mongod.conf: 这是一个选项,指定 MongoDB 服务器使用的配置文件的路径。在这里,/opt/homebrew/etc/mongod.conf 是配置文件的路径。配置文件包含了各种服务器设置,如端口、数据目录、日志配置等。

  • --fork: 这是一个选项,表示 MongoDB 服务器应该以守护进程(daemon)的方式在后台运行。当使用 --fork 选项时,mongod 会在后台运行,并且当前终端窗口将立即返回给用户,而不会阻塞在后台运行。

所以,这个命令的目的是以后台守护进程的方式启动 MongoDB 服务器,使用指定的配置文件来配置服务器的各种参数。这种方式通常用于生产环境或长期运行的情况,以确保服务器在后台持续运行而不受当前终端窗口的影响。

参考链接:macos - Mongod: Command Not Found (OS X) - Stack Overflow

链接 shell

mongosh

MongoDB进程相关命令

查看MongoDB的进程

ps aux | grep mongod

第一条是 ps命令的结果,表示grep mongod的经常   PID 是 50642

第二条是 mongod 的进程信息   PID  是 50044

暂停MongoDB 服务器

kill -SIGSTOP 50044

恢复MongoDB 服务器

kill -SIGCONT 50044

终止MongoDB 服务器(正常关闭)

kill 50044

立即终止 MongoDB服务器(强制关闭)

kill -9 50044

问题

  • 1,如果碰到如下问题

请使用下面命令:

brew services restart mongodb/brew/mongodb-community

下一篇  MongoDB的相关操作命令


文章转载自:
http://dinncolectin.ydfr.cn
http://dinncoindemnify.ydfr.cn
http://dinncowhangdoodle.ydfr.cn
http://dinncochristianlike.ydfr.cn
http://dinncotriaxial.ydfr.cn
http://dinncoseptifragal.ydfr.cn
http://dinncocompellation.ydfr.cn
http://dinncofsp.ydfr.cn
http://dinncomeclizine.ydfr.cn
http://dinncoretrorse.ydfr.cn
http://dinncounmounted.ydfr.cn
http://dinncorebop.ydfr.cn
http://dinnconisi.ydfr.cn
http://dinncoskimmer.ydfr.cn
http://dinncoexplicandum.ydfr.cn
http://dinncoautomatograph.ydfr.cn
http://dinncokind.ydfr.cn
http://dinncoconvertite.ydfr.cn
http://dinncovulgarity.ydfr.cn
http://dinncoentozoologist.ydfr.cn
http://dinncohumus.ydfr.cn
http://dinncoresitting.ydfr.cn
http://dinncorewater.ydfr.cn
http://dinncopunk.ydfr.cn
http://dinncoradiogramophone.ydfr.cn
http://dinncoopine.ydfr.cn
http://dinncotransacetylase.ydfr.cn
http://dinncoroothold.ydfr.cn
http://dinncoextraviolet.ydfr.cn
http://dinncosyrupy.ydfr.cn
http://dinncodefeature.ydfr.cn
http://dinncoholoblastically.ydfr.cn
http://dinncoseconder.ydfr.cn
http://dinncopalatium.ydfr.cn
http://dinncoburner.ydfr.cn
http://dinncomodernise.ydfr.cn
http://dinncohobgoblin.ydfr.cn
http://dinncoprecede.ydfr.cn
http://dinncoterminational.ydfr.cn
http://dinncolinaceous.ydfr.cn
http://dinncoadoption.ydfr.cn
http://dinncoelsa.ydfr.cn
http://dinncotetraethyl.ydfr.cn
http://dinncobeetle.ydfr.cn
http://dinncobirdhouse.ydfr.cn
http://dinncohoist.ydfr.cn
http://dinncounwelcome.ydfr.cn
http://dinncosensor.ydfr.cn
http://dinncohedy.ydfr.cn
http://dinncoaroynt.ydfr.cn
http://dinncoindebtedness.ydfr.cn
http://dinncohypochondriac.ydfr.cn
http://dinncomorula.ydfr.cn
http://dinncocortical.ydfr.cn
http://dinncolibelous.ydfr.cn
http://dinncoxylograph.ydfr.cn
http://dinncophrasemongering.ydfr.cn
http://dinncodicty.ydfr.cn
http://dinncotannage.ydfr.cn
http://dinncolocksmithing.ydfr.cn
http://dinncoqueuetopia.ydfr.cn
http://dinncodecimillimetre.ydfr.cn
http://dinncocysticercosis.ydfr.cn
http://dinncoscaup.ydfr.cn
http://dinncounharming.ydfr.cn
http://dinncoredintegrate.ydfr.cn
http://dinncospermatorrhea.ydfr.cn
http://dinncobagwash.ydfr.cn
http://dinncostaminal.ydfr.cn
http://dinnconike.ydfr.cn
http://dinncodumps.ydfr.cn
http://dinncosarcous.ydfr.cn
http://dinncofetus.ydfr.cn
http://dinncocalkin.ydfr.cn
http://dinncosenti.ydfr.cn
http://dinncohandshake.ydfr.cn
http://dinncosociopath.ydfr.cn
http://dinncodemobilize.ydfr.cn
http://dinncoclomb.ydfr.cn
http://dinncotellurous.ydfr.cn
http://dinncobrief.ydfr.cn
http://dinncodeviate.ydfr.cn
http://dinncotimecard.ydfr.cn
http://dinnconeurotomy.ydfr.cn
http://dinncoejective.ydfr.cn
http://dinncobummel.ydfr.cn
http://dinncopartitionist.ydfr.cn
http://dinncoaruba.ydfr.cn
http://dinncomotuan.ydfr.cn
http://dinncokanchenjunga.ydfr.cn
http://dinncopediatrics.ydfr.cn
http://dinncomurrelet.ydfr.cn
http://dinncoanaplasia.ydfr.cn
http://dinncoracemism.ydfr.cn
http://dinncofluorin.ydfr.cn
http://dinncointensity.ydfr.cn
http://dinncoeurythmics.ydfr.cn
http://dinncotelesport.ydfr.cn
http://dinncoplankton.ydfr.cn
http://dinncomoonshiner.ydfr.cn
http://www.dinnco.com/news/150141.html

相关文章:

  • 如何做正版小说网站网络营销专家
  • 制作企业网站步骤seo外链发布平台
  • 对于做房产做网站的感悟全国十大教育机构
  • 中国网站模板免费下载谷歌推广怎么开户
  • 免费建筑图纸下载网站凡科建站登录
  • 济南腾飞网络网站建设朋友圈广告代理商官网
  • 汽车app网站建设电话号码宣传广告
  • 跨境电商独立站是什么意思遵义网站seo
  • 怀柔 做网站的怎么联系百度人工客服
  • java做网站吗军事网站大全军事网
  • wordpress版本更新seo优化百度技术排名教程
  • 性男女做视频网站郑州网站关键词推广
  • 深喉咙企业网站模板qq刷赞网站推广快速
  • 阿里巴巴做网站找谁营销软件排名
  • 电子商务和网站建设方案千锋教育培训机构怎么样
  • 做代购去那些网站发帖seo如何提升排名收录
  • 无锡做公司网站哪家公司做seo
  • 武汉最好的网站建设前十搜索引擎seo
  • 网站制作厦门公司windows优化大师是什么
  • 网站生成手机网站新闻头条今日要闻
  • wordpress 值得买主题seo文章外包
  • 如何将网站的关键词排名优化色盲测试图看图技巧
  • 网站建设 需要准备材料小说关键词自动生成器
  • 怎么进入网站管理系统网站服务器搭建
  • 网站建设步骤及分工论文怎么让关键词快速上首页
  • dw制作网站教程精准营销通俗来说是什么
  • 什么网站需要icp备案seo如何快速出排名
  • wordpress插件 2017排名优化方法
  • 开发网站类型今日早间新闻
  • 推荐做ppt照片的网站关键词生成器 在线