在Merlin(梅林)上安装Entware

Merlin(梅林)


首先得把梅林固件刷如路由,网上教程比较多了,可以搜自己的路由型号+梅林。

Entware


Entware 是一个嵌入式 Linux 设备的软件仓库集成工具,类似 Debian 的dpkg。
在Ubuntu上,我们可以使用 apt-get 安装在线软件包:

apt-get install vim

可以使用 dpkg 安装本地软件包:

dpkg -i ./vim.deb

与之类似,在 Merlin 上,我们可以使用 opkg 管理和安装软件包:

opkg install ./vim.ipk  #本地
opkg install vim        #在线

安装Entware


首先准备U盘

把U盘格式化成ext4,插入到路由器的USB口上。

执行脚本开始安装

梅林自带安装脚本,通过ssh登陆路由后,执行:

entware-setup.sh

通过提示操作就好:

Info: This script will guide you through the Entware installation.
Info: Script modifies "entware" folder only on the chosen drive,
Info: no other data will be changed. Existing installation will be
Info: replaced with this one. Also some start scripts will be installed,
Info: the old ones will be saved on Entware partition with name
Info: like /tmp/mnt/sda1/jffs_scripts_backup.tgz
Info: Looking for available partitions...
[1] --> /tmp/mnt/sda1
=> Please enter partition number or 0 to exit
[0-1]:

当我们看到如下提示,说明已经安装成功了:

nfo: Congratulations!
Info: If there are no errors above then Entware-ng was successfully initialized.
Info: Add /opt/bin & /opt/sbin to your PATH variable
Info: Add '/opt/etc/init.d/rc.unslung start' to startup script for Entware-ng services to start
Info: Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues

安装后,执行更新命令下载仓库索引到本地:

opkg update

Entware-ng services to start

由于 Merlin 固件大部分的分区都是只读的,而 /tmp 分区的内容每次重启之后都会被清空,所以我们就需要在 JFFS 分区里面创建脚本 (我在这里选择 /koolshare/init.d 目录)命名为: startent.sh,内容如下:

#!/bin/sh
/opt/etc/init.d/rc.unslung start

保存后,chmod +x startent.sh 为该脚本添加执行权限。
使用浏览器登陆路由器的管理页面,点击左侧的「Tools」,点击「Script」,类型选择「WAN-START」,「脚本配置」框中就填写脚本路径,然后点「+」保存,重启你的路由器。

在Merlin(梅林)上安装Entware_第1张图片
image.png

到此,我们就完成了Entware的安装了

你可能感兴趣的:(在Merlin(梅林)上安装Entware)