Requirements:
Memory:
512M or more, 768M or more is recommended (Pure panel for about 60M of system memory)
Hard disk:
More than 100M available hard disk space (Pure panel for about 20M disk space)
System:
CentOS 7.1+ (Ubuntu16.04+., Debian9.0+), to ensure that it is a clean operating system, there is no other environment with Apache/Nginx/php/MySQL installed (the existing environment can not be installed)
Linux Panel Installation Command
Centos:
yum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && bash install.sh
The experimental Centos/Ubuntu/Debian/Fedora installation command supports ipv6. Note that this command is executed with root privileges (Centos8 is supported)
curl -sSO http://www.aapanel.com/script/new_install_en.sh && bash new_install_en.sh
Ubuntu/Deepin:
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && sudo bash install.sh
Debian:
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh
Remove panel
bt stop && rm -rf /www/server/panel && rm -f /usr/bin/bt && rm -f /etc/init.d/bt
Reinstall panel
Use the installation command to overwrite the installation
安装宝塔面板
Centos :
yum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && bash install.sh
The experimental Centos/Ubuntu/Debian/Fedora installation command supports ipv6. Note that this command is executed with root privileges (Centos8 is supported)
curl -sSO http://www.aapanel.com/script/new_install_en.sh && bash new_install_en.sh
Ubuntu/Deepin :
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && sudo bash install.sh
Debian :
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh
Remove BT:
service bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel
安装BBRplus
yum install wget
bash <(curl -s -L https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh)
安装Trojan
bash <(curl -fsSL https://raw.githubusercontent.com/trojan-gfw/trojan-quickstart/master/trojan-quickstart.sh)
配置Trojan
vi /usr/local/etc/trojan/config.json
把”cert”改为 /www/server/panel/vhost/ssl/域名/fullchain.pem
/www/server/panel/vhost/ssl/www.xxx.com/fullchain.pem
把”key”改为 /www/server/panel/vhost/ssl/域名/privkey.pem
/www/server/panel/vhost/ssl/www.xxx.com/privkey.pem
再改下密码,配置完成。
常用命令
启动服务
systemctl start trojan
停止服务
systemctl stop trojan
重启服务
systemctl restart trojan
查看状态
systemctl status trojan
开机自启
systemctl enable trojan
Portainer
Method A:
docker volume create portainer_data
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
Method B:
docker run -d -p 9000:9000 --name docker-portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
Method C:
upload public folder to /opt
docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -v /public:/public portainer/portainer:linux-arm64
HASS
docker pull homeassistant/aarch64-homeassistant
docker run -d --restart=always --name="home-assistant" -e TZ=Asia/Shanghai -v /var/lib/docker/homeassistant:/config -p 8123:8123 -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/aarch64-homeassistant:latest
OpenWRT
docker pull kanshudj/n1-openwrtgateway:r9
ip link set eth0 promisc on
docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=eth0 macnet
(IP地址是路由器所在网段)
docker run --restart always -d --network macnet --privileged kanshudj/n1-openwrtgateway:r9 /sbin/init
选择第四个命令行工具,点击Connect
vi /etc/config/network
修改网络配置,然后登录OpenWRT
root默认密码为password
EMQTT
docker run -d --restart=always --name="emqx" -v /etc/localtime:/etc/localtime -p 18083:18083 -p 1883:1883 killadm/aarch64-emqx:30
(http://192.168.0.101:18083 用户名admin 密码: public)
Nginx
docker pull nginx
docker run --name some-nginx -p 80:80 -v /www/html:/usr/share/nginx/html:ro -d nginx
KodExplorer
docker pull yulinsoft/kodexplorer
docker run -d -p 8080:80 --name kodexplorer -v /www/kodexplorer:/var/www/html yulinsoft/kodexplorer
Baidu Downloader
docker pull kunxiang/baidupcs
docker run --name baidu -p 5299:5299 -v /media/sda1/:/Downloads -d kunxiang/baidupcs
(/media/sda1为USB硬盘,具体可df -h查看,登陆后将下载目录volume修改成Downloads)
Aria2
Aria2 支持HTTP,FTP,BT,磁力链等,还可以使用迅雷离线下载(安装盒子伴侣apk应用 https://pan.baidu.com/s/1oVsIl)。
Aria2 需要设置“下载保存路径”到第一行显示的USB挂接目录,应用保存即可前去添加种子开始下载。
迅雷离线下载需在Chrome商店中查找安装Tampermonkey,然后打开http://s.binux.me/TLE/master/ThunderLixianExporter.user.js,会提示安装,点击“继续”安装,登陆迅雷离线:http://lixian.xunlei.com,进入后点击页面右上角的齿轮图标,在新窗口的启用以下导出器中,勾选“复制链接”和“YAAW”,在Aria2 JSON-RPC Path中填入http://192.168.x.xxx:6800/jsonrpc (192.168.x.xxx为盒子的IP地址)点击保存设置,离线下载中已经完成文件,点击一下文件名,在取回本地的右边,点击下拉列表,点击YAAW,这时盒子就开始下载了。
Transmission
Transmission 是 BT/PT 下载好工具。
Transmission 需要设置“下载保存路径”到第一行显示的USB挂接目录,应用保存即可前去添加种子开始下载。
注意事项:
关机前一定要“暂停“所有任务,否则下次开始任务的时候,会全部重新校验种子。
Transmission的配置文件在 /data/opt/etc/transmission 目录下,启动脚本在 /data/opt/etc/init.d/S50transmission,修改前一定要先暂停任务,再点击web上的停止transmission服务,修改后重新启动服务。
迅雷远程下载
需要具备一个迅雷账号,如果是会员可以快速通道和离线下载,登陆http://yuancheng.xunlei.com/,点击我的下载器右边的添加按钮,在弹出窗口切换到高清播放器分类,输入从web控制台得来的激活码,确定后完成网络机顶盒与迅雷的绑定,点击右边扳手的符号进行设置,然后就可以通过访问 http://yuancheng.xunlei.com 添加种子或者下载链接来远程下载了。
Docker
apt-get update
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
The line must be added to the file: /etc/apt/sources.list
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
apt install docker-ce
apt-get update
docker version
systemctl status docker
docker run hello-world
apt-get install docker-ce docker-ce-cli containerd.io
Portainer:
docker pull portainer/portainer
docker volume create portainer_data
docker run -d -p 9000:9000 --name docker-portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
oldiy/music-player-docker
docker pull oldiy/music-player-docker
docker run -d --name music -p 264:264 -v /music:/var/www/html/cache oldiy/music-player-docker
oldiy/youtube-dl-webui
docker pull oldiy/youtube-dl-webui
docker run -d --name youtube-dl -p 1080:80 oldiy/youtube-dl-webui:latest
LNMP
docker pull 2233466866/lnmp
docker run -dit -p 80:80 -p 443:443 -p 3306:3306 -v /www/html:/www -v /config/mysql:/data/mysql -v /config/my.cnf:/etc/my.cnf -v /config/nginx.conf:/usr/local/nginx/conf/nginx.conf -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged=true --name=lnmp 2233466866/lnmp
(Default password: cat /var/log/mysqld.log|grep 'A temporary password')
initialize:
Mysql的密码(默认并未重置密码和初始化)
password=cat /var/log/mysqld.log|grep 'A temporary password'
password=${password:91}
echo -e "${password}\n${password}n${password}nnnynynynyn"
以上三条命令的输出为以下命令的输入
mysql_secure_installation
配置文件路径(Config file path)
Nginx
/usr/local/nginx/conf/nginx.conf
MySQL
/etc/my.cnf
PHP
/usr/local/php7/lib/php.ini
/usr/local/php7/etc/php-fpm.conf
/usr/local/php7/etc/php-fpm.d/www.conf