在 Manjaro 上安装 MongoDB [英] Install MongoDB on Manjaro

查看:33
本文介绍了在 Manjaro 上安装 MongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Manjaro Linux 上安装 MongoDB 社区服务器时遇到困难.

I'm facing difficulties installing the MongoDB community server on Manjaro Linux.

没有关于如何在基于 Arch 的系统上安装它的官方文档,而且 Pacman 在 AUR 存储库中找不到它.

There isn't official documentation on how to install it on Arch-based systems and Pacman can't find it in the AUR repos.

有人试过安装吗?

推荐答案

这是我安装的内容.

由于软件包不可用在官方 Arch 仓库中,无法使用 pacman 安装,需要按照几个步骤安装.

As the package is not available in the official Arch repositories and can't be installed using pacman, you need to follow a few steps to install it.

首先,您需要从 AUR 获取预构建二进制文件的存储库的 URL.它可以在这里找到,在撰写本文时它是https://aur.archlinux.org/mongodb-bin.git

First, you need to get the URL for the repo of prebuilt binaries from AUR. It can be found here and by the time of writing this it was https://aur.archlinux.org/mongodb-bin.git

只需将 repo 克隆到您的主目录或其他任何位置.执行git clone https://aur.archlinux.org/mongodb-bin.git,然后前往克隆的目录,cd mongodb-bin.

Simply clone the repo in your home directory or anywhere else. Do git clone https://aur.archlinux.org/mongodb-bin.git, then head to the cloned directory, cd mongodb-bin.

现在,您需要做的就是运行 makepkg -si 命令来制作包.-s 标志将为您处理依赖项,-i 标志将安装包.

Now, all you need to do is to run makepkg -si command to make the package. the -s flag will handle the dependencies for you and the -i flag will install the package.

makepkg 执行完毕后,不要忘记启动mongodb.service.运行 systemctl start mongodb 并在需要时使用 systemctl enable mongodb 启用它.

After makepkg finishes its execution, don't forget to start mongodb.service. Run systemctl start mongodb and if needed enable it with systemctl enable mongodb.

在终端中输入 mongo,如果 Mongo Shell 运行,你就全部设置好了.

Type mongo in the terminal and if the Mongo Shell runs you are all set.

后期编辑(8.2.2021):这个包现在在 AUR 中可用.

Later edit (8.2.2021): This package is now available in AUR.

这篇关于在 Manjaro 上安装 MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆