赞
踩
本文内容为刷机版U盘版本,需要直刷版可以留言,后续更。
本文已更新直刷版本
更新时间 2023.07.14
https://wiki.sipeed.com/hardware/zh/maixII/M2A/Usages-copy.html
直刷包 : https://github.com/hzyitc/armbian-onecloud
6.0 版本- 6.4 版本(HUB)
____ ___ _ ____ / ___| ( _ )/ |___ \ \___ \ / _ \| | __) | ___) | (_) | |/ __/ |____/ \___/|_|_____| Welcome to Debian GNU/Linux 10 (buster) with Linux 5.9.0-rc7-aml-s812 No end-user support: built from trunk System load: 110% Up time: 1 min Memory usage: 8% of 989M IP: 192.168.5.41 CPU temp: 32°C Usage of /: 1% of 122G storage/: 10% of 511M [ 0 security updates available, 22 updates total: apt upgrade ] Last check: 2023-01-08 17:53 [ General system configuration (beta): armbian-config ] Last login: Sat Jan 7 22:16:45 2023 from 192.168.0.1
在开机界面提示升级的话,可以选择使用 下面的代码进行升级,切记,最好只用这一个。
$ sudo apt-get dist-upgrade
升级完成后,进行重启
$ sudo reboot
在使用U盘或者其他设备进入U盘的镜像系统之后,选择上面的提示进行升级,然后再进行安装
注意:如果覆盖安装的话需要安装两次
安装过程中 玩客云 的灯会闪烁紫光,完成后蓝光常亮至熄灭,熄灭后即可拔掉电源
$ cd /boot/install
$ bash install.sh
或者
$ bash /boot/install/install.sh
直到ssh提示下面内容,进行断电然后取出U盘或者其他设备。
*******************************************
Complete copy OS to eMMC
*******************************************
可以了,等掉线直接拔电源。
Connection to [IP] closed by remote host.
Connection to [IP] closed.
然后静等设备开机,正确开机后设备的灯会进行闪烁(安装系统中),开机后网线灯两个都常亮或者闪烁是正确的。
sudo nano /etc/apt/sources.list
sudo apt update
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free
deb http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye main contrib non-free
#deb-src http://mirrors.aliyun.com/debian/ bullseye main contrib non-free
deb http://mirrors.aliyun.com/debian/ bullseye-updates main contrib non-free
#deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main contrib non-free
deb http://mirrors.aliyun.com/debian/ bullseye-backports main contrib non-free
#deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main contrib non-free
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main contrib non-free
#deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main contrib non-free
LNMP 官网教程 https://lnmp.org/install.html
使用官网提供的安装方法:(推荐)
$ wget http://soft.vpser.net/lnmp/lnmp2.0.tar.gz -O lnmp2.0.tar.gz && tar zxf lnmp2.0.tar.gz && cd lnmp2.0 && ./install.sh lnmp
建议安装,按提示操作,很简单。(全命令行)
$ cd lnmp1.9
$ bash ./proftpd.sh
关于 NGINX 的目录问题,目录存在于下面的位置。可以在 nginx.conf
里面进行修改
/home/local/wwwroot/nginx
挂载盘
★挂载硬盘(临时)
lsblk 或 lsblk -f 查看挂载情况
fdisk /dev/sda1(这里填你的硬盘目录) #给硬盘分区
mkfs -t ext4 /dev/sda1 #格式化硬盘选择ext4文件系统
mount /dev/sda1 【要挂载的目录】 #分区挂载到指定目录
★永久挂载
vim /etc/fstab #用vim打开文件
在最后填入
/dev/sda1(你的硬盘目录) /mydisk(要挂载的目录) ext4 defaulta 0 0
设置目录和文件的归属
使用
chown
命令为文件或目录设置归属
命令格式:
chown 属主 文件或目录
chown :属组 文件或目录
chown 属主:属组 文件或目录
注:同时设置属主、属组时,用户名和组名之间用冒号“:”进行分隔。如果只设置属组时,需使用“:组名”的形式。
常用选项:
-R:递归修改指定目录下所有文件、子目录的归属
rm
删除不掉文件,报错解决 以及 chattr
的介绍
出现这个错误:
rm: cannot remove ‘default/.user.ini’: Operation not permitted
然后呢 : 执行一下
chattr -i .user.ini
就可以正常删除了
chattr
这个命令的用法:chattr命令用来改变文件属性。这项指令可改变存放在ext2文件系统上的文件或目录属性,这些属性共有以下8种模式: a:让文件或目录仅供附加用途; b:不更新文件或目录的最后存取时间; c:将文件或目录压缩后存放; d:将文件或目录排除在倾倒操作之外; i:不得任意更动文件或目录; s:保密性删除文件或目录; S:即时更新文件或目录; u:预防意外删除。 语法: chattr(选项) 选项: -R:递归处理,将指令目录下的所有文件及子目录一并处理; -v<版本编号>:设置文件或目录版本; -V:显示指令执行过程; +<属性>:开启文件或目录的该项属性; -<属性>:关闭文件或目录的该项属性; =<属性>:指定文件或目录的该项属性。
开放/关闭 端口
sudo iptables -A INPUT -p tcp --dport 3306 --jump ACCEPT
iptables-save
设置允许远程连接
方法1:首先打开 mysqld.cnf
配置文件。
LNMP 的目录不一致,可在 https://lnmp.org/faq/lnmp-software-list.html 查找
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
sudo vi /etc/my.cnf # lnmp 环境下
找到这一行
bind - address
bind-address=127.0.0.1 # 只能监听本地链接,默认情况下
bind-address=[ip] # 远程连接 ip 可访问,可使用通配符 ip 地址 *
bind-address=:: # 全部 ipv6 地址
bind-address=0.0.0.0 # 全部 ipv4 地址
在某些 MySQL 版本的配置文件中,没有 bind - address
这一行,这种情况下,在合适的位置加上就可以了。
然后重启 MySQL 服务,使刚刚编辑的 mysqld.cnf
文件生效:
sudo systemctl restart mysql
方法2:
mysql>grant all privileges on *.* to root@'192.168.1.100' identified by '123456';
mysql>flush privileges;
说明:
@'192.168.1.100'
只是允许这台主机进行访问,如果设置为’%'则是所有主机可以登录访问,设置为’localhost’则是只允许本机访问。
设置连接数
方法一:
进入MySQL用命令行修改,但是MySQL重启后就失效了,需要重新设置。(不推荐)
命令如下:
1、show variables like 'max_connections';
(查看当前最大连接数)
2、set global max_connections=1000;
(设置最大连接数为1000,可以再次执行上面的命令查看设置是否成功)
方法二:修改MySQL配置文件,永久生效(推荐)
1、进入MySQL安装目录,打开my.ini
或my.cnf
文件;
2、查看max_connections=100
的配置参数,修改为max_connections=1000;
如果没有这个参数,直接添加max_connections=1000
即可;
3、保存配置文件并退出,重启MySQL服务即可。
查看数据库当前连接信息,可以看到连接数据库的进程id,ip,用户名,连接的数据库,连接状态,连接时长等命令:
SHOW FULL processlist
grant all privileges on *.* to root@'192.168.5.3' identified by '1234';
vim /sys/class/leds/onecloud:red:alive/brightness
首先在 配置处下载直刷包
例如:Armbian_23.08.0-trunk_Onecloud_jammy_edge_6.4.2.burn.img.xz
USB_Burning_Tool 等工具和包可以私聊联系
USB_Burning_Tool
工具文件
-导入烧录包
-选择下载的文件注意:需要将下载的 xxx.xz 包进行解压为 xx-burn.img
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。