cndaqiang / E5-PC-daily

服务器集群管理遇到的问题和总结
1 stars 0 forks source link

玩客云 armbian #40

Closed cndaqiang closed 3 years ago

cndaqiang commented 3 years ago

刷机教程 https://cndaqiang.github.io//2020/11/19/wanke/

cndaqiang commented 3 years ago

换源

cp /etc/apt/sources.list /etc/apt/sources.list.back
sed -i 's/httpredir.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sed -i 's,security.debian.org,mirrors.ustc.edu.cn/debian-security,g' /etc/apt/sources.list
apt update

报错

E: The repository 'http://apt.armbian.com buster Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Release file for http://mirrors.ustc.edu.cn/debian/dists/buster-backports/InRelease is not valid yet (invalid for another 359d 2h 47min 40s). Updates for this repository will not be applied.
E: Release file for http://mirrors.ustc.edu.cn/debian-security/dists/buster/updates/InRelease is not valid yet (invalid for another 358d 9h 12min 40s). Updates for this repository will not be applied.

因为时间不准

root@aml:~# date
Tue 26 Nov 2019 05:44:57 PM UTC

设置时间后即可update

date --s '20201120 10:33'

网络校准

apt update
apt-get install ntpdate
ping ntp.aliyun.com
ntpdate ntp.aliyun.com

结果

20 Nov 02:38:18 ntpdate[3910]: step time server 203.107.6.88 offset -28777.728009 sec

设置时区

tzselect
cndaqiang commented 3 years ago

安装要用的软件

apt install vim
cndaqiang commented 3 years ago

FRPC

cat > /etc/systemd/system/frpc.service <<EOF
[Unit]
[Service]
ExecStart=/opt/Frp/frpc_linux_arm -f xxx:xxx
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable frpc
systemctl start frpc
cndaqiang commented 3 years ago

开机脚本

直接vi /etc/rc.local就行

cndaqiang commented 3 years ago

挂载nfs

apt install nfs-common
root@aml:~# mkdir /home/data
root@aml:~# mount mom:/home/NFS /home/data #并加到开机启动脚本

用户和开发目录

sudo adduser --home /home/cndaqiang cndaqiang
su cndaqiang
cndaqiang@aml:~$ echo '
> #ln -s $HOME/../data/ssh ~/ssh
> if [ -d ~/ssh ]
> then
>    rm -rf ~/.ssh
>   mkdir ~/.ssh
>   cp -r ~/ssh/*  ~/.ssh/
>   chmod 600 ~/.ssh/authorized_keys
>   chmod 600 ~/.ssh/id_rsa
>   chmod 600 ~/.ssh/id_rsa.pub
>   chmod 700 ~/.ssh
> fi
> ' >> ~/.bashrc
cndaqiang@aml:~$ ln -s $HOME/../data/ssh .
cndaqiang@aml:~$ ln -s $HOME/../data/work/ .
cndaqiang@aml:~$ ln -s $HOME/../data/package/ .
cndaqiang@aml:~$ ln -s $HOME/../data/code/ .
cndaqiang commented 3 years ago

代理加内网穿透时看1080p资源消耗 image

cndaqiang commented 3 years ago

WIFI

sudo apt install armbian-config
armbian-config

即可配置连接,有了

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.xxx  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fd14:9f83:c307:0:754a:40f9:ebbd:2452  prefixlen 64  scopeid 0x0<global>
        inet6 fd14:9f83:c307::4bf  prefixlen 128  scopeid 0x0<global>
        inet6 fe80::a57:ff:fe82:d08d  prefixlen 64  scopeid 0x20<link>
        ether 08:57:00:82:d0:8d  txqueuelen 1000  (Ethernet)
        RX packets 54  bytes 5816 (5.6 KiB)
        RX errors 0  dropped 22074  overruns 0  frame 0
        TX packets 71  bytes 13866 (13.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0