一、原材料:rtl8723du-5.2.15.deb
二、任务目标:制作出rtl8723du-5.2.15.deb的apt-get源,并生成秘钥,使得用户在添加秘钥之后,执行sudo apt-get install rtl8723du即可无需验证安装rtl8723du-5.2.15.deb
三、必要步骤:
(1)以下是服务器上的操作,示例以apache为例
- 在任意目录建立一个文件夹作为apt源的仓库,比如rtl-apt-rep,并cd rtl-apt-rep
- 建立conf文件夹并在其目录下建立distributions文件,sudo mkdir conf;sudo vim conf/distributions,其简略版内容为 复制代码1
2
3
4
5
6
7
8
9
10
11
12
13Origin: librecomputer.debstack.com Label: apt repository Codename: rtl8723du Architectures: any Components: main Description: Aframe debian package repo SignWith: yes
- 将deb添加到该仓库sudo reprepro --ask-passphrase -Vb . includedeb rtl8723du deb包所在路径/rtl8723du-5.2.15.deb
- 生成仓库秘钥以提供信任支持 sudo gpg --armor --output librecomputer@librecomputer.debstack.com.gpg.key --export 你的邮箱
- 将var/www/html下的index文件删除,并把rtl-apt-rep目录下的文件复制到var/www/html目录下,sudo cp -r 仓库路径/rtl-apt-rep/* . var/www/html/(当然这里也可以将rtl-apt-rep整个仓库复制到www目录下,但是需要修改apache的配置文件)
(2)以下是模拟用户的操作
- 将服务器的源添加到用户的source.list中。即添加deb http://服务器IP/ rtl8723du main到etc/apt/sources.list结尾,好像可以通过sudo echo “deb http:// 服务器IP / rtl8723du main” >> etc/apt/sources.list添加,当然可以手动了
- 下载并添加秘钥文件,将该源的仓库设为可信任sudo wget -O - http:// 服务器IP /librecomputer@librecomputer.debstack.com.gpg.key|sudo apt-key add -
- 安装,sudo apt-get updata; sudo apt-get install rtl8723du
最后
以上就是碧蓝樱桃最近收集整理的关于利用debian包制作可信任的apt源的全部内容,更多相关利用debian包制作可信任内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复