Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Configuring Package Repositories in OpenWrt

Tech 1

Editing Package Feeds Configuration

OpenWrt uses opkg for package management. The package repository locations are defined in /etc/opkg/distfeeds.conf. To modify the feeds, open this file with a text editor:

vi /etc/opkg/distfeeds.conf

Updating Repository URLs

Comment out or replace the default repository entries. Below are configurations for different hardware architectures.

x86/64 Architecture

src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.4/targets/x86/64/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.4/packages/x86_64/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.4/packages/x86_64/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.4/packages/x86_64/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.4/packages/x86_64/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.4/packages/x86_64/telephony

MIPS Architecture (RAMIPS MT7621)

src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7621/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/telephony

Save the file and exit the editor.

Refreshing Package Lists

After modifying the repository configuration, fetch the latest package information:

opkg update

Resolving Signature Verification Errors

If signature verification failures occur, disable the check in /etc/opkg.conf:

vi /etc/opkg.conf

Locate and comment out the signature check option:

#option check_signature

Run the update command again:

opkg update

Installing Packages

The folowing example demonstrates installing SNMP components:

opkg install snmpd
opkg install snmp-utils

Configuring SNMP

Edit the SNMP daemon configuration file and add the following directives:

sysLocation DataCenter_A
sysContact netadmin@example.com

rocommunity public 10.10.10.106

Building Software from Source (Optional)

To compile software on the router, install the necessary build tools:

opkg install gcc make

For example, to compile the shell script compiler (shc):

tar zxvf shc-release.tar.gz
wget https://github.com/neurobin/shc/archive/release.tar.gz
cd shc-release/

./configure
make
make install

cd src
cp shc /usr/bin/

The compiled binary will be available at /usr/bin/shc.

Tags: OpenWrt

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.