[TUTO] Install Entware (opkg)

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
User avatar
MaitreKuc
Posts: 8
Joined: 06 Aug 2020, 03:43

[TUTO] Install Entware (opkg)

Post by MaitreKuc »

Hello everyone,

I tried to install pip3 on my NAS F2-220, but there was a problem preventing its installation.
I had tried Xpenology some time ago and used Entware to install other packages than those available on the official store.
So I saw if I could install it under TOS.
And it works, only on X86_64, I don't have an ARM NAS .

1 - Connect in ssh to your NAS, as root :
(Under Windows 10)

Code: Select all

ssh root@YOUR_NAS_IP -p 9222
(9222 is the default port)

2 -Run the command

Code: Select all

ln -s /usr/bin/ter_wget /usr/bin/wget
3 -Create the directory

Code: Select all

mkdir -p /mnt/md0/@entware/opt
4 - Run the command

Code: Select all

ln -s /mnt/md0/@entware/opt /opt
5 -Run the command

Code: Select all

wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh
Normally everything is OK !

7 - Run the command

Code: Select all

ln -s /opt/bin/opkg /usr/bin/opkg
8 - Now you have to modify the PATH, it is in "/etc/profile", so run the command

Code: Select all

vi /etc/profile
to the line where is " export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin ", add at the end " :/opt/bin:/opt/sbin "
You should have " export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin "

9 - Save and exit

10 - Run the command

Code: Select all

source /etc/profile
11 - Restart your NAS

12 - Reconnect in ssh and run the command

Code: Select all

opkg update
13 - And finally to test, we install nano (text editor)

Code: Select all

opkg install nano
14 - To uninstall

Code: Select all

opkg remove nano

Source : https://github.com/Entware/Entware/wiki
List of available packages : http://bin.entware.net/x64-k3.2/

WARNING :
Normally your NAS will still work fine, but still be careful.
There is no official support for our NAS.
I did these tests on my NAS without any data, I am not responsible for any data loss.


 
NAS : F2-220
User avatar
macmpi
Posts: 120
Joined: 07 Jan 2020, 02:52

Re: [TUTO] Install Entware (opkg)

Post by macmpi »

hum, very interesting indeed!
Thanks for the work: hope this can be suitable on ARM too, and can gain some official support status, like on other competing platforms.
TerraMaster F2-210 under TOS 4.2.43, RAID1, Btrfs, serving Mac, Linux & Windows clients
User avatar
scavenger_ro
Posts: 26
Joined: 01 Oct 2020, 00:36

Re: [TUTO] Install Entware (opkg)

Post by scavenger_ro »

Could I finally install MC? I need to try this!
Many thanks!
F2-423 proudly running UnRaid
1x Verbatim Store 'n' Stay Nano USB 3.0 32GB (BOOT)
2x 16GB Kingston KVR32S22S8/16 RAM (blocked by Terramaster)
2x 512GB SSD Samsung 970 EVO, BTRFS cache Raid 1
2x 10TB WD White Labels Helium Drives, BTRFS Parrity + Data.
User avatar
morozsm
Posts: 2
Joined: 27 Oct 2020, 11:43

Re: [TUTO] Install Entware (opkg)

Post by morozsm »

Hello!

Man, that's a really cool article! It fixes a lot of issues!
Thank you!
User avatar
phreich
Posts: 5
Joined: 23 Nov 2020, 13:26

Re: [TUTO] Install Entware (opkg)

Post by phreich »

Many thanks to @MaitreKuc for posting these instructions!

I successfully ran them and installed the Entware opkg manager on my new F2-221 TerraMaster NAS running the latest version of TNAS.

I have cross-posted these instructions as a WIKI "Install on..." page for the Entware Repo, giving full credit to @MaitreKuc for his post here to make sure those that have a TerraMaster NAS can find these instructions.

One comment -- the above instructions don't mention that you must first enable SSH in the TNAS settings.

Also, for those of us used to running the freeware utility PuTTY for our SSH session terminal windows, you specify your internal network address for your NAS, and specify port 9222 (the TNAS default), then enter "root" when prompted for a username and press <enter>, and your TNAS admin password when prompted for the password and press <enter>.

A helpful hint to PuTTY users working on large displays -- if you want to have your session window have a larger font size, go into the PuTTY settings, click on the general window setting, and for the "When window is resized:" option select the "change the size of the font" option for your window, and then you can simply drag a corner of the window to expand it, and the text will increase automatically with the size of the window.

Thanks again!
User avatar
demetry14
Posts: 20
Joined: 22 Nov 2020, 05:23

Re: [TUTO] Install Entware (opkg)

Post by demetry14 »

Worked for me on F4-210

I just changed:
THIS:
wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh

TO THIS:
wget -O - http://bin.entware.net/armv7sf-k3.2/ins ... generic.sh | /bin/sh

I then immediately installed NetData!
opkg install netdata
~~
Demetry

F2-210
F4-210
User avatar
macmpi
Posts: 120
Joined: 07 Jan 2020, 02:52

Re: [TUTO] Install Entware (opkg)

Post by macmpi »

demetry14 wrote: 30 Jan 2021, 06:40 Worked for me on F4-210
wget -O - http://bin.entware.net/armv7sf-k3.2/ins ... generic.sh | /bin/sh
As Fx-210 series are armv8, I would expect you could pick the aarch64-k3.10 version, no?
http://bin.entware.net/aarch64-k3.10/in ... generic.sh
TerraMaster F2-210 under TOS 4.2.43, RAID1, Btrfs, serving Mac, Linux & Windows clients
User avatar
demetry14
Posts: 20
Joined: 22 Nov 2020, 05:23

Re: [TUTO] Install Entware (opkg)

Post by demetry14 »

macmpi wrote: 30 Jan 2021, 17:53
demetry14 wrote: 30 Jan 2021, 06:40 Worked for me on F4-210
wget -O - http://bin.entware.net/armv7sf-k3.2/ins ... generic.sh | /bin/sh
As Fx-210 series are armv8, I would expect you could pick the aarch64-k3.10 version, no?
http://bin.entware.net/aarch64-k3.10/in ... generic.sh
Yes, you could. Its all about which you want/need.
~~
Demetry

F2-210
F4-210
User avatar
Daywalker
Posts: 35
Joined: 19 Mar 2021, 19:07
France

Re: [TUTO] Install Entware (opkg)

Post by Daywalker »

Hi,

I successfully install Entware on my F5-221 but when I install netdata, there is no error but I couldn't go to web page on port 19999. nothing happened.

Help me please
F5-422
User avatar
TMUser
Posts: 3
Joined: 29 Dec 2021, 05:36

Re: [TUTO] Install Entware (opkg)

Post by TMUser »

You are incredible! Thank you for this, I was looking to get a package manager for a long time but I kinda lost hope...

If you guys have issues on step 5:
MaitreKuc wrote: 13 Sep 2020, 23:395 -Run the command

Code: Select all

wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh
You have to run the following (as root):

Code: Select all

uname -a
This will tell you which architecture your NAS is running. Mine is aarch64.
Image
Then you simply go to https://bin.entware.net/ and find your architecture package.
You then replace x64-k3.2 in the wget command with your architecture.

Finally we have a package manager! Woohoo, I'm able to unrar files from my NAS 8-)
Post Reply