修改默认启动顺序:
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 以避免影响生产环境。)
- 创建虚拟环境:python3 -m venv homeassistant
- 打开虚拟环境:cd homeassistant
- 激活虚拟环境:source bin/activate
- 安装 Home Assistant:python3 -m pip install --upgrade homeassistant
- 启动 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/
安装
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 查看所有参数,也可以使用 配置文件进行配置。
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、加入如下内容:
- module(“luci.controller.web.index2”, package.seeall)
- function index()
- local page = node(“web”,”misstar”)
- page.target = firstchild()
- page.title = (“”)
- page.order = 100
- page.sysauth = “admin”
- page.sysauth_authenticator = “jsonauth”
- page.index = true
- entry({“web”, “misstar”, “index”}, template(“web/setting/misstar/index”), _(“Tools”), 81)
- entry({“web”, “misstar”, “add”}, template(“web/setting/misstar/add”), _(“Tools”), 82)
- entry({“web”, “misstar”}, alias(“web”,”misstar”,”index”), _(“Tools”), 80)
- entry({“web”, “misstar”, “ss”}, template(“web/setting/applications/ss/html/ss”), _(“Tools”), 85)
- entry({“web”, “misstar”,”frp”}, template(“web/setting/applications/frp/html/frp”), _(“Tools”), 85)
- entry({“web”, “misstar”,”aliddns”}, template(“web/setting/applications/aliddns/html/aliddns”), _(“Tools”), 85)
- entry({“web”, “misstar”,”adm”}, template(“web/setting/applications/adm/html/adm”), _(“Tools”), 85)
- entry({“web”, “misstar”,”koolproxy”}, template(“web/setting/applications/koolproxy/html/koolproxy”), _(“Tools”), 85)
- entry({“web”, “misstar”,”rm”}, template(“web/setting/applications/rm/html/rm”), _(“Tools”), 85)
- entry({“web”, “misstar”,”aria2″}, template(“web/setting/applications/aria2/html/aria2”), _(“Tools”), 85)
- entry({“web”, “misstar”,”webshell”}, template(“web/setting/applications/webshell/html/webshell”), _(“Tools”), 85)
- entry({“web”, “misstar”,”pptpd”}, template(“web/setting/applications/pptpd/html/pptpd”), _(“Tools”), 85)
- entry({“web”, “misstar”,”ftp”}, template(“web/setting/applications/ftp/html/ftp”), _(“Tools”), 85)
- entry({“web”, “misstar”,”kms”}, template(“web/setting/applications/kms/html/kms”), _(“Tools”), 85)
- end
4、执行清理缓存命令:
- rm -rf /tmp/luci-indexcache
5、刷新前台页面即可。
cd /etc/ssh
chmod 0644 *
chmod 0600 ssh_host_rsa_key
service sshd restart