峯言凬语 O ever youthful O ever weeping~
本无意与众不同,怎奈何口味太重。
首页
平水韵
颜色表
ABOUT
文章分类
友情链接

修改默认启动顺序:

sudo vi /etc/default/grub
GRUB_DEFAULT=0 (0改成win10系统的序号,一般是5)
GRUB_TIMEOUT=10 (10是默认的等待时间,改成15秒)

sudo update-grub
sudo reboot

安装
快速安装:

apt-get install python3-pip
pip3 install homeassistant
hass

一般安装:

apt install python3.5 python3.5-dev
apt install libpython3.5 libpython3.5-dev

将Python3.5设置为默认Python3:

update-alternatives --install /usr/bin/python python3 /usr/bin/python3.5 1
update-alternatives --config python3

Python 虚拟环境安装:
(Home Assistant 官方推荐使用 Python 虚拟环境安装 Home Assistant 以避免影响生产环境。)

  1. 创建虚拟环境:python3 -m venv homeassistant
  2. 打开虚拟环境:cd homeassistant
  3. 激活虚拟环境:source bin/activate
  4. 安装 Home Assistant:python3 -m pip install --upgrade homeassistant
  5. 启动 Home Assistant 并打开网页:hass –open-ui

维护

apt-get update
systemctl stop home-assistant@homeassistant.service
su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip3 install –upgrade homeassistant
exit
systemctl start home-assistant@homeassistant.service

更换pip源

vi /home/root/.pip/pip.conf

[global]
index-url = https://mirrors.aliyun.com/pypi/simple

清华:https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/

2018-08-17 |Nonni | TSI

安装

Debian / Ubuntu:

apt-get install python-pip
pip install shadowsocks

CentOS:

yum install python-setuptools && easy_install pip
pip install shadowsocks

使用

ssserver -p 443 -k password -m rc4-md5

如果要后台运行:

sudo ssserver -p 443 -k password -m rc4-md5 –user nobody -d start

如果要停止:

sudo ssserver -d stop

如果要检查日志:

sudo less /var/log/shadowsocks.log

用 -h 查看所有参数,也可以使用 配置文件进行配置。

2018-08-17 |Nonni | Net

MT工具箱安装:
首先你需要刷开发版并且开启SSH,SSH的开启和使用论坛已经有太多相关帖子,这里就不多说了!附上官方SSH链接https://d.miwifi.com/rom/ssh (注意,开启SSH意味着放弃保修)
最后用软件登上SSH(putty xshell
bash等随便啦)输入下面这一段安装命令,按照说明操作即可,整个过程不用1分钟。安装完直接登录后台管理页面就可以看到MT工具箱了,然后之后就不用ssh工具了!
安装和卸载命令如下:
2017新版,MT工具箱2.0
安装:

wget
http://www.misstar.com/tools/appstore/install.sh -O /tmp/install.sh
&& chmod +x /tmp/install.sh && /tmp/install.sh

(已安装的1.1.0或者1.3.0可以网页里面直接点升级,但是版本升级会丢失配置信息,如有重要数据请做好备份)
卸载:也可直接在管理页面卸载

wget
http://www.misstar.com/tools/uninstall.sh -O /tmp/uninstall.sh
&& chmod +x /tmp/uninstall.sh &&
/tmp/uninstall.sh

安装ShadowSocks:

/etc/misstar/scripts/appmanager add
ss

安装Misstar
tools 后打开 MT工具箱 无法访问

提示:No page
is registered at ‘/web/misstar/index’ .

If this url
belongs to an extension, make sure it is properly installed.

If the
extension was recently installed, try removing the
/tmp/luci-indexcache file.

1、ssh方root用户登录路由器后台;

2、执行命令:

vi /usr/lib/lua/luci/controller/web/index2.lua

3、加入如下内容:

  1. module(“luci.controller.web.index2”, package.seeall)
  2. function index()
  3.      local page   = node(“web”,”misstar”)
  4.      page.target  = firstchild()
  5.      page.title   = (“”)
  6.      page.order   = 100
  7.      page.sysauth = “admin”
  8.      page.sysauth_authenticator = “jsonauth”
  9.      page.index = true
  10.      entry({“web”, “misstar”, “index”}, template(“web/setting/misstar/index”), _(“Tools”), 81)
  11.      entry({“web”, “misstar”, “add”}, template(“web/setting/misstar/add”), _(“Tools”), 82)
  12.      entry({“web”, “misstar”}, alias(“web”,”misstar”,”index”), _(“Tools”), 80)
  13.      entry({“web”, “misstar”, “ss”}, template(“web/setting/applications/ss/html/ss”), _(“Tools”), 85)
  14.      entry({“web”, “misstar”,”frp”}, template(“web/setting/applications/frp/html/frp”), _(“Tools”), 85)
  15.      entry({“web”, “misstar”,”aliddns”}, template(“web/setting/applications/aliddns/html/aliddns”), _(“Tools”), 85)
  16.      entry({“web”, “misstar”,”adm”}, template(“web/setting/applications/adm/html/adm”), _(“Tools”), 85)
  17.      entry({“web”, “misstar”,”koolproxy”}, template(“web/setting/applications/koolproxy/html/koolproxy”), _(“Tools”), 85)
  18.      entry({“web”, “misstar”,”rm”}, template(“web/setting/applications/rm/html/rm”), _(“Tools”), 85)
  19.      entry({“web”, “misstar”,”aria2″}, template(“web/setting/applications/aria2/html/aria2”), _(“Tools”), 85)
  20.      entry({“web”, “misstar”,”webshell”}, template(“web/setting/applications/webshell/html/webshell”), _(“Tools”), 85)
  21.      entry({“web”, “misstar”,”pptpd”}, template(“web/setting/applications/pptpd/html/pptpd”), _(“Tools”), 85)
  22.      entry({“web”, “misstar”,”ftp”}, template(“web/setting/applications/ftp/html/ftp”), _(“Tools”), 85)
  23.      entry({“web”, “misstar”,”kms”}, template(“web/setting/applications/kms/html/kms”), _(“Tools”), 85)
  24. end

4、执行清理缓存命令:

  1. rm -rf /tmp/luci-indexcache

5、刷新前台页面即可​​​​。

2018-08-17 |Nonni | TSI

cd /etc/ssh

chmod 0644 *

chmod 0600 ssh_host_rsa_key

service sshd restart