内网穿透frp部署
前置条件:公网固定ip的服务器一台
frp下载地址: https://github.com/fatedier/frp/releases
frp是golang开发的项目,release里面有预编译好的二进制,可直接部署。
当前版本为frp_0.61.0
前置条件:公网固定ip的服务器一台
frp下载地址: https://github.com/fatedier/frp/releases
frp是golang开发的项目,release里面有预编译好的二进制,可直接部署。
当前版本为frp_0.61.0
大部分文章都是
$ cat /proc/cpuinfo
$ cat /proc/meminfo
但是对于arm系统非常不友好,看不到什么信息。用下面的新命令吧.
$ lscpu
$ lsmem
$ sudo apt install mysql-server
查看默认账号密码
$ sudo cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = JRvfA0JiQGk5qhnz
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = JRvfA0JiQGk5qhnz
socket = /var/run/mysqld/mysqld.sock
$ mysql -udebian-sys-maint -pJRvfA0JiQGk5qhnz
mysql>USE mysql;
// mysql 5.7
mysql>UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql>update mysql.user set authentication_string=password('xxx') where User='root' and Host='localhost';
// mysql 8.0
mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxx';
mysql>flush privileges;
mysql>exit;
golang官网已可以从中国访问,地址:The Go Programming Language
下载对应平台的bin包(源码编译需要golang1.4以上),并解压。
$ wget https://golang.google.cn/dl/go1.18.linux-arm64.tar.gz
$ tar zxvf go1.18.linux-arm64.tar.gz
需要手动添加dns服务器才能解析网址:
修改/etc/netplan/00-installer-config.yaml
内容如下,注意enp0s3需要修改
# This is the network config written by 'subiquity'
network:
ethernets:
enp0s3:
addresses: []
dhcp4: true
gateway4: 192.168.0.1
nameservers:
addresses: [223.5.5.5, 223.6.6.6]
version: 2
重启网络sudo netplan apply
Qemu在Linux安装新系统一次成功,在window下卡启动报告~
apt-get instll qemu qemu-utils qemu-system-x86
qemu-img create -f qcow2 ubunut18_x86_64.img 10G
qemu-img info ubunut18_x86_64.img
qemu-system-x86_64 --enable-kvm -m 1G -smp 2 -boot order=dc -hda /home/u0u0/works/qemu-images/ubuntu18.img -cdrom /home/u0u0/ubuntu-18.04.5-live-server-amd64.iso
sudo apt install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7
sudo update-alternatives --config gcc
错误信息:
Failed to Set MokListRT: Invalid Parameter
Could not create mokListRT: Invalid Parameter
Importing MOK states has failed: import_mok_state() failed: Invalid Parameter
Continuing boot since secure mode is disabled.
修正:
sudo su -
cd /boot/efi/EFI/ubuntu
cp grubx64.efi shimx64.efi
reboot
参考:(Ubuntu 20.04 Failed to Set MokListRT: Invalid Parameter)[https://askubuntu.com/questions/1279602/ubuntu-20-04-failed-to-set-moklistrt-invalid-parameter]
/etc/netplan/50-cloud-init.yaml
network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses:
- 154.204.42.134/24
gateway4: 154.204.42.254
match:
macaddress: fa:16:3e:b9:65:3b
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
set-name: ens3
应用修改
sudo netplan apply