找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 17424|回复: 47

优酷路由宝L1安装迅雷云监工crysadm+

  [复制链接]
本帖最后由 qiana 于 2016-12-26 14:31 编辑

可装云监工固件\ipk包 python3 python3-pip redis
Padavan(entware-ng环境) ✓ 固件源有
✓ 固件源有 ✓ 固件源有
Pandorabox20161204版 ✓ 固件源有 ✓ 固件源有 ✕ 4楼有下载
OpenwrtDD(snapshot) ✓ 固件源有 ✓ 固件源有 ✕ 4楼有下载
优酷L1(L1w,L1c都可以)原版✕(加入entware-ng)✕(加入entware-ng)✕(加入entware-ng)


优酷L1(L1w,L1c都可以)原版系统(系统版本:2.1.0613.8617),其他固件安装思路类似(仅参考)
准备:
github下载好云监工crysadm+源代码压缩包,并放到U盘根目录,接上U盘到优酷路由宝。

开始:
.sshtelnet登录,切换u盘目录到/mnt/sda1(如果不是这个,自己改)
  1. cd /mnt/sda1
复制代码

.加入entware-ng环境(安装不全,只能算是加入),依次执行3个命令
  1. wget http://pkg.entware.net/binaries/mipsel/installer/installer.sh
  2. chmod +x installer.sh
  3. ./installer.sh
复制代码

./installer.sh第一次timeout了,只得继续一次)

.安装ipk包,python3 python3-pip redis
1. vi修改/opt/etc/opkg.conf文件,添加语句
  1. dest usb /mnt/sda1/entware
复制代码
,之后保存退出。




2.开始安装,网速差最好分别安装。
  1. /opt/bin/opkg update
  2. /opt/bin/opkg install python3 -d usb
  3. /opt/bin/opkg install python3-pip -d usb
  4. /opt/bin/opkg install redis -d usb
复制代码
(前缀/opt/bin/不能少,可能因网速问题,得多次执行到成功为止,卡住了可以Ctrl+C重新执行)

                                
.vi 修改/etc/profile(最好可以先备份),添加如下。
  1. export LD_LIBRARY_PATH=/mnt/sda1/entware/opt/usr/lib:/mnt/sda1/entware/opt/lib
  2. export OPT_PATH=/mnt/sda1/entware/opt/usr/sbin:/mnt/sda1/entware/opt/sbin:/mnt/sda1/entware/opt/bin:/mnt/sda1/entware/opt/usr/bin:/mnt/sda1/entware/opt/usr/local/sbin
  3. export PATH=$OPT_PATH:$YoukuHome:$YoukuHome/bin:/usr/bin:/usr/sbin:/bin:/sbin

  4. #export PATH=$YoukuHome:$YoukuHome/bin:/usr/bin:/usr/sbin:/bin:/sbin
  5. #记得注释
复制代码

执行
  1. source /etc/profile
复制代码
使之生效。



                                
(。。。python3not found?  无法运行python3,即使运行 source /etc/profile也不行(猜测是网速问题,或Padavan Hiboy说的wget命令有问题)。可以卸载 多次/opt/bin/opkgremove python3*直至卸载完成之后再重新安装python3 python3-pip)

.安装python3 packages( redis  requests  flask ),执行以下四个命令(第一个切换目录命令必须执行)
  1. cd  /mnt/sda1/entware/opt/bin
  2. python3 pip3 install redis -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  3. python3 pip3 install requests -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
  4. python3 pip3 install flask -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
复制代码
(如果3个包,一条命令一起安装可能内存不足错误,得重新执行安装出错的包。   -i http://pypi.douban.com/simple --trusted-host pypi.douban.com  可以去掉这国内豆瓣源,网速快的话)


六.执行一下命令,添加dns,最好替换速度快的,否则运行python3 crysadm.py 出现编码错误(UnicodeDecodeError:'utf-8' codec can't decode byte 0xc0 in position 0: invalid startbyte)。
  1. echo 'nameserver 202.103.224.68' > /etc/resolv.conf
复制代码


.修改crysadm源码目录的config.py, 禁用Debug以减少cpu内存占用。
1.进入迅雷云监工源码目录
  1. cd /mnt/sda1/crysadm
复制代码

2.vi 修改config.py,(生产环境禁用DEBUG,改True为False)减少cpu内存占用,如图:
  


八.以上环境已建好,可以运行了。
1.运行redis (自动生成 数据库文件/mnt/sda1/crysadm/dump.rdb)
  1. redis-server &
复制代码

2.运行crysadm_helper.py后台
  1. python3  crysadm_helper.py &
复制代码
top命令查看,如果cpu占用50%以上,先等等,否则可能死机卡住,不要急着运行crysadm.py.约不到半半分钟。
初次运行,出现TypeError:mget() missing 1 required positional argument: 'keys'说明已经运行成功了。

3.运行web后台
  1. python3  crysadm.py &
复制代码
出现( *Running on http://0.0.0.0:4000/ (Press CTRL+C to quit)后,可以打开浏览器访问http://192.168.11.1:4000/

(记得http://192.168.11.1:4000/install获取密码,如果忘了,可以停止redis,删掉/mnt/sda1/crysdam/dump.rdb数据库文件,注意 所有数据都清空了)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
来自手机 | 显示全部楼层
开开心心啦
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

看看 学习一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
本帖最后由 qiana 于 2016-12-27 23:39 编辑

开机启动脚本谁给编写个吧

以下固件不需要按照上面来加入entware-ng环境。直接安装(opkg install) python3 python3-pip redis (-d usb)即可。第六步操作可能需要;第七步操作禁用debug可以减少cpu内存占用。

PandoraBox没有redis,自己编译了一个记得解压z再opkg install。
有个770k大小的redis_3.2.6-1_mipsel_24kec_dsp.zip,就不上传了。
PandoraBox 2016-12-04 版固件 安装云监工,单帐号稳定运行3天(就停止测试了),运行过程没有出现卡死现象,这几天没有出现云监工异常。


Padavan(hiboy版)无法运行python3 crysadm_helper.py, 出现 can't start new thread.....(27号有解决方法了,见这里)
  1. Traceback (most recent call last):
  2.   File "crysadm_helper.py", line 786, in <module>
  3.     threading.Thread(target=timer, args=(collect_crystal, config_info['collect_crystal_interval'])).start()
  4.   File "/opt/lib/python3.5/threading.py", line 844, in start
  5.     _start_new_thread(self._bootstrap, ())
  6. RuntimeError: can't start new thread
复制代码


Github找Padavan汉化包,用padavan / rt-n56u — Bitbucket源码编译固件,可以运行云监工。Padavan安装步骤看这里

Openwrt Snapshot版(代号DD)完美,无错误(好像不需要第六步操作);可用redis包下载后要解压成ipk包。(刚刚把700k的这个redis_3.2.6-1_ramips.zip传到数码之家了,恩山的附件不能大于500k)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

如果3个一条命令一起安装可能内存不足
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
虽然用不上,但还是支持一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
百度(迅雷赚钱宝)贴吧发,秒删
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 99010 于 2016-12-21 23:32 编辑

mips跑起来占cpu比较大

点评

修改云监工里到config.py. class ProductionConfig(Config): DEBUG = False 改为False,Github下载的都是True,可以减少cpu/内  详情 回复 发表于 2016-12-21 22:58
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
99010 发表于 2016-12-21 22:45
mips跑起来占cpu比较大

修改云监工里到config.py.
class ProductionConfig(Config):                                
    DEBUG = False                                          
改为False,Github下载的都是True,可以减少cpu/内存占用。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

openwrt x86 chroot debian

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

看看效果怎么样
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

如果您要查看本帖隐藏内容请
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

非常好,但长时间运行估计路由器会死掉,不让树莓派好使。脚本里应该有run.sh,直接运行就好了,再加入到开机启动里或做个定时任务就完美了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

神人啊!马克一下,回家试试看~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

试试看稳不稳定
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-29 09:05

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表