openwrt固件安装IPK软件两种方法opkg安装软件
简介
Openwrt是个很自由的开源路由器系统,软件包支持几千个,功能很强大!
关于opkg官网wiki有更详细的说明,包括IPK的源相关介绍
请直达连接:http://wiki.openwrt.org/zh-cn/doc/techref/opkg
安装的方法主要有两种
telnet或者ssh连接后台安装、页面安装
下面的所有步骤的前提是当前的路由器已经联网!
一、telnet、ssh、TTL安装
原始的OpenWRT默认是没有密码的,只开启了telnet没有开启ssh,当第一次配置完用户名和密码后,关闭了telnet开启了ssh,用户可以随时连上路由器,下面我用ssh连接的。
1、如果你想要安装一个软件,但是不知道什么具体的名字,可以用命令获取到软件包的名字(opkg list |grep 软件名),然后安装,比如我想要安装tftp
root@iDianJia:/# opkg list | grep tftpd atftpd - 0.7-1 - TFTP server iputils-tftpd - 20101006-1 - Program tftpd from iputils Trivial File Transfer Protocol server. tftpd-hpa - 0.48-3 - An enhanced version of the BSD TFTP server root@iDianJia:/#
2、通过上面的命令我找到我想要的tftp服务器的名字为tftpd-hpa,这样就可以先用
#opkg download tftpd-hpa
3、下载软件包,然后用
#opkg install tftpd-hpa
4、来安装。也可以直接用
#opkg install tftpd-hpa
5、会直接先下载再自动安装。最后用
#opkg list-installed |grep tftpd-hpa
6、来查看是不是已经安装上了!
Openwrt管理软件包的命令是opkg,下面是命令的帮助
root@openwrt:/# opkg -h opkg: unrecognized option `-h' opkg must have one sub-command argument usage: opkg [options...] sub-command [arguments...] where sub-command is one of: Package Manipulation: update Update list of available packages upgrade <pkgs> Upgrade packages install <pkgs> Install package(s) configure <pkgs> Configure unpacked package(s) remove <pkgs|regexp> Remove package(s) flag <flag> <pkgs> Flag package(s) <flag>=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 <pkg> List files belonging to <pkg> search <file|regexp> List package providing <file> find <regexp> List packages whose name or description matches <regexp> info [pkg|regexp] Display all info for <pkg> status [pkg|regexp] Display all status for <pkg> download <pkg> Download <pkg> to current directory compare-versions <v1> <op> <v2> 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[<level>] Set verbosity level to <level>. --verbosity[=<level>] Verbosity levels: 0 errors only 1 normal messages (default) 2 informative messages 3 debug 4 debug level 2 -f <conf_file> Use <conf_file> as the opkg configuration file --conf <conf_file> --cache <directory> Use a package cache -d <dest_name> Use <dest_name> as the the root directory for --dest <dest_name> package installation, removal, upgrading. <dest_name> should be a defined dest name from the configuration file, (but can also be a directory name in a pinch). -o <dir> Use <dir> as the root directory for --offline-root <dir> offline installation of packages. --add-arch <arch>:<prio> Register architecture with given priority --add-dest <name>:<path> 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 --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*' root@openwrt:/#
二、页面安装
进入页面“系统->软件包”
在“过滤器”里面输入“tftpd”,点击“查找软件包”,在下面的框中就显示出当前openwrt支持的软件包,找到需要的,点击“安装”即可。见下图
当然这一步的前提条件是必须opkg的源是ok的,并且路由器已经联网。
相关推荐
OpenWrt安装IPK提示依赖包冲突错误openwrt软件IPK软件包安装依赖冲突
OpenWrt opkg安装IPK提示依赖包错误But that file is already provided by package * libubox20170601
相关推荐
make V=s编译后log日志openwrt生成固件firmware注释
openwrt固件生成ipk的过程ipk是如何生成的?ipk文件本质是什么?
点击链接加入群聊三群:751529538
点击链接加入群聊二群:376877156
点击链接加入群聊【路由器交流群:622891808已满】
本站附件分享,如果附件失效,可以去找找看
饿了么红包