- 关于Lomorage介绍,请点击此处了解
- 下面介绍如何安装:
小米R3G路由器安装Lomorage
1、安装挂载opt分区
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30#1.替换源为阿里源
cat /etc/opkg/distfeeds.conf
src/gz openwrt_core https://mirrors.aliyun.com/openwrt/releases/21.02.3/targets/ramips/mt7621/packages
src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/21.02.3/packages/mipsel_24kc/base
src/gz openwrt_luci https://mirrors.aliyun.com/openwrt/releases/21.02.3/packages/mipsel_24kc/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/21.02.3/packages/mipsel_24kc/packages
src/gz openwrt_routing https://mirrors.aliyun.com/openwrt/releases/21.02.3/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://mirrors.aliyun.com/openwrt/releases/21.02.3/packages/mipsel_24kc/telephony
#2.USB和存储器的内核模块
opkg install kmod-usb-storage kmod-scsi-generic
#文件系统
opkg install kmod-fs-ext4
#USB辅助工具、分区、格式化等 非必要
opkg install usbutils fdisk e2fsprogs
#分区
fdisk /dev/sdb
#格式化
mkfs.ext4 /dev/sdb1
#挂载
mkdir /opt
mount /dev/sdb1 /opt
#开机自动挂载
opkg install block-mount blkid blkid非必要
#方式一:查看生成配置并配置自动挂载
block detect
uci set fstab.@mount[-1].enabled=1
uci commit fstab
#方式二:vim
vim /etc/config/fstab
/etc/init.d/fstab enable2、安装Entware
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
TYPE='generic'
#TYPE='alternative'
#|---------|-----------------------|---------------|---------------|---------------------|-------------------|-------------------|----------------------|-------------------|
#| ARCH | aarch64-k3.10 | armv5sf-k3.2 | armv7sf-k2.6 | armv7sf-k3.2 | mipselsf-k3.4 | mipssf-k3.4 | x64-k3.2 | x86-k2.6 |
#| LOADER | ld-linux-aarch64.so.1 | ld-linux.so.3 | ld-linux.so.3 | ld-linux.so.3 | ld.so.1 | ld.so.1 | ld-linux-x86-64.so.2 | ld-linux.so.2 |
#| GLIBC | 2.27 | 2.27 | 2.23 | 2.27 | 2.27 | 2.27 | 2.27 | 2.23 |
#|---------|-----------------------|---------------|---------------|---------------------|-------------------|-------------------|----------------------|-------------------|
unset LD_LIBRARY_PATH
unset LD_PRELOAD
ARCH=mipselsf-k3.4
LOADER=ld.so.1
GLIBC=2.27
echo 'Info: Checking for prerequisites and creating folders...'
if [ -d /opt ]; then
echo 'Warning: Folder /opt exists!'
else
mkdir /opt
fi
# no need to create many folders. entware-opt package creates most
for folder in bin etc lib/opkg tmp var/lock
do
if [ -d "/opt/$folder" ]; then
echo "Warning: Folder /opt/$folder exists!"
echo 'Warning: If something goes wrong please clean /opt folder and try again.'
else
mkdir -p /opt/$folder
fi
done
echo 'Info: Opkg package manager deployment...'
URL=http://bin.entware.net/${ARCH}/installer
wget $URL/opkg -O /opt/bin/opkg
chmod 755 /opt/bin/opkg
wget $URL/opkg.conf -O /opt/etc/opkg.conf
echo 'Info: Basic packages installation...'
/opt/bin/opkg update
if [ $TYPE = 'alternative' ]; then
/opt/bin/opkg install busybox
fi
/opt/bin/opkg install entware-opt
# Fix for multiuser environment
chmod 777 /opt/tmp
for file in passwd group shells shadow gshadow; do
if [ $TYPE = 'generic' ]; then
if [ -f /etc/$file ]; then
ln -sf /etc/$file /opt/etc/$file
else
[ -f /opt/etc/$file.1 ] && cp /opt/etc/$file.1 /opt/etc/$file
fi
else
if [ -f /opt/etc/$file.1 ]; then
cp /opt/etc/$file.1 /opt/etc/$file
fi
fi
done
[ -f /etc/localtime ] && ln -sf /etc/localtime /opt/etc/localtime
echo 'Info: Congratulations!'
echo 'Info: If there are no errors above then Entware was successfully initialized.'
echo 'Info: Add /opt/bin & /opt/sbin to $PATH variable'
echo 'Info: Add "/opt/etc/init.d/rc.unslung start" to startup script for Entware services to start'
if [ $TYPE = 'alternative' ]; then
echo 'Info: Use ssh server from Entware for better compatibility.'
fi
echo 'Info: Found a Bug? Please report at https://github.com/Entware/Entware/issues'安装lomorage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23#1.查看cpu架构
cat /proc/cpuinfo
opkg install lscpu
lscpu | grep "Byte Order"
uname -a
#2.调整/etc/profile
PATH添加/opt/bin/go/bin:/opt/bin:/opt/sbin
LD_LIBRARY_PATH添加/opt/lib
#3.安装依赖及工具
opkg install coreutils-stat perl-image-exiftool ffmpeg ffprobe lsblk
#4.安装lomorage
cat /opt/etc/opkg.conf
src/gz entware http://bin.entware.net/mipselsf-k3.4
src/gz lomorage https://lomoware.lomorage.com/opkg/mipsel-3.4
dest root /
lists_dir ext /opt/var/opkg-lists
arch all 100
arch mipsel-3x 150
arch mipsel-3.4 160
opkg update --no-check-certificate
opkg install lomo-backend --no-check-certificate
#安装完成后会自动启动,默认挂载目录/mnt,端口默认8000,可自行修改/etc/init.d/lomod