简体   繁体   English

如果显然已删除端口,如何在FreeDSB上安装MongoDB?

[英]How do I install MongoDB on FreeDSB if the port was apparently removed?

Running sudo pkg install mongodb produces an error stating that no such package exists. 运行sudo pkg install mongodb会产生错误,指出不存在这样的软件包。 I figured this is because it says on this website https://www.freshports.org/databases/mongodb/ that the MongoDB port has expired and has been removed. 我认为这是因为它在此网站https://www.freshports.org/databases/mongodb/上表示MongoDB端口已过期并已被删除。 How do I get a version of MongoDB on my FreeBSD server now? 我现在如何在我的FreeBSD服务器上获得MongoDB的版本?

I recommend that every time you want to install a package you perform a pkg search 我建议您每次要安装软件包时都执行pkg搜索

pkg search packagename

For MongoDB: 对于MongoDB:

root@demo:/ # pkg search mongodb
mongodb32-3.2.11_2             Distributed document-oriented "NoSQL" database
mongodb32-tools-3.2.11         Tools for MongoDB
mongodb34-3.4.16               Distributed document-oriented "NoSQL" database
mongodb34-tools-3.4.9          Tools for MongoDB
mongodb36-3.6.6_2              Distributed document-oriented "NoSQL" database
mongodb36-tools-3.6.3          Tools for MongoDB
p5-Mojolicious-Plugin-Mongodb-1.16_1 Use MongoDB in Mojolicious
p5-MongoDB-2.0.1               Mongo Driver for Perl
php56-pecl-mongodb-1.5.2       PECL classes for MongoDB
php70-pecl-mongodb-1.5.2       PECL classes for MongoDB
php71-pecl-mongodb-1.5.2       PECL classes for MongoDB
php72-pecl-mongodb-1.5.2       PECL classes for MongoDB
py27-mtools-mongodb-1.2.3_2    Setup test environments; parse, filter and visualize MongoDB log files
py27-nagios-check_mongodb-0.1  Nagios plugin to check mongodb server

As you can see there are mongodb32, mongodb34 and mongodb36 You can then perform the following: 如您所见,有mongodb32,mongodb34和mongodb36,然后可以执行以下操作:

pkg install mongodb36-3.6.6_2

You could also install packages from ports but it's more time consuming and in the most cases is not necessary, unless you want to enable custom flags/modules to your mongodb installation. 您也可以从端口安装软件包,但是这比较耗时,并且在大多数情况下是没有必要的,除非您要为mongodb安装启用自定义标志/模块。

https://www.freebsd.org/doc/handbook/ports-using.html https://www.freebsd.org/doc/handbook/ports-using.html

There is a note on the website you linked to that the MongoDB port was moved to databases/mongodb34 . 您链接到的网站上有一条注释,指出MongoDB端口已移至database / mongodb34

Chapter 4.4. 4.4。 Using pkg for Binary Package Management of the FreeBSD Handbook might help you to deal with the situation you describe (especially 4.4.9. Modifying Package Metadata ). 在FreeBSD手册的Binary Package Management使用pkg可能会帮助您处理您所描述的情况(尤其是4.4.9。Modifying Package Metadata )。

I am not sure, however, if there is an easy update path. 但是,我不确定是否有简单的更新路径。 I've never tried it. 我从来没有尝试过。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM