FreeBSD pkgs

Status
Not open for further replies.

balanga

Patron
Joined
Jul 10, 2014
Messages
271
How do I install FreeBSD pkgs? Or is that a dumb question?

I'd really like to have access to midnight commander to help find my way around the filesystem, but running

pkg install misc/mc

reports that there is no /usr/ports/packages/meta.txz

Do I need to install ports?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You need to use jails.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
...and to make explicit what has heretofore been implicit in the responses, you don't (or at least shouldn't) install anything inside FreeNAS itself. It's an appliance, let it be.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Though I'll note that there's a chance you could run something like MC that is installed within a jail, on the host system, if it's compiled static....
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
...and to make explicit what has heretofore been implicit in the responses, you don't (or at least shouldn't) install anything inside FreeNAS itself. It's an appliance, let it be.

Does that mean that FreeNAS itself is not extensible, and can't add my favourite tools to it? Am I limited to vi as the editor?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Does that mean that FreeNAS itself is not extensible, and can't add my favourite tools to it? Am I limited to vi as the editor?
ee is a very good editor, but you should not be attempting to change what's installed on FreeNAS.

If you never plan on updating your FreeNAS install, then go for it. But you run a very high risk of data loss and downtime if you try to install too much in the core os. It isn't worth it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
No, you aren't limited to vi. At a minimum, you have ee and nano available for editors. But yes, it's correct that you can't (or at least shouldn't) add tools to FreeNAS itself. Most of what you'd want to do can likely be done in one or more jails, but if you really want to mess with the base system, you might be better off just installing FreeBSD.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
For the record, I don't see much need to regularly use a text editor on FreeNAS.
On the odd occasion when one is needed, ee is plenty. Do the heavy editing on your clients with your favorite editor.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Direct, concise and informative. We expect nothing less from you. :D
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
But seriously now, I was trying to make a point before. The question was about MC. Putting that in a jail isn't extremely helpful because the usual reason people want a tool like that is to look at the NAS filesystems. You can hack around that, yes, but you can also compile software in the jail, leave it located there, and then still run the resulting executable in the host NAS environment. It's a little cheat-y but it can work.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
But seriously now, I was trying to make a point before. The question was about MC. Putting that in a jail isn't extremely helpful because the usual reason people want a tool like that is to look at the NAS filesystems. You can hack around that, yes, but you can also compile software in the jail, leave it located there, and then still run the resulting executable in the host NAS environment. It's a little cheat-y but it can work.


Can't I just copy MC from a FreeBSD machine to my FreeNAS usb stick?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yes. No. Kinda. You shouldn't.

What you really want to do is to copy MC from a FreeBSD machine to a directory on your FreeNAS pool.

That's an alternative, not-as-good way to do what I suggested, which was to try putting it in a jail but running it from the FreeNAS host. If you just copy an executable, there's very little to guarantee that dependencies (think: shared libs) are going to be available. Doing the jail on the FreeNAS doesn't truly fix that, but does guarantee that all the bits needed are at least already on the FreeNAS platform.

And you're not supposed to modify the base appliance, because, after all, it's an appliance, and when you upgrade it, you need to have given some thought as to how that's going to work, which just sticking a binary on the USB stick isn't an example of. Thinking it all through, that is. Which I have. Which is why you'll note that I suggested both compiling it on a jail on the FreeNAS host AND compiling it statically, because that's actually your best shot at doing this and having it work, while also being survivable through upgrades, etc.

You can do a lot of other things and it might work or it could work or it might end up halfarse. Feel free to disregard the advice.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Just to let let everyone know, I ended up copying mc from a PCBSD installation to the base FreeNAS system and it works OK. I realise that this isn't what has been recommended but the suggestions I've had seemed too difficult for a newbie like me. In any case, I see mc as part of the base installation of the os as it is basically just a tool rather than an application - an extended 'ls' if you like :)
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Just to let let everyone know, I ended up copying mc from a PCBSD installation to the base FreeNAS system and it works OK. I realise that this isn't what has been recommended but the suggestions I've had seemed too difficult for a newbie like me. In any case, I see mc as part of the base installation of the os as it is basically just a tool rather than an application - an extended 'ls' if you like :)
Until you update FreeNAS....
 
Status
Not open for further replies.
Top