OpenWrt 15.05小记

1 opkg 添加源示例

    ARCH=ramips
    wget http://openwrt-dist.sourceforge.net/packages/openwrt-dist.pub
    opkg-key add openwrt-dist.pub
    echo "src/gz openwrt_dist http://openwrt-dist.sourceforge.net/legacy/base/$ARCH" >>/etc/opkg.conf
    echo "src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/legacy/luci" >>/etc/opkg.conf

2 opkg 常用指令

与apt类似

Package Manipulation:
        update                  Update list of available packages
        upgrade           Upgrade packages
        install           Install package(s)
        configure         Configure unpacked package(s)
        remove     Remove package(s)
        flag        Flag package(s)
         =hold|noprune|user|ok|installed|unpacked (one per invocation)

Informational Commands:
        list                    List available packages
        list-installed          List installed packages
        list-upgradable         List installed and upgradable packages
        list-changed-conffiles  List user modified configuration files
        files              List files belonging to 
        search     List package providing 
        find            List packages whose name or description matches 
        info [pkg|regexp]       Display all info for 
        status [pkg|regexp]     Display all status for 
        download           Download  to current directory
        compare-versions   
                            compare versions using <= < > >= = << >>
        print-architecture      List installable package architectures
        depends [-A] [pkgname|pat]+
        whatdepends [-A] [pkgname|pat]+
        whatdependsrec [-A] [pkgname|pat]+
        whatrecommends[-A] [pkgname|pat]+
        whatsuggests[-A] [pkgname|pat]+
        whatprovides [-A] [pkgname|pat]+
        whatconflicts [-A] [pkgname|pat]+
        whatreplaces [-A] [pkgname|pat]+

Options:
        -A                      Query all packages not just those installed
        -V[]             Set verbosity level to .
        --verbosity[=]   Verbosity levels:
                                        0 errors only
                                        1 normal messages (default)
                                        2 informative messages
                                        3 debug
                                        4 debug level 2
        -f           Use  as the opkg configuration file
        --conf 
        --cache      Use a package cache
        -d           Use  as the the root directory for
        --dest       package installation, removal, upgrading.
                                 should be a defined dest name from
                                the configuration file, (but can also be a
                                directory name in a pinch).
        -o                 Use  as the root directory for
        --offline-root     offline installation of packages.
        --add-arch :        Register architecture with given priority
        --add-dest :        Register destination with given path

Force Options:
        --force-depends         Install/remove despite failed dependencies
        --force-maintainer      Overwrite preexisting config files
        --force-reinstall       Reinstall package(s)
        --force-overwrite       Overwrite files from other package(s)
        --force-downgrade       Allow opkg to downgrade packages
        --force-space           Disable free space checks
        --force-postinstall     Run postinstall scripts even in offline mode
        --force-remove  Remove package even if prerm script fails
        --force-checksum        Don't fail on checksum mismatches
        --noaction              No action -- test only
        --download-only No action -- download only
        --nodeps                Do not follow dependencies
        --nocase                Perform case insensitive pattern matching
        --force-removal-of-dependent-packages
                                Remove package and all dependencies
        --autoremove            Remove packages that were installed
                                automatically to satisfy dependencies
        -t                      Specify tmp-dir.
        --tmp-dir               Specify tmp-dir.

 regexp could be something like 'pkgname*' '*file*' or similar
 e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'

3 OpenWrt luci配置文件

位于/etc/config,可使用vim命令直接修改。

4 日志文件

位于/tmp/log/
内核日志dmesg
系统日志logread

你可能感兴趣的:(OpenWrt 15.05小记)