Differences

This shows you the differences between two versions of the page.

doc:howto:luci.essentials [2013/05/04 14:17]
orca
doc:howto:luci.essentials [2013/08/11 12:59] (current)
grabbel undertitle needed for clarity as we don't have the page [[luci.on.uhttpd]]
Line 1: Line 1:
====== LuCI Essentials ====== ====== LuCI Essentials ======
 +//Installing LuCI on uHTTPd//
 +
This installs the essentials of the Web User Interface LuCI. See "**''opkg update && opkg list luci-*''**" for all available packages to administer OpenWrt through LuCI. This installs the essentials of the Web User Interface LuCI. See "**''opkg update && opkg list luci-*''**" for all available packages to administer OpenWrt through LuCI.
-| {{:meta:icons:tango:utilities-terminal.png?nolink}} | In case you are not familiar with a [[wp>Command-line interface|CLI]], check out [[doc:howto:user.beginner.cli|command line HELP]] |+| {{:meta:icons:tango:utilities-terminal.png?nolink}} | In case you are not familiar with a [[wp>Command-line interface|CLI]], check out [[doc:howto:user.beginner.cli|command-line HELP]] and/or [[doc:techref:opkg]] |
===== Installation ===== ===== Installation =====
- +  - Retrieve the current list of available packages in the repository:<code bash>
-==== Via package repository ==== +
--> [[doc:techref:opkg]] Technical reference for opkg +
- +
-Retrieve the current list of available packages in the repository: +
-<code>+
opkg update opkg update
</code> </code>
-For a full LuCI installation //without// HTTPS support: +  * For a full LuCI installation //without// HTTPS support:<code bash>
-<code>+
opkg install luci</code> opkg install luci</code>
-For a full LuCI installation //with// HTTPS support +  * For a full LuCI installation //with// HTTPS support<code bash>
-<code>+
opkg install luci-ssl opkg install luci-ssl
</code> </code>
 +
 +==== Native Language Support ====
 +The LuCI web user interface is being actively translated by volunteers. See [[http://i18n.luci.subsignal.org/pootle/]] and get involved! For a list of available packages, do
 +<code bash>
 +opkg list | grep luci-i18n-
 +</code>
 +
 +To install your native language, do e.g.
 +<code bash>
 +opkg install luci-i18n-hungarian
 +</code>
 +
 +You can also install language packs utilizing the WebInterface and you can install multiple LuCI language packs at the same time and switch between them in the LuCI-WebInterface or by editing the file -> ''[[doc:uci:luci|/etc/config/luci]]''
 +
==== Start the web server (uHTTPd) ==== ==== Start the web server (uHTTPd) ====
-The web server software uHTTPd is a dependency of the LuCI package and automatically installed on your OpenWrt system, when you install LuCI. **After installation the webs server is not running!** You need to manually start the web server (uHTTPd): +The web server software [[http.uhttpd|uHTTPd]] is a dependency of the LuCI package and automatically installed on your OpenWrt system, when you install LuCI. After installation the web server is **not running!** You need to manually start the web server (uHTTPd): 
-<code>+<code bash>
/etc/init.d/uhttpd start /etc/init.d/uhttpd start
</code> </code>
-Now you should be able to connect to the web server serving LuCI at [[http://192.168.1.1|http://192.168.1.1]].+Now you should be able to connect to the web server serving LuCI at [[http://192.168.1.1]].
Line 34: Line 43:
Enable automatic start at boot: Enable automatic start at boot:
-<code>+<code bash>
/etc/init.d/uhttpd enable /etc/init.d/uhttpd enable
</code> </code>
 +==== Details ====
 +LuCI is installed as a 'meta package' which installs several other packages by having these defined as a dependency. Notably, it installs the [[doc:howto:http.uhttpd|uHTTPd]] web server, configured for use with LuCI. The dependent packages are the following (see [[doc:techref:luci|the LuCI technical reference]] for more information):
 +  *        uhttpd
 +  *        uhttpd-mod-ubus
 +  *        luci-mod-admin-full
 +  *        luci-theme-bootstrap
 +  *        luci-app-firewall
 +  *        luci-proto-core
 +  *        luci-proto-ppp
 +  *        libiwinfo-lua
 +
 +In case you want to use uHTTPd for the web interface there is little configuration necessary as uHTTPd is configured with CGI to make LuCI work with the Lua interpreter. By default this is organised as follows. By default ''/www'' is the standard document root. Thus, by requesting this docroot (by pointing your browser to the devices IP address) an index file such as ''index.html'' is searched for (per uHTTPd settings). The file ''/www/index.html'' (installed with LuCI) is prepared such that when requested, it redirects you to ''/cgi-bin/luci'', which is the default CGI gateway for LuCI. This is just a script, which basically calls Lua at ''/usr/bin/lua''. uhttpd is configured by default to load pages as CGI in the ''/cgi-bin'' path, and thus starts serving these pages with the ''/cgi-bin/luci'' script.
 +
 +It is also possible to run LuCI with Lua as an embedded process. uhttpd supports this; see the corresponding section of the [[doc:uci:uhttpd#embedded.lua|uHTTPd Web Server Configuration]] article on the UCI configuration of uhttpd.
===== Configuration ===== ===== Configuration =====
--> ''[[doc:uci:uhttpd|/etc/config/uhttpd]]''. (//optional//, you are not required to configure anything)+The default web server software uhttpd is configured in the file ''[[doc:uci:uhttpd|/etc/config/uhttpd]]''.\\ 
 +The LuCI web interface is configured in the file ''[[doc:uci:luci|/etc/config/luci]]''.
-===== Administration ===== 
-FIXME TODO 
===== LuCI on other web servers ===== ===== LuCI on other web servers =====
Line 50: Line 72:
==== LuCI on lighttpd ==== ==== LuCI on lighttpd ====
-->[[doc:howto:http.lighttpd]]+->[[doc:howto:luci.on.lighttpd]]
-**NOTE**: 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 &quot;**luci**" or "**luci-ssl**", which automatically installs the webserver "**uhttpd**")+==== LuCI on nginx ==== 
 +-&gt;[[doc:howto:luci.on.nginx]]
-<code> +==== LuCI on ... ====
-opkg update +
-opkg install lighttpd lighttpd-mod-cgi luci-mod-admin-full luci-theme-openwrt libiwinfo +
-</code>+
-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: 
-<code> 
-/etc/init.d/lighttpd enable 
-/etc/init.d/lighttpd start 
-</code> 
- 
-Add the following for the server to listen on ipv4 and ipv6 
-<code> 
-#Listen on ipv4 
-$SERVER["socket"] == ":80" { 
-} 
-#Listen on ipv6 
-$SERVER["socket"] == "[::]:80" { 
-        server.use-ipv6 = "enable" 
-} 
-</code> 
- 
-===== LuCI & a Website Simultaneously on 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 
-<code> 
-mkdir /website 
-echo "<P>It works!</P>" > /website/index.html 
-</code> 
- 
-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...  
===== Minimalistic offline installation ===== ===== Minimalistic offline installation =====
- 
Download and transfer (e.g. using SCP) the packages listed below to your OpenWrt router onto the RAM disk in ''/tmp/luci-offline-packages'' Download and transfer (e.g. using SCP) the packages listed below to your OpenWrt router onto the RAM disk in ''/tmp/luci-offline-packages''
<code>mkdir -p /tmp/luci-offline-packages; cd /tmp/luci-offline-packages</code> <code>mkdir -p /tmp/luci-offline-packages; cd /tmp/luci-offline-packages</code>
Line 164: Line 104:
and install them with: and install them with:
-<code>for pkg in liblua lua libuci-lua libubus-lua uhttpd luci-lib-ipkg luci-i18n-english luci-sgi-cgi luci-lib-core luci-lib-nixio luci-lib-sys luci-lib-web luci-proto-core luci-theme-base luci-theme-openwrt luci-mod-admin-core luci-mod-admin-full; do opkg install /tmp/luci-offline-packages/$pkg*.ipk; done</code>+<code bash>for pkg in liblua lua libuci-lua libubus-lua uhttpd luci-lib-ipkg luci-i18n-english luci-sgi-cgi luci-lib-core luci-lib-nixio luci-lib-sys luci-lib-web luci-proto-core luci-theme-base luci-theme-openwrt luci-mod-admin-core luci-mod-admin-full; do opkg install /tmp/luci-offline-packages/$pkg*.ipk; done</code>
Additionally, the following packages are needed for basic wireless configuration: libiw, libiwinfo, libiwinfo-lua. Additionally, the following packages are needed for basic wireless configuration: libiw, libiwinfo, libiwinfo-lua.
Line 171: Line 111:
  * LuCI has its own web-presence. Please file LuCI specific bugs at the [[http://luci.subsignal.org|LuCI website]]   * LuCI has its own web-presence. Please file LuCI specific bugs at the [[http://luci.subsignal.org|LuCI website]]
-   
===== Notes ===== ===== Notes =====
[[doc:techref:luci|LuCI Technical Reference]] [[doc:techref:luci|LuCI Technical Reference]]

Back to top

doc/howto/luci.essentials.1367669839.txt.bz2 · Last modified: 2013/05/04 14:17 by orca