N1刷armbian,安装cups(惠普打印机)

 

 

Default username: root
Default password: 1234
Install command: armbian-install
Update command: armbian-update
Edition: server

用到命令

更新软件apt update && apt upgrade 

mntui

安装U盘armbian

下载s905d系统:https://github.com/ophub/amlogic-s9xxx-armbian/releases

系统安装

PC安装balenaEtcher-Setup
镜像写入大于8G的U盘,Armbian_xxxxx.img

插入U盘,HDIM接显示屏,插上键盘,插网线,插上电源,进入系统。
(以下对应显示的提示,注释)

要求设置新的root密码:       (必须要8位,否则会失败)
重复输入
选择默认系统命令类型  ,选1(bash)
创建一个新帐户,可按Ctrl+C中止
请提供用户名:     (自行设定)
设置密码:  
重复输入
请提供您的真实姓名,您的帐户已创建并启用了 sudo,从现在开始,请将此帐户用于您的日常工作
获取到时区:亚州/上海
根据您的位置设置用户语言:y
生成语言环境:zh_CN.UTF-8
完成系统初始化

如果修改密码:命令:passwd
密码的文件:/etc/shadow,root:冒号之后为加密的密码

U盘刷入emmc

将U盘armbian写到emmc 

输入     armbian-install        开始安装
数分钟后,完成写入
关机命令:poweroff
拔掉电源,拔掉U盘,插入电源重新开机

PC端安装finalshell软件、ssh N1盒子

PC端安装putty软件
“连接管理器”中 “新建(ssh连接 (Linux)
主机:根据开机提示,填入N1获取到的IP
用户名:root
密码:步骤1中设置的root密码


固定网络mac地址

查看当前网络 ifconfig  (了解一下当前的网络状态)
修改配置文件
输入vi /etc/network/interfaces
    键入i
    清空interfaces中的内容
    复制下述代码到interfaces中
source /etc/network/interfaces.d/*
# Network is managed by Network manager # 网络由网络管理员管理
# Wired adapter #1 # 有线适配器 #1
allow-hotplug eth0 #自动开启 eth0
no-auto-down eth0 #不自动关闭 eth0
#iface eth0 inet dhcp #网口 eth0 dhcp 打开  与静态二选一,如果设置了静态,则在前面加#屏蔽
iface eth0 inet static #网口 eth0 静态,如果开启本行,则下面4行的取消行首的#屏蔽
address 192.168.50.219  #将面前的#去掉,可自行设置固定的主机ip
netmask 255.255.255.0  #自行设置子掩码
gateway 192.168.50.3 #自行设置网关
dns-nameservers 114.114.114.114 #根据自家的网络情况,自行设定DNS,多个dns 用空格分开
hwaddress ether d2:ed:1f:cb:a5:52  #自行设置固定的MAC
pre-up ifconfig eth0 hw ether d2:ed:1f:cb:a5:52 #自行设置固定的MAC

# Wireless adapter #1 # 无线适配器 #1
# Armbian ships with network-manager installed by default. To save you time
# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
# manually. The below lines are only meant as an example how configuration could #手动。 以下几行仅作为示例如何配置
# be done in an anachronistic way:
#
allow-hotplug wlan0 #允许热插拔 wlan0
#iface wlan0 inet dhcp #网口 wlan0 dhcp 打开  与静态二选一,如果设置了静态,则在前面加#屏蔽
iface wlan0 inet static #网口 wlan0 静态,如果开启本行(取消行首的#屏蔽),则下面4行的同样取消行首的#屏蔽
ddress 192.168.50.114 #将面前的#去掉,可自行设置固定的主机ip
netmask 255.255.255.0 #自行设置子掩码
gateway 192.168.50.3  #自行设置网关
dns-nameservers 114.114.114.114 
hwaddress ether b8:27:eb:74:f2:6c #自行设置固定的MAC
pre-up ifconfig wlan0 hw ether b8:27:eb:74:f2:6c #自行设置固定的MAC
#   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
#wireless-mode Managed
#wireless-power off

# Local loopback
auto lo
iface lo inet loopback

    按ESC键
    输入:wq    保存退出,
                   :q!   不保存推出   

也可以在finalshell图形中操作,复制代码,在粘贴
也可以删除/etc/network/interfaces后,替换修改好的文件

无线wifi配置

命令:armbian-config 

Network

IP

wlan0

static

│Address:      192.168.50.219    │ │  
│ │Netmask:      24                │ │  
│ │Gateway:      192.168.50.3      │ │  
│ │DNS:          192.168.50.3 

nmtui

Activate a connection #激活wifi 

在wifi上按空格

刷入wifi密码

设置固定wifi

修改国内源

nano /etc/apt/sources.list

清空sources里的内容,重新输入

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse

按Ctrl X退出

 

更新系统:
apt-get update 
apt-get upgrade
过程中 y  回车
重启,命令:reboot

 

安装docker

curl -fsSL https://get.docker.com/ | sh

安装1panel

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh

 

安装cups打印机服务器
安装CUPS
输入apt install cups
安装完成后,在/etc/cups/cupsd.conf修改cpusd.conf文件

# Only listen for connections from the local machine.
Listen 0.0.0.0:631  #在631端口监听所有的主机连接。
Listen /run/cups/cups.sock

# Web interface setting...
WebInterface Yes
DefaultEncryption Never #加入一行:默认从不加密

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow all     #加入一行
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow all    #加入一行
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow all    #加入一行
</Location>

里面所有#前加”#”注释掉,取消限制访问
#  Require user @SYSTEM
#  Require user @OWNER @SYSTEM

或者用cupsd.conf替换/etc/cups/cupsd.conf,安装好,目录刷新一下。

安装惠普驱动apt install hplip

如果想让windows ios 手机自动发现打印机,只要安装apt-get -y install avahi-daemon avahi-discover libnss-mdns

最后,设置开机启动

systemctl enable cups

systemctl enable avahi-daemon

查看驱动识别输入lpstat -p

重启cpus服务:systemctl restart cups

web管理页面,添加打印机:http://192.168.50.114:631 (ip为主机的地址)

PC添加打印机:http://192.168.50.219:631/printers/HP_LaserJet_Pro_MFP_M126a
(IP改成自己的)     

常用命令:
重启:reboot
关机:poweroff
刷新DNS:sudo ln -fs /run/resolvconf/resolv.conf /etc/resolv.conf


 

 

  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值