King Zone - Entware
type: channel
link: https://www.kingtam.win/tag/Entware/
items: Synology DSM Customization: Unlocking the Potential of NAS
items: 入坑IMTNAS星際魔盒2 - 部署 Entware 倉庫軟件到IMTNAS星際魔盒

Synology DSM Customization: Unlocking the Potential of NAS
type: item
date: 2023-06-21T13:44:00+08:00
description: Synology DSM Customization: Unlocking the Potential of NASdsm-custom.jpgimage from unsplashAboutAs you know, Synology NAS devices are based on the Linux kernel, but they have some function limitations that make installing applications not as easy as using package management systems like apt, yum, or dnf. Also, commands like usermod and groupadd don't actually exist on Synology NAS.Sudo without Password (Option)Eable SSH on Synology2023-06-21_090947.pngRemove the need to enter a password each time sudo is used.Log in to Synology DSM using ssh with an account that has sudo permissions.$(whoami) is the current username, which is up to you.Update the permission to read-only.current_user=$(whoami) echo "$current_user ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/"$current_user" sudo chmod 440 /etc/sudoers.d/"$current_user"Install Entware on Synology DSMEntware has been adapted for Synology's DSM as a software repository.Create a folder on your HDDmkdir -p /volume1/@Entware/optRemove /opt and mount the Optware folder.Make sure that the /opt folder is empty (Optware is not installed). Remove the /opt folder with its contents in this step.rm -rf /opt mkdir /opt mount -o bind "/volume1/@Entware/opt" /optNote: If the bind command doesn't work, try creating a link instead:ln -s /volume1/@Entware/opt/ /optRun the installation script depending on the processor (uname -m to know).for armv8 (aarch64) - Realtek RTD129xwget -O - https://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/shfor armv5wget -O - https://bin.entware.net/armv5sf-k3.2/installer/generic.sh | /bin/sh wget -O - https://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/shfor x64for armv7wget -O - https://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/shCreate Autostart TaskCreate a triggered user-defined task in Task Scheduler.Goto: DSM > Control Panel > Task SchedulerCreate > Triggered Task > User Defined ScriptGeneralTask: EntwareUser: rootEvent: Boot-upPretask: noneTask SettingsRun C…

入坑IMTNAS星際魔盒2 - 部署 Entware 倉庫軟件到IMTNAS星際魔盒
type: item
date: 2021-05-14T17:00:00+08:00
description: 部署 Entware 倉庫軟件到IMTNAS星際魔盒IMTNAS-074242.jpg前言:​ 星際魔盒(MCS7)的內核是Linux3.10！Debian Wheezy系統(官方早已停止支援)算得上是中古時代的產物了, 嘗試換源, 還是各種報錯, 不得不放棄. 最後想到Entware倉庫軟件.什麼是Entware:Entware 是一個嵌入式 Linux 設備的軟件倉庫集成工具，也就是傳統 Linux 上的包管理工具，例如 Debian 的 dpkg、CentOS 的 yum 等。 它們可以通過網絡在遠程倉庫上拉取並安裝所需要的包，同時自動解決依賴問題，是系統上不可或缺的一部分。Entware部署:01.PNGSSH登入用戶名: admin密碼: adminsudo -i mv /opt/ ./opt.bak刪除或備份原/opt資料夾mkdir -p /mnt/hdd1/opt ln -sf /mnt/hdd1/opt/ /opt建立一個空白的/opt資料夾 (用於安裝entware套件) 並建立符號連結02.pngwget -O - http://pkg.entware.net/binaries/armv7/installer/entware_install.sh | /bin/sh據處理器執行安裝(星際魔盒是armv7)加入到開機自啟動文件/etc/rc.localsed -i -e '/# By default this script does nothing./a\ln -sf /mnt/hdd1/opt/ /opt\ opt/etc/init.d/rc.unslung start' /etc/rc.local添加到 PATH 的環境變量。即/opt/bin /opt/sbin03.pngecho '. /opt/etc/profile' >> /etc/profile更新環境變量source /etc/profile04.png查看更新環境變量reboot重新啟動 NAS2020-10-21_120258.pngopkg updateDownloading http://pkg.entware.net/binaries/armv7/Packages.gz.Updated list of available packages in /opt/var/opkg-lists/packages.舉個例子例子1:利用opkg安裝網路速度測試工具 iPerf306.png07.png08.png例子2:通過opkg安裝 shellinabox可以不需要安裝類似於xShell或Putty的通訊工具(瀏覽器模擬一個遠程系統的Shell )09.png10.png查看是否成功執行shellinabox11.png默认端口为4200結語: ​ 我們可以愉快地使用 opkg 包管理系統，在官方的源上已經有超過2000個軟件包，非常的豐富.參考網站: Install entware repository on Synology NAShttps://entware.net/