openwrt添加luci选项,开启luCI&增加主题

默认openwrt中,menuconfig没有打开luci选项,需要进行如下配置

1. 修改前:menuconfig中默认没有LuCI选项

 .config - OpenWrt Configuration
 ─────────────────────────────────────────────────────────────────────────────────
  ┌────────────────────────── OpenWrt Configuration ───────────────────────────┐
  │  Arrow keys navigate the menu.   selects submenus ---> (or empty    │  
  │  submenus ----).  Highlighted letters are hotkeys.  Pressing  includes, │  
  │   excludes,  modularizes features.  Press  to exit,     │  
  │  for Help, </> for Search.  Legend: [*] built-in  [ ] excluded   module │  
  │ ┌────────────────────────────────────────────────────────────────────────┐ │  
  │ │        Target System (MediaTek Ralink MIPS)  --->                      │ │  
  │ │        Subtarget (MT76x8 based boards)  --->                           │ │  
  │ │        Target Profile (Default Profile)  --->                          │ │  
  │ │        Target Images  --->                                             │ │  
  │ │        Global build settings  --->                                     │ │  
  │ │    [ ] Advanced configuration options (for developers)  ----           │ │  
  │ │    [ ] Build the OpenWrt Image Builder                                 │ │  
  │ │    [ ] Build the OpenWrt SDK                                           │ │  
  │ │    [ ] Package the OpenWrt-based Toolchain                             │ │  
  │ │    [*] Image configuration  --->                                       │ │  
  │ │        Base system  --->                                               │ │  
  │ │        Boot Loaders  ----                                              │ │  
  │ │        Development  --->                                               │ │  
  │ │        Extra packages  --->                                            │ │  
  │ │        Firmware  --->                                                  │ │  
  │ │        Kernel modules  --->                                            │ │  
  │ │        Languages  --->                                                 │ │  
  │ │        Libraries  --->                                                 │ │  
  │ │        Network  --->                                                   │ │  
  │ │        Utilities  --->                                                 │ │  
  │ └────────────────────────────────────────────────────────────────────────┘ │  
  ├────────────────────────────────────────────────────────────────────────────┤  
  │          <Select>    < Exit >    < Help >    < Save >    < Load >          │  
  └────────────────────────────────────────────────────────────────────────────┘  

2. 执行
./scripts/feeds update -a
./scripts/feeds install -a

eric@eric-PC:~/Documents/work/mt7628/openwrt$ ./scripts/feeds update -a
Updating feed 'packages' from 'https://gitee.com/openwrt-mirror/packages.git^2e6bd4cb86682b224803325127d3f777d40b3231' ...
Create index file './feeds/packages.index' 
Updating feed 'luci' from 'https://gitee.com/openwrt-mirror/luci.git^fb2f36306756d0d0782dcab8413a8bb7ec379e54' ...
Create index file './feeds/luci.index' 
Updating feed 'routing' from 'https://git.openwrt.org/feed/routing.git^3f8571194c2765ed31aa73459e86c2ebf943d27d' ...
正克隆到 './feeds/routing'...
remote: Enumerating objects: 8676, done.
remote: Counting objects: 100% (8676/8676), done.
remote: Compressing objects: 100% (6044/6044), done.
remote: Total 8676 (delta 3722), reused 5354 (delta 2103) 
接收对象中: 100% (8676/8676), 2.06 MiB | 24.00 KiB/s, 完成.
处理 delta 中: 100% (3722/3722), 完成.
切换到一个新分支 '3f8571194c2765ed31aa73459e86c2ebf943d27d'
/home/eric/Documents/work/mt7628/openwrt
Create index file './feeds/routing.index' 
Collecting package info: done
Collecting target info: done
Updating feed 'telephony' from 'https://git.openwrt.org/feed/telephony.git^036cd451c35b82b3d8cac519864986894d9f6958' ...
Create index file './feeds/telephony.index' 
eric@eric-PC:~/Documents/work/mt7628/openwrt$ 
eric@eric-PC:~/Documents/work/mt7628/openwrt$ ./scripts/feeds install -a
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/network/utils/iproute2/Makefile' has a dependency on 'libcap', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/network/utils/nftables/Makefile' has a dependency on 'jansson', which does not exist
Installing all packages from feed packages.

如果下载比较慢,可修改 openwrt/feeds.conf.default文件,替换对应的下载源

src-git packages https://gitee.com/openwrt-mirror/packages.git^2e6bd4cb86682b224803325127d3f777d40b3231
src-git luci https://gitee.com/openwrt-mirror/luci.git^fb2f36306756d0d0782dcab8413a8bb7ec379e54

3. 再次进入menuconfig,可以看到LuCI选项:)

 .config - OpenWrt Configuration
 ─────────────────────────────────────────────────────────────────────────────────
  ┌────────────────────────── OpenWrt Configuration ───────────────────────────┐
  │  Arrow keys navigate the menu.   selects submenus ---> (or empty    │  
  │  submenus ----).  Highlighted letters are hotkeys.  Pressing  includes, │  
  │   excludes,  modularizes features.  Press  to exit,     │  
  │  for Help, </> for Search.  Legend: [*] built-in  [ ] excluded   module │  
  │ ┌────^(-)────────────────────────────────────────────────────────────────┐ │  
  │ │    [ ] Build the OpenWrt SDK                                           │ │  
  │ │    [ ] Package the OpenWrt-based Toolchain                             │ │  
  │ │    [*] Image configuration  --->                                       │ │  
  │ │        Base system  --->                                               │ │  
  │ │        Administration  --->                                            │ │  
  │ │        Boot Loaders  ----                                              │ │  
  │ │        Development  --->                                               │ │  
  │ │        Extra packages  --->                                            │ │  
  │ │        Firmware  --->                                                  │ │  
  │ │        Fonts  --->                                                     │ │  
  │ │        Kernel modules  --->                                            │ │  
  │ │        Languages  --->                                                 │ │  
  │ │        Libraries  --->                                                 │ │  
  │ │        LuCI  --->                                                      │ │  
  │ │        Mail  --->                                                      │ │  
  │ │        Multimedia  --->                                                │ │  
  │ │        Network  --->                                                   │ │  
  │ │        Sound  --->                                                     │ │  
  │ │        Utilities  --->                                                 │ │  
  │ │        Xorg  --->                                                      │ │  
  │ └────────────────────────────────────────────────────────────────────────┘ │  
  ├────────────────────────────────────────────────────────────────────────────┤  
  │          <Select>    < Exit >    < Help >    < Save >    < Load >          │  
  └────────────────────────────────────────────────────────────────────────────┘  

3. 打开 luci

 .config - OpenWrt Configuration
 > LuCI > 1. Collections ────────────────────────────────────────────────────────────────────
  ┌─────────────────────────────────── 1. Collections ────────────────────────────────────┐
  │  Arrow keys navigate the menu.   selects submenus ---> (or empty submenus      │  
  │  ----).  Highlighted letters are hotkeys.  Pressing  includes,  excludes,    │  
  │  modularizes features.  Press  to exit,  for Help, </> for Search.       │  
  │  Legend: [*] built-in  [ ] excluded   module  < > module capable                   │  
  │ ┌───────────────────────────────────────────────────────────────────────────────────┐ │  
  │ │      <*> luci................... LuCI interface with Uhttpd as Webserver (default)│ │  
  │ │      < > luci-nginx........................ LuCI interface with Nginx as Webserver│ │  
  │ │      < > luci-ssl................ LuCI with HTTPS support (mbedTLS as SSL backend)│ │  
  │ │      < > luci-ssl-nginx. LuCI with HTTPS support on Nginx (OpenSSL as SSL backend)│ │  
  │ │      < > luci-ssl-openssl........ LuCI with HTTPS support (OpenSSL as SSL backend)│ │  
  │ │                                                                                   │ │  
  │ │                                                                                   │ │  
  │ └───────────────────────────────────────────────────────────────────────────────────┘ │  
  ├───────────────────────────────────────────────────────────────────────────────────────┤  
  │               <Select>    < Exit >    < Help >    < Save >    < Load >                │  
  └───────────────────────────────────────────────────────────────────────────────────────┘  

4. 打开 luci-app-uhttpd

 .config - OpenWrt Configuration
 > LuCI > 3. Applications ───────────────────────────────────────────────────────────────────
  ┌─────────────────────────────────── 3. Applications ───────────────────────────────────┐
  │  Arrow keys navigate the menu.   selects submenus ---> (or empty submenus      │  
  │  ----).  Highlighted letters are hotkeys.  Pressing  includes,  excludes,    │  
  │  modularizes features.  Press  to exit,  for Help, </> for Search.       │  
  │  Legend: [*] built-in  [ ] excluded   module  < > module capable                   │  
  │ ┌──────^(-)─────────────────────────────────────────────────────────────────────────┐ │  
  │ │      < > luci-app-travelmate.......................... LuCI support for Travelmate│ │  
  │ │      < > luci-app-ttyd. ttyd - Command-line tool for sharing terminal over the web│ │  
  │ │      < > luci-app-udpxy.................................... LuCI Support for udpxy│ │  
  │ │      <*> luci-app-uhttpd........................... uHTTPd Webserver Configuration│ │  
  │ │      < > luci-app-unbound............ Unbound Recursive DNS Resolver Configuration│ │  
  │ │      < > luci-app-upnp................. Universal Plug & Play configuration module│ │  
  │ │      < > luci-app-vnstat.................................. LuCI Support for VnStat│ │  
  │ └──────v(+)─────────────────────────────────────────────────────────────────────────┘ │  
  ├───────────────────────────────────────────────────────────────────────────────────────┤  
  │               <Select>    < Exit >    < Help >    < Save >    < Load >                │  
  └───────────────────────────────────────────────────────────────────────────────────────┘  

LuCI主题增加

  1. 下载对应的主题文件
    进入目录openwrt/feeds/luci/themes,默认只有4个主题
eric@eric-PC:~/Documents/work/mt7628/openwrt/feeds/luci/themes$ ls -l
总用量 16
drwxr-xr-x 5 eric eric 4096 7月  13 20:07 luci-theme-bootstrap
drwxr-xr-x 5 eric eric 4096 7月  13 20:19 luci-theme-material
drwxr-xr-x 5 eric eric 4096 7月  13 20:07 luci-theme-openwrt
drwxr-xr-x 5 eric eric 4096 7月  13 20:07 luci-theme-rosy

下载主题luci-theme-argon(主题地址:https://gitee.com/onechlorine/luci-theme-argon/tree/master)

eric@eric-PC:~/Documents/work/mt7628/openwrt/feeds/luci/themes$ git clone https://gitee.com/onechlorine/luci-theme-argon.git
正克隆到 'luci-theme-argon'...
remote: Enumerating objects: 512, done.
remote: Counting objects: 100% (512/512), done.
remote: Compressing objects: 100% (368/368), done.
remote: Total 512 (delta 189), reused 148 (delta 34), pack-reused 0
接收对象中: 100% (512/512), 7.23 MiB | 8.36 MiB/s, 完成.
处理 delta 中: 100% (189/189), 完成.
eric@eric-PC:~/Documents/work/mt7628/openwrt/feeds/luci/themes$ ls -l
总用量 20
drwxr-xr-x 7 eric eric 4096 7月  13 21:43 luci-theme-argon
drwxr-xr-x 5 eric eric 4096 7月  13 20:07 luci-theme-bootstrap
drwxr-xr-x 5 eric eric 4096 7月  13 20:19 luci-theme-material
drwxr-xr-x 5 eric eric 4096 7月  13 20:07 luci-theme-openwrt
drwxr-xr-x 5 eric eric 4096 7月  13 20:07 luci-theme-rosy
  1. 再执行命令
    ./scripts/feeds install -a -p luci
eric@eric-PC:~/Documents/work/mt7628/openwrt$ ./scripts/feeds install -a -p luci
WARNING: Makefile 'package/feeds/packages/apache/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/telephony/asterisk-16.x/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/avro/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/gnunet/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/gnunet/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/gnunet/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/jose/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/telephony/kamailio-5.x/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/telephony/kamailio-5.x/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/libsearpc/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/network/utils/nftables/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/samba4/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/seafile-ccnet/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/seafile-server/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/ulogd/Makefile' has a dependency on 'jansson', which does not exist
WARNING: Makefile 'package/feeds/packages/yara/Makefile' has a dependency on 'jansson', which does not exist
Installing all packages from feed luci.
  1. 进入目录openwrt/package/feeds/luci,查看主题软连接是否存在?如果没有,则需要自行创建,执行指令:
    ln -s …/…/…/feeds/luci/themes/luci-theme-argon/ luci-theme-argon
eric@eric-PC:~/Documents/openwrt/package/feeds/luci$ ln -s ../../../feeds/luci/themes/luci-theme-argon/ luci-theme-argon
eric@eric-PC:~/Documents/openwrt/package/feeds/luci$ ls luci-theme-* -l
lrwxrwxrwx 1 eric eric 44 7月  19 07:13 luci-theme-argon -> ../../../feeds/luci/themes/luci-theme-argon/
lrwxrwxrwx 1 eric eric 47 7月  19 07:03 luci-theme-bootstrap -> ../../../feeds/luci/themes/luci-theme-bootstrap
lrwxrwxrwx 1 eric eric 46 7月  19 07:03 luci-theme-material -> ../../../feeds/luci/themes/luci-theme-material
lrwxrwxrwx 1 eric eric 45 7月  19 07:03 luci-theme-openwrt -> ../../../feeds/luci/themes/luci-theme-openwrt
lrwxrwxrwx 1 eric eric 42 7月  19 07:03 luci-theme-rosy -> ../../../feeds/luci/themes/luci-theme-rosy
eric@eric-PC:~/Documents/openwrt/package/feeds/luci$ 

此时,menuconfig中,已经可以看到刚才安装的主题luci-theme-argon

 .config - OpenWrt Configuration
 > LuCI > 4. Themes ────────────────────────────────────────────────────────────────────────
  ┌───────────────────────────────────── 4. Themes ──────────────────────────────────────┐
  │  Arrow keys navigate the menu.   selects submenus ---> (or empty submenus     │  
  │  ----).  Highlighted letters are hotkeys.  Pressing  includes,  excludes,   │  
  │  modularizes features.  Press  to exit,  for Help, </> for Search.      │  
  │  Legend: [*] built-in  [ ] excluded   module  < > module capable                  │  
  │ ┌──────────────────────────────────────────────────────────────────────────────────┐ │  
  │ │      < > luci-theme-argon............................................. Argon Them│ │  
  │ │      < > luci-theme-bootstrap........................... Bootstrap Theme (default│ │  
  │ │      < > luci-theme-material....................................... Material Them│ │  
  │ │      < > luci-theme-openwrt................................ LuCI OpenWrt.org them│ │  
  │ │      < > luci-theme-rosy............................................... Rosy Them│ │  
  │ │                                                                                  │ │  
  │ └──────────────────────────────────────────────────────────────────────────────────┘ │  
  ├──────────────────────────────────────────────────────────────────────────────────────┤  
  │               <Select>    < Exit >    < Help >    < Save >    < Load >               │  
  └──────────────────────────────────────────────────────────────────────────────────────┘  

仅此记录

你可能感兴趣的:(笔记收藏)