OpenWrt Forum Archive

Topic: how to install packages without internet?

The content of this topic has been archived between 19 Apr 2018 and 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

People is possible to download the packages to a computer and connect via wireless to the router, and install the packages in PC on the router?

If yes how?


Thanks..

Thanks man...

Orca wrote:

You mean this how to install packages on OpenWrt?

No, i have a router on Server AP mode...And i just have ssh connection via wireless with the router and PC, but i need install some packages and I do not want to change settings, i want install the packages via ssh or via RJ45 cable, or via serial Port...

But i do not know how to install them...i have the packages on my desktop and now how i can install them on router?

Thanks.

Oh the information was only in my head. Now it is in the wiki, please try again. ;-)

You need to download a ssh program (if you do not have) WinScp for Windows Systems.
Then login to the router via the Scp Program and upload the package to the /tmp directory then opkg install whatever.ipk

(Last edited by alphasparc on 31 Oct 2011, 16:15)

I have a Mac, i login via SSH via terminal with root@192.168.2.1...

then what i do? i use the command "cp /source /tmp" ??

Orca, srry but i dont understand where you are telling me to see...i go on link, but i not see the solution for my problem...

Sorry, maybe it is just in front of my eyes but I do not see ... big_smile

Thanks all...

If anyone can help me i appreciate...

Thanks..

best solution would be try to use own brains smile
what about search for ssh file transfer program for mac , transfer *.ipk to router /temp dir and install it from there ?

You need to use scp on your Mac. Its built it. On your Mac:

1. Start the Terminal program
2. Change to the directory where you have the .ipk you want to install
3. Enter this command:

scp <name of ipk> root@<ip address of router>:/tmp

It should ask you to enter the root password of your router in, it will then copy the file.

4. SSH to your router, run "opkg install /tmp/<name of ipk>

5. Done.

Or the way I do it:

1) setup a local web server in your LAN (subnet)

2) put the package repository in there

3) change /etc/opkg.conf on the router to point to your local package repository

4) install packages as you do normally with: opkg update; opkg install foobar

(Last edited by written_direcon on 1 Nov 2011, 21:55)

You are talking crap, Orca.

Thanks people, tomorrow i will try...

wink

people i'm trying to install the mjpg-streamer but return me this error:

root@OpenWrt:/tmp# opkg install mjpg-streamer_r68-2_mipsel.ipk 
Installing mjpg-streamer (r68-2) to root...
Collected errors:
 * Only have 0 available blocks on filesystem /, pkg mjpg-streamer needs 241

i have memory...

root@OpenWrt:/tmp# free
              total         used         free       shared      buffers
  Mem:        14356        10940         3416            0         1116
 Swap:            0            0            0
Total:        14356        10940         3416

what is wrong?




Thanks..

(Last edited by zordlyon on 2 Nov 2011, 20:21)

In german language we distinguish between Arbeitsspeicher ("working" memory = usually RAM) and Speicher (= memory or storage).

See example commands. And definitely OpenWrt Partitions.

If you would have followed the OpenWrt Introduction, you would know most of that by now, without annoying the support.

PS: are you for real, or do you just participate in this forum to try people?

(Last edited by Orca on 2 Nov 2011, 20:45)

Install "nginx" as a Reverse Proxy Server on a local host @192.168.1.2.

http://upload.wikimedia.org/wikipedia/commons/thumb/6/67/Reverse_proxy_h2g2bob.svg/280px-Reverse_proxy_h2g2bob.svg.png
A reverse proxy taking requests from the Internet and forwarding them to servers in an internal network. Those making requests connect to the proxy and may not be aware of the internal network.

Modify ./nginx/conf/nginx.conf,

server {
    listen    80;
    server_name    localhost;
#    location / {
#        root    html;
#        index    index.html index.htm;
#    }
    location / {
        proxy_pass    http://downloads.openwrt.org/;
        proxy_redirect    default;
    }
}

and start nginx. Start a browser and visit http://192.168.1.2 or http://127.0.0.1 to see if it works.

Reference: ProxyNagios

On OpenWrt,

root@OpenWrt:~# uci add luci_hosts host
cfg02fe63
root@OpenWrt:~# uci set luci_hosts.@host[-1].hostname=downloads.openwrt.org
root@OpenWrt:~# uci set luci_hosts.@host[-1].ipaddr=192.168.1.2
root@OpenWrt:~# uci export luci_hosts
package 'luci_hosts'

config 'host'
        option 'hostname' 'downloads.openwrt.org'
        option 'ipaddr' '192.168.1.2'

root@OpenWrt:~# /etc/init.d/luci_hosts restart
root@OpenWrt:~# ping -c 1 downloads.openwrt.org
PING downloads.openwrt.org (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=1.662 ms

--- downloads.openwrt.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.662/1.662/1.662 ms
root@OpenWrt:~# cat /etc/opkg.conf
src/gz snapshots http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /jffs
root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/Packages.gz
Connecting to downloads.openwrt.org (192.168.1.2:80)
Packages.gz          100% |*******************************|   142k 00:00:00 ETA
Inflating http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/snapshots
root@OpenWrt:~# opkg install mjpg-streamer
Installing mjpg-streamer (r68-2) to root...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/mjpg-streamer_r68-2_mips.ipk
Connecting to downloads.openwrt.org (192.168.1.2:80)
mjpg-streamer_r68-2_ 100% |*******************************|   111k 00:00:00 ETA
Installing libpthread (0.9.29-14.3) to root...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/libpthread_0.9.29-14.3_mips.ipk
Connecting to downloads.openwrt.org (192.168.1.2:80)
libpthread_0.9.29-14 100% |*******************************| 19212  00:00:00 ETA
Installing libjpeg (6b-1) to root...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/atheros/packages/libjpeg_6b-1_mips.ipk
Connecting to downloads.openwrt.org (192.168.1.2:80)
libjpeg_6b-1_mips.ip 100% |*******************************| 57891  00:00:00 ETA
Configuring libjpeg
Configuring libpthread
Configuring mjpg-streamer

To revert luci_hosts configuration,

root@OpenWrt:~# uci revert luci_hosts

In this way, you don't have to worry about package dependence.

Edit:
There's no need to alter LAN gateway. The "ping" after "luci_hosts restart" had proved it.

(Last edited by fyi on 3 Nov 2011, 15:44)

Nice howto, but he simply ran out of space.

zordlyon wrote:

people i'm trying to install the mjpg-streamer but return me this error:

root@OpenWrt:/tmp# opkg install mjpg-streamer_r68-2_mipsel.ipk 
Installing mjpg-streamer (r68-2) to root...
Collected errors:
 * Only have 0 available blocks on filesystem /, pkg mjpg-streamer needs 241

Run "df" and look at /overlay or /jffs.

Orca i'm real, not trying anyone, just have some difficults...and i'm newer on this plataform...sorry for the stupid questions people...

And thanks for help...

I go try them...

fyi wrote:
zordlyon wrote:

people i'm trying to install the mjpg-streamer but return me this error:

root@OpenWrt:/tmp# opkg install mjpg-streamer_r68-2_mipsel.ipk 
Installing mjpg-streamer (r68-2) to root...
Collected errors:
 * Only have 0 available blocks on filesystem /, pkg mjpg-streamer needs 241

Run "df" and look at /overlay or /jffs.

How i can free blocks??

root@OpenWrt:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
rootfs                    1280      1280         0 100% /
/dev/root                 1280      1280         0 100% /rom
tmpfs                     7176        48      7128   1% /tmp
/dev/mtdblock/4           2112       328      1784  16% /jffs
mini_fo:/jffs             1280      1280         0 100% /

Thanks..

zordlyon wrote:
/dev/mtdblock/4           2112       328      1784  16% /jffs

There should be plenty of space left. Please take a look at "/etc/opkg.conf".

Could you follow #18?

fyi wrote:
zordlyon wrote:
/dev/mtdblock/4           2112       328      1784  16% /jffs

There should be plenty of space left. Please take a look at "/etc/opkg.conf".

Could you follow #18?

I dont understand, what you mean with "follow #18"?

Thanks,
André Carvalho.

#18