zoukankan      html  css  js  c++  java
  • 路由器02---PandoraBox配置

    1.安装libc

    什么是libc,这里贴一个gnu官方的解释
    Any Unix-like operating system needs a C library: the library which defines the ``system calls'' and other basic facilities such as open, malloc, printf, exit...
    The GNU C Library is used as the C library in the GNU system and in GNU/Linux systems, as well as many other systems that use Linux as the kernel.对于我们的意义就好像windows里面的.net组件,没装的话,各种软件报错。所以,我们要第一时间装好libc,那要怎么装?默认的opkg源里面没有libc,得自己下载。libc是比较接近底层的组件了,所以安装的时候硬件架构平台得严格匹配才能正常装好。
    所以,我们得搞清楚路由器用的什么架构。
    uname -a
    Linux PandoraBox 3.14.44 #1 Tue Jun 9 11:17:44 CST 2015 mips GNU/Linux
    得到一个machine type 是mips ,好像也没什么用。
    
    看看cpu的信息,sed -n 1,11p /proc/cpuinfo
    图中能看出,优酷路由器使用的是联发科的MT7620A型号的芯片,机器类型属于mips类的。
    也就是说,我们要装libc的话,ipk包名里面得包含有“mips_24kec”字样,遂google之,得到一个链接
    https://openwrt.mirrors.ustc.edu.cn/barrier_breaker/14.07/ramips/mt7620a/packages/base/libc_0.9.33.2-1_ramips_24kec.ipk
    用wget下载上面的链接,然后直接opkg install libc_0.9.33.2-1_ramips_24kec.ipk ,libc库就安装好了。装好这个东西,以后装软件,就不会报错缺少libc * * 了。

    优酷CPU

    可能出现的问题:

    Collected errors: * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-app-adbyby:*         libc *  
    * opkg_install_cmd: Cannot install package luci-app-adbyby.
    
    在网上下载了libc的ipk,可能不匹配导致安装后无法再正常启动路由器,管理页面bad way。

    你强行用别的 libc 替换会导致现有的依赖原来的 libc 的程序无法运行

    OPKG配置问题导致libc其实已经有了但是列表不显示,重新装又会导致之前那些依赖原本libc的程序炸掉,已经修改了OPKG相关配置,现在已经恢复正常,安装软件包正常了 

    2.安装ADBYBY 安装Vwan虚拟多拨(得宽带支持才能拨号成功) shadowsocks安装(简称SS)

     由于k1的硬件限制,8M的Flash。在没有硬改的情况下,路由无法安装太多的插件,包括众所周知的adbyby去广告插件。

    opkg install luci-app-adbyby
    这里by the way一下,带luci前缀的包都是有web管理的


    opkg update
    opkg install luci-app-syncdial

     opkg install luci-i18n-shadowsocks-zh-cn

    3.okpg

    4.开启ssh

    刷完pandorabox后默认没有开启SSH功能,如果需要开启,登陆到系统管理页面,配置如下图

     

    如果没有安装:

    安装dropbear(ssh)方法: telnet登陆后输入
    opkg install http://archive.openwrt.org/barrier_breaker/14.07/ramips/mt7620a/packages/base/dropbear_2014.63-2_ramips_24kec.ipk
    ssh开机自启
    /etc/init.d/dropbear enable
    更改root密码, 比如admin
    passwd=admin
    echo -e "$passwd $passwd" | passwd root
    启动ssh
    /etc/init.d/dropbear start

    5.常见错误

    包与固件不兼容。要么换包,要么换固件。

    下载自己路由器cpu版本的压缩包,

    Unknown package 'adbyby'.
    Collected errors:
    * pkg_hash_fetch_best_installation_candidate: Packages for adbyby found, but incompatible with the architectures configured
    * opkg_install_cmd: Cannot install package adbyby.
  • 相关阅读:
    IDEA一些介绍
    win32控制台程序使用CfileDialog进行文件读取
    判断GPS、网络是否开启
    使用高德地图SDK获取定位信息
    #子线程消息被阻挡
    strlen与sizeof
    C++中路径操作
    20155235 《网络攻防》 实验一 逆向及Bof基础实践说明
    20155235 《信息安全系统设计基础》课程总结
    2017-2018-1 20155235 《信息安全系统设计基础》第十四周学习总结
  • 原文地址:https://www.cnblogs.com/BlueFire-py/p/10843747.html
Copyright © 2011-2022 走看看