OrangePi debain server 上手整理

本文详细介绍了如何在Debian系统中配置源、时区及语言环境,并提供了遇到常见问题时的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

中科大

deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free

deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free

deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free

deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free

修改时区

先说时区的配置。以前Debian有个好神的时区配置工具,叫tzconfig,现在也没有了。但配置时区倒也简单,主要是两个文件:

/etc/localtime

/etc/timezone

timezone这个文件是个文本,里面只需要写一行自己的时区就行,我们这里就是上海,Asia/Shanghai(谁知道为什么不是北京 呢?)。 localtime这个文件的类型不清楚,里面就写了些timezone data,它可以从系统自带时区文件那里拷贝,位置在:

/usr/share/zoneinfo

从这个目录下找到Shanghai拷贝到/etc下的localtime即可。有人说建个连接也可,这样还可以保证系统数据有变化时不必再管。

配置中文

dpkg-reconfigure locales
apt-get install ttf-arphic-gbsn00lp
apt-get install ttf-arphic-gkai00mp
重启

打开/etc/enviroment文件,通常会发现下面两个 字段:

LANGUAGE=“en_US:en”

LANG=“zh_CN”

在LANGUAGE字段添加中文的设置,比如:

LANGUAGE=“zh_CN:zh:en_US:en”

重启

出现Reading package lists… Done

W: There is no public key available for the following key IDs:

6FB2A1C265FFB764

源出现问题

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

出现没有 key 的问题。

apt-get install debian-keyring debian-archive-keyring
安装key源
apt-key update
更新key

接着
apt-get update
解决

安装完PI服务端,重新启动计算机后,PI系统就开始运行了,这时PI的默认数据库只有3个,大小为安装时配置的1024M,此时还需再增加几个数据库,以保证数据长时间存放,增加方法如下,点击“开始”—“运行”,输入“CMD”,然后转到PI安装目录,例如:“c:\pi\adm”。这时,运行创建数据库文件命令,命令格式如下: ●创建数据库文件 piarcreate -d path maxpoints maxsize(Mb) piarcreate path size(Mb) eg: piarcreate .exe D:\PIPC\DAT\ piarch.004 1024 ●关联数据库文件 piartool.exe -ar path eg: piartool.exe –ar D:\PIPC\DAT\ piarch.004 3.配置接口机和服务器之间的通讯。 有些网络中,接口机和服务器之间的通讯需要在服务器端开通和接口机的认证,同增加数据库的方法一样,进入“c:\pi\adm”,运行“piconfig”命令,进入PI系统命令格式。运行如下: C:\PI\adm>piconfig * (Ls - ) PIconfig> table pitrust //选择表 * (Ls - PITRUST) PIconfig> @mode creat //进入创建模式 * (Cr - PITRUST) PIconfig> @istr trust,ipaddr,netmask,piuser //这里trust可以自己取个名字,IPADDR就是接口机的IP地址,netmask是255.255.255.255,piuser 用piadmin * (Cr - PITRUST) PIconfig> client2, 192.168.28.227,255.255.255.255,piadmin //例子 * (Cr - PITRUST) PIconfig> @ends * (Cr - PITRUST) PIconfig> @mode list //浏览模式 * (Ls - PITRUST) PIconfig> @ostr * * (Ls - PITRUST) PIconfig> @sele trust = * //选择所有TRUST名 * (Ls - PITRUST) PIconfig> @ends //结束后系统会列举出所有的配置 二.PI OPC接口机的安装及配置 PI OPC接口机端的安装源程序由3部分组成,在PIOPC目录下面,有2个文件夹“PIAPI”和“NTI”,先安装PIAPI,安装时配置如下:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值