LuCI 要点
This installs merely the essentials of the Web User Interface LuCI. See "opkg update && opkg list luci-*" for all available packages to administer OpenWrt through LuCI.
| In case you are not familiar with a CLI, you find some very basic help here →command line HELP |
安装
→ opkg Technical reference for opkg
To retrieve the current list of available packages in the repository do
opkg updatethen for a full LuCI installation without HTTPS support enter
opkg install lucior alternatively for a full LuCI installation with HTTPS support enter
opkg install luci-sslEnable (so that it will be started at every boot) and start uHTTPd:
/etc/init.d/uhttpd enable /etc/init.d/uhttpd start
You should now be able to connect with a webbrowser to you router at http://192.168.1.1.
配置
→ /etc/config/uhttpd. (optional, you are not required to configure anything)
管理
TODO
所包含的Packages
luci and luci-ssl are meta-packages. Here you see what they comprise, the sizes are in Bytes compiled for the ar71xx platform. They should differ too much from binaries compiled for other architectures. Also note, that with JFFS2 it is not possible to precisely predict the occupied space.
In case you want to use a different web server and not install httpd at all, do not install the meta-package because it includes uhttpd. Install the individual components instead and a web server of your choice. The article http.overview shows you some choices from the repos.
| 名称 | 大小 | 详细描述 |
|---|---|---|
| luci | 779 | Meta package. Standard OpenWrt set including full and mini admin and the standard theme |
| uhttpd | 23778 | uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua support. It is intended as a drop-in replacement for the Busybox HTTP daemon. |
| luci-mod-admin-full | 60827 | LuCI Administration - full-featured for full control |
| luci-mod-admin-core | 5257 | Web UI Core module |
| luci-theme-openwrt | 7226 | OpenWrt.org (default) |
| luci-i18n-english | 1252 | English |
| luci-app-firewall | 16630 | Firmware and Portforwarding application |
| firewall | 11603 | UCI based firewall for OpenWrt /etc/config/firewall /etc/firewall.user. Dependencies: iptables, iptables-mod-conntrack, iptables-mod-nat |
| luci-app-initmgr | 5713 | LuCI Initscript Management |
| libiwinfo | 25362 | Wireless information library with consistent interface for proprietary Broadcom, madwifi, nl80211 and wext driver interfaces. |
| luci-lib-ipkg | 2846 | LuCI IPKG/OPKG call abstraction library |
| luci-theme-base | 25065 | Common base for all 主题 |
| libnl-tiny | 14390 | This package contains a stripped down version of libnl |
| liblua | 81477 | Lua is a powerful light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language. Lua is free software. This package contains the Lua shared libraries, needed by other programs. |
| lua | 9069 | Lua is a powerful light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language. Lua is free software. This package contains the Lua language interpreter. (5.1.4-7) |
| luci-lib-web | 59695 | MVC Webframework |
| luci-lib-core | 28096 | LuCI core libraries |
| luci-lib-sys | 15795 | LuCI Linux/POSIX system library |
| luci-lib-nixio | 31683 | NIXIO POSIX library |
| luci-lib-core | 28096 | LuCI core libraries |
| luci-sgi-cgi | 2420 | CGI Gateway behind existing Webserver |
| luci-lib-lmo | 4714 | LuCI LMO I18N library |
| Additionally Required for HTTPS | ||
| luci-ssl | 782 | Meta package. Standard OpenWrt set including full and mini admin, the standard theme + HTTPS support |
| uhttpd-mod-tls | 5825 | The TLS plugin adds HTTPS support to uHTTPd. |
| libcyassl | 69682 | CyaSSL is an SSL library optimized for small footprint, both on disk and for memory use. |
| px5g | 28480 | Px5g is a tiny standalone X.509 certificate generator. It's suitable to create key files and certificates in DER and PEM format for use with stunnel, uhttpd and others. |
| Internationalization and localization packages | ||
| luci-i18n-russian | 8982 | Russian (by Skryabin Dmitry) |
| luci-i18n-portuguese | 11153 | Portuguese (by Jose Monteiro) |
| luci-i18n-malay | 10959 | Malay (by Teow Wai Chet) |
| luci-i18n-norwegian | 11715 | Norwegian (by Lars Hardy) |
| luci-i18n-italian | 9639 | Italian (by Matteo Croce) |
| luci-i18n-spanish | 11141 | Spanish (by Guillermo Javier Nardoni) |
| luci-i18n-japanese | 16223 | Japanese (by Tsukasa Hamano) |
| luci-i18n-german | 17133 | German |
| luci-i18n-greek | 13166 | Greek (by Vasilis Tsiligiannis) |
| luci-i18n-catalan | 11193 | Catalan (by Eduard Duran) |
| luci-i18n-french | 8982 | French (by Florian Fainelli) |
| luci-i18n-vietnamese | 10461 | Vietnamese (by Hong Phuc Dang) |
| luci-i18n-english | 1252 | English |
NOTE: These are all packages with all their dependencies needed by the WebUI. A total of 461 773 Bytes on ar71xx platforms. The package luci-app-firewall is needed, and it depends on the package firewall and this has itself some additional dependencies: iptables, iptables-mod-conntrack, iptables-mod-nat.
Check http://i18n.luci.subsignal.org/ for an overview of the translation progress.
Do we need:
| uhttpd-mod-lua | 9178 | The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd. |
Note: According to this post a mini-admin-package is no longer available |
LuCI 运行在其他WEB服务器上
LuCI 运行在 lighttpd上
敬告: The libiwinfo package is only needed if your router has wireless. The following procedure brings you a minimal LuCI-Installation (instead of the full installation above, when using meta-package "luci" or "luci-ssl", which automatically installs the webserver "uhttpd")
opkg update opkg install lighttpd lighttpd-mod-cgi luci-mod-admin-full luci-theme-openwrt libiwinfo
Afterwards adjust the file /etc/lighttpd/lighttpd.conf to load the mod_cgi-module:
## modules to load
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
# "mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
"mod_cgi"
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_webdav"
)
|
…and add:
## CGI module
cgi.assign = ( "luci" => "/usr/bin/lua" )
|
…if you want lighttpd's logs in the output of "logread", add this:
## enable syslog
server.errorlog-use-syslog = "enable"
|
Enable (so that it will be started at every boot) and start lighttpd:
/etc/init.d/lighttpd enable /etc/init.d/lighttpd start
LuCI 和lighttpd 同时使用
You just have to adjust a few settings in /etc/lighttpd/lighttpd.conf
OLD:
#server.document-root = "/www/" |
NEW:
server.document-root = "/website/" |
At the end of the file add:
$SERVER["socket"] == ":88" {
server.document-root = "/www/"
cgi.assign = ( "luci" => "/usr/bin/lua" )
} |
Finally create a directory for the website and put some content in it
mkdir /website echo "<P>It works!</P>" > /website/index.html
Now your website is on port 80 and LuCI on port 88 using lighttpd!
NOTE / TODO: Instead of opening a 2nd port for lighttpd it should be possible to activate the module "mod_simple_vhost" and serve your website (in a vhost) in friendly coexistence of LuCI via port 80…
故障排除
- LuCI has an own web-presence, please file LuCI specific bug reports there: http://luci.subsignal.org/
注意事项
zh-cn/doc/howto/luci.essentials.txt · Last modified: 2011/11/26 18:32 by leangjia
