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

网站转化率是什么意思做球迷网站

网站转化率是什么意思,做球迷网站,企业网站有哪些举几个例子,深圳罗湖区网站建设文章目录 步骤 1:配置 MongoDB 官方源步骤 2:安装 MongoDB步骤 3:启动 MongoDB 服务步骤 4:验证安装步骤 5:可选配置注意事项 以下是在 CentOS 系统上直接安装 MongoDB 4.0.25 的详细步骤: 步骤 1&#x…

文章目录

      • 步骤 1:配置 MongoDB 官方源
      • 步骤 2:安装 MongoDB
      • 步骤 3:启动 MongoDB 服务
      • 步骤 4:验证安装
      • 步骤 5:可选配置
      • 注意事项

以下是在 CentOS 系统上直接安装 MongoDB 4.0.25 的详细步骤:


步骤 1:配置 MongoDB 官方源

  1. 使用文本编辑器创建 mongodb-org-4.0.repo 文件:

    sudo vi /etc/yum.repos.d/mongodb-org-4.0.repo
    
  2. 添加以下内容:

    [mongodb-org-4.0]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
    
  3. 保存并退出文件。


步骤 2:安装 MongoDB

  1. 安装指定版本的 MongoDB:

    sudo yum install -y mongodb-org-4.0.25
    
    [root@localhost ~]# sudo yum install -y mongodb-org-4.0.25
    已加载插件:fastestmirror, langpacks
    base                                                                                                       | 3.6 kB  00:00:00     
    centos-sclo-rh                                                                                             | 3.0 kB  00:00:00     
    centos-sclo-sclo                                                                                           | 3.0 kB  00:00:00     
    docker-ce-stable                                                                                           | 3.5 kB  00:00:00     
    extras                                                                                                     | 2.9 kB  00:00:00     
    mongodb-org-4.0                                                                                            | 2.5 kB  00:00:00     
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
    14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
    updates                                                                                                    | 2.9 kB  00:00:00     
    (1/3): docker-ce-stable/7/x86_64/primary_db                                                                | 152 kB  00:00:00     
    (2/3): mongodb-org-4.0/7/primary_db                                                                        | 118 kB  00:00:00     
    (3/3): updates/7/x86_64/primary_db                                                                         |  27 MB  00:00:13     
    Determining fastest mirrors* base: mirrors.nju.edu.cn* centos-sclo-rh: mirrors.nju.edu.cn* centos-sclo-sclo: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
    正在解决依赖关系
    --> 正在检查事务
    ---> 软件包 mongodb-org.x86_64.0.4.0.25-1.el7 将被 安装
    --> 正在处理依赖关系 mongodb-org-mongos = 4.0.25,它被软件包 mongodb-org-4.0.25-1.el7.x86_64 需要
    --> 正在处理依赖关系 mongodb-org-shell = 4.0.25,它被软件包 mongodb-org-4.0.25-1.el7.x86_64 需要
    --> 正在处理依赖关系 mongodb-org-tools = 4.0.25,它被软件包 mongodb-org-4.0.25-1.el7.x86_64 需要
    --> 正在处理依赖关系 mongodb-org-server = 4.0.25,它被软件包 mongodb-org-4.0.25-1.el7.x86_64 需要
    --> 正在检查事务
    ---> 软件包 mongodb-org-mongos.x86_64.0.4.0.25-1.el7 将被 安装
    ---> 软件包 mongodb-org-server.x86_64.0.4.0.25-1.el7 将被 安装
    ---> 软件包 mongodb-org-shell.x86_64.0.4.0.25-1.el7 将被 安装
    ---> 软件包 mongodb-org-tools.x86_64.0.4.0.25-1.el7 将被 安装
    --> 解决依赖关系完成依赖关系解决==================================================================================================================================Package                             架构                    版本                          源                                大小
    ==================================================================================================================================
    正在安装:mongodb-org                         x86_64                  4.0.25-1.el7                  mongodb-org-4.0                  6.2 k
    为依赖而安装:mongodb-org-mongos                  x86_64                  4.0.25-1.el7                  mongodb-org-4.0                  9.6 Mmongodb-org-server                  x86_64                  4.0.25-1.el7                  mongodb-org-4.0                   17 Mmongodb-org-shell                   x86_64                  4.0.25-1.el7                  mongodb-org-4.0                   10 Mmongodb-org-tools                   x86_64                  4.0.25-1.el7                  mongodb-org-4.0                   41 M事务概要
    ==================================================================================================================================
    安装  1 软件包 (+4 依赖软件包)总下载量:78 M
    安装大小:259 M
    Downloading packages:
    警告:/var/cache/yum/x86_64/7/mongodb-org-4.0/packages/mongodb-org-4.0.25-1.el7.x86_64.rpm: 头V3 RSA/SHA1 Signature, 密钥 ID e52529d4: NOKEY
    mongodb-org-4.0.25-1.el7.x86_64.rpm 的公钥尚未安装
    (1/5): mongodb-org-4.0.25-1.el7.x86_64.rpm                                                                 | 6.2 kB  00:00:00     
    (2/5): mongodb-org-mongos-4.0.25-1.el7.x86_64.rpm                                                          | 9.6 MB  00:00:10     
    (3/5): mongodb-org-server-4.0.25-1.el7.x86_64.rpm                                                          |  17 MB  00:00:15     
    (4/5): mongodb-org-shell-4.0.25-1.el7.x86_64.rpm                                                           |  10 MB  00:00:10     
    (5/5): mongodb-org-tools-4.0.25-1.el7.x86_64.rpm                                                           |  41 MB  00:00:23     
    ----------------------------------------------------------------------------------------------------------------------------------
    总计                                                                                              2.0 MB/s |  78 MB  00:00:39     
    从 https://www.mongodb.org/static/pgp/server-4.0.asc 检索密钥
    导入 GPG key 0xE52529D4:用户ID     : "MongoDB 4.0 Release Signing Key <packaging@mongodb.com>"指纹       : 9da3 1620 334b d75d 9dcb 49f3 6881 8c72 e525 29d4来自       : https://www.mongodb.org/static/pgp/server-4.0.asc
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction正在安装    : mongodb-org-shell-4.0.25-1.el7.x86_64                                                                         1/5 正在安装    : mongodb-org-mongos-4.0.25-1.el7.x86_64                                                                        2/5 正在安装    : mongodb-org-tools-4.0.25-1.el7.x86_64                                                                         3/5 正在安装    : mongodb-org-server-4.0.25-1.el7.x86_64                                                                        4/5 
    Created symlink from /etc/systemd/system/multi-user.target.wants/mongod.service to /usr/lib/systemd/system/mongod.service.正在安装    : mongodb-org-4.0.25-1.el7.x86_64                                                                               5/5 验证中      : mongodb-org-4.0.25-1.el7.x86_64                                                                               1/5 验证中      : mongodb-org-server-4.0.25-1.el7.x86_64                                                                        2/5 验证中      : mongodb-org-tools-4.0.25-1.el7.x86_64                                                                         3/5 验证中      : mongodb-org-mongos-4.0.25-1.el7.x86_64                                                                        4/5 验证中      : mongodb-org-shell-4.0.25-1.el7.x86_64                                                                         5/5 已安装:mongodb-org.x86_64 0:4.0.25-1.el7                                                                                               作为依赖被安装:mongodb-org-mongos.x86_64 0:4.0.25-1.el7   mongodb-org-server.x86_64 0:4.0.25-1.el7   mongodb-org-shell.x86_64 0:4.0.25-1.el7  mongodb-org-tools.x86_64 0:4.0.25-1.el7   完毕!
    
  2. 确保所有组件(mongodb-org-servermongodb-org-shell 等)版本一致:

    sudo yum install -y mongodb-org-server-4.0.25 mongodb-org-shell-4.0.25 mongodb-org-mongos-4.0.25 mongodb-org-tools-4.0.25
    
    [root@localhost ~]# sudo yum install -y mongodb-org-server-4.0.25 mongodb-org-shell-4.0.25 mongodb-org-mongos-4.0.25 mongodb-org-tools-4.0.25
    已加载插件:fastestmirror, langpacks
    Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* centos-sclo-rh: mirrors.nju.edu.cn* centos-sclo-sclo: mirrors.nju.edu.cn* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
    软件包 mongodb-org-server-4.0.25-1.el7.x86_64 已安装并且是最新版本
    软件包 mongodb-org-shell-4.0.25-1.el7.x86_64 已安装并且是最新版本
    软件包 mongodb-org-mongos-4.0.25-1.el7.x86_64 已安装并且是最新版本
    软件包 mongodb-org-tools-4.0.25-1.el7.x86_64 已安装并且是最新版本
    无须任何处理
    

步骤 3:启动 MongoDB 服务

  1. 启动 MongoDB:

    sudo systemctl start mongod
    
  2. 设置开机自动启动:

    sudo systemctl enable mongod
    
  3. 检查 MongoDB 服务状态:

    sudo systemctl status mongod
    
    [root@localhost ~]# sudo systemctl status mongod
    ● mongod.service - MongoDB Database ServerLoaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)Active: active (running) since 三 2024-11-20 16:05:27 CST; 29s agoDocs: https://docs.mongodb.org/manualProcess: 85819 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=0/SUCCESS)Process: 85816 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)Process: 85813 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)Process: 85809 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)Main PID: 85824 (mongod)Memory: 43.7MCGroup: /system.slice/mongod.service└─85824 /usr/bin/mongod -f /etc/mongod.conf1120 16:05:27 localhost.localdomain systemd[1]: Starting MongoDB Database Server...
    1120 16:05:27 localhost.localdomain mongod[85819]: about to fork child process, waiting until server is ready for connections.
    1120 16:05:27 localhost.localdomain mongod[85819]: forked process: 85824
    1120 16:05:27 localhost.localdomain mongod[85819]: child process started successfully, parent exiting
    1120 16:05:27 localhost.localdomain systemd[1]: Started MongoDB Database Server.
    

步骤 4:验证安装

  1. 使用 MongoDB 客户端连接:

    mongo
    
    [root@localhost ~]# mongo
    MongoDB shell version v4.0.25
    connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
    Implicit session: session { "id" : UUID("47475de1-f2ee-4899-930f-4af70514c21a") }
    MongoDB server version: 4.0.25
    Welcome to the MongoDB shell.
    For interactive help, type "help".
    For more comprehensive documentation, seehttp://docs.mongodb.org/
    Questions? Try the support grouphttp://groups.google.com/group/mongodb-user
    Server has startup warnings: 
    2024-11-20T16:05:27.656+0800 I CONTROL  [initandlisten] 
    2024-11-20T16:05:27.656+0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
    2024-11-20T16:05:27.656+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
    2024-11-20T16:05:27.656+0800 I CONTROL  [initandlisten] 
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] 
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] 
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
    2024-11-20T16:05:27.657+0800 I CONTROL  [initandlisten] 
    ---
    Enable MongoDB's free cloud-based monitoring service, which will then receive and display
    metrics about your deployment (disk utilization, CPU, operation statistics, etc).The monitoring data will be available on a MongoDB website with a unique URL accessible to you
    and anyone you share the URL with. MongoDB may use this information to make product
    improvements and to suggest MongoDB products and deployment options to you.To enable free monitoring, run the following command: db.enableFreeMonitoring()
    To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
    ---> 
    
  2. 检查版本:

    db.version()
    
    > db.version()
    4.0.25
    

步骤 5:可选配置

  1. 默认配置文件路径
    /etc/mongod.conf

    [root@localhost ~]# cd /etc/
    [root@localhost etc]# cat mongod.conf 
    # mongod.conf# for documentation of all options, see:
    #   http://docs.mongodb.org/manual/reference/configuration-options/# where to write logging data.
    systemLog:destination: filelogAppend: truepath: /var/log/mongodb/mongod.log# Where and how to store data.
    storage:dbPath: /var/lib/mongojournal:enabled: true
    #  engine:
    #  mmapv1:
    #  wiredTiger:# how the process runs
    processManagement:fork: true  # fork and run in backgroundpidFilePath: /var/run/mongodb/mongod.pid  # location of pidfiletimeZoneInfo: /usr/share/zoneinfo# network interfaces
    net:port: 27017bindIp: 127.0.0.1  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.#security:#operationProfiling:#replication:#sharding:## Enterprise-Only Options#auditLog:#snmp:
    
  2. 编辑配置文件(如修改监听端口或数据存储路径):

    sudo vi /etc/mongod.conf
    
    • 修改数据目录:
      storage:dbPath: /var/lib/mongo
      
    • 修改监听端口:
      net:port: 27017bindIp: 0.0.0.0
      
  3. 保存后重启服务:

    sudo systemctl restart mongod
    

注意事项

  • 默认数据目录/var/lib/mongo
  • 默认日志目录/var/log/mongodb
  • 默认监听端口27017

如需更改这些路径,请在 /etc/mongod.conf 中编辑并保存后重启服务。


这样就可以在 CentOS 上安装 MongoDB 4.0.25 并运行!

在这里插入图片描述

http://www.yayakq.cn/news/988951/

相关文章:

  • 腾讯云服务器怎么搭建网站炫酷的网页特效
  • 做产品网站营销推广广告营销公司
  • 互联网网站开发有哪些职位网站的页面布局
  • 五核网站建设基础建设基金有哪些
  • 西三旗网站建设qq邮箱在线登录网页版
  • 成都网站建设优化前十青岛网站快速备案
  • 使用动易模版制作网站崇左市城市投资建设有限公司网站
  • 陇南网站定制开发公司高校网站建设近期情况说明
  • 邮箱注册网站查询电商网站商品表设计
  • 做的好看的pc端网站企业网站建设免费
  • 常见的有利于seo的网站系统网页设计软件培训机构
  • 门户网站建设管理工作自查报告怎样注册网店开网店
  • 广州新际网站建设pc端好玩的大型网游
  • 如何建设网站使用成都网站建设门户
  • 清空回收站 wordpress推动政务网站建设
  • 徐州手机网站优化公司做自媒体需要用的网站
  • 南城网站仿做浏览器秒玩小游戏入口
  • 曲阜网站建设哪家便宜资源seo网站优化排名
  • 网站平均停留时间网页设计模板百度云
  • 网站规划内容有哪些做头像的网站
  • 江苏建设工程网站凡科网企业账号登录
  • 天津魔方网站建设百度怎么发布广告
  • 做兽设的网站wordpress修改文章页面
  • 湖南营销型网站国际网络交易平台
  • 静态网站建设步骤wordpress 文章多了
  • 网站图片用什么格式三星网上商城发什么快递
  • 意识形态网站建设商务网站开发背景
  • 企业内部网站如何建设杭州市建设工程招标投标网
  • 哪里的网站建设好前端写一个页面多少钱
  • 网页网站原型图占位符怎么做企业申请网站建设请示