当前位置: 首页 > news >正文

房地产网站建设批发网络推广公司网站

房地产网站建设批发,网络推广公司网站,个人可以采集视频做网站吗,网站规划建设创建一个打包的目录,类似rpmbuild,这里创建了目录deb_build mkdir deb_build目标 我有一个hello的二进制文件hello和源码hello.c, 准备安装到/opt/helloworld目录中 步骤 在deb_build目录创建一个文件夹用于存放我的安装文件 mkdir helloworld在he…

创建一个打包的目录,类似rpmbuild,这里创建了目录deb_build

mkdir  deb_build

目标

我有一个hello的二进制文件hello和源码hello.c, 准备安装到/opt/helloworld目录中

步骤

  1. 在deb_build目录创建一个文件夹用于存放我的安装文件
mkdir helloworld
  1. 在helloworld文件里创建DEBIAN文件夹和opt文件夹
  2. 在DEBIAN文件夹创建一个文件control
  3. 在opt文件夹新建一个helloworld文件夹,存放上hello和hello.c,如下
$ tree helloworld/
helloworld/
├── DEBIAN
│   └── control
└── opt└── helloworld├── hello└── hello.c3 directories, 3 files

control文件类似rpm的spec文件,包含deb的包信息

只要把想安装的文件写到对应目录就可以安装到对应的系统目录

这里描述一个最简易的control文件

Package: helloworld
Description: my deb test
Maintainer: username <user@mail.com>
Version: 0.1
Architecture: all
  1. 回到deb_build目录,执行dpkg -b helloworld即可在当前目录生成deb包
$ dpkg -b helloworld
dpkg-deb: building package 'hello' in 'helloworld.deb'.

也可以指定dpkg -b hellorld hellorld-0.1-all.deb

$ dpkg -b helloworld helloworld-0.1-all.deb
dpkg-deb: building package 'helloworld' in 'helloworld-0.1-all.deb'.
  1. 观看deb包的信息
查看包的字段信息:
$ dpkg -f helloworld-0.1-all.deb 
Package: helloworld
Description: my deb test
Maintainer: WangLin <email@163.com>
Version: 0.1
Architecture: all
查看deb包的详细信息:
$ dpkg -I helloworld-0.1-all.deb new Debian package, version 2.0.size 2804 bytes: control archive=296 bytes.112 bytes,     5 lines      control              Package: helloworldDescription: my deb testMaintainer: WangLin <email@163.com>Version: 0.1Architecture: all
查看deb包中的文件列表:
$ dpkg -c helloworld-0.1-all.deb
drwxrwxr-x wanglin/wanglin   0 2023-01-11 07:51 ./
drwxrwxr-x wanglin/wanglin   0 2023-01-11 07:54 ./opt/
drwxrwxr-x wanglin/wanglin   0 2023-01-11 07:54 ./opt/helloworld/
-rwxrwxr-x wanglin/wanglin 8304 2023-01-11 07:53 ./opt/helloworld/hello
-rw-rw-r-- wanglin/wanglin  100 2023-01-11 07:53 ./opt/helloworld/hello.c
  1. 安装打好的deb包
$ sudo dpkg -i helloworld-0.1-all.deb 
Selecting previously unselected package helloworld.
(Reading database ... 208913 files and directories currently installed.)
Preparing to unpack helloworld-0.1-all.deb ...
Unpacking helloworld (0.1) ...
Setting up helloworld (0.1) ...

此时/opt/helloworld/hello和hello.c 就安装在/opt/helloworld目录下了

检测安装效果

  • 查看包安装
$ dpkg -l helloworld
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-===================================================
ii  helloworld              0.1              all              my deb test
  • 检测/opt/helloworld目录
$ ls /opt/helloworld/
hello  hello.c$ sudo /opt/helloworld/hello
hello world
  • 查看包的安装信息
$ dpkg -s helloworld
Package: helloworld
Status: install ok installed
Maintainer: WangLin <email@163.com>
Architecture: all
Version: 0.1
Description: my deb test
  • 查看/var/lib/dpkg/status中的记录
$ cat /var/lib/dpkg/status|grep helloworld -A 5
Package: helloworld
Status: install ok installed
Maintainer: WangLin <email@163.com>
Architecture: all
Version: 0.1
Description: my deb test
  • 查看deb包安装了哪些文件
$ dpkg -L helloworld
/.
/opt
/opt/helloworld
/opt/helloworld/hello
/opt/helloworld/hello.c

在这里插入图片描述

http://www.dt0577.cn/news/8102.html

相关文章:

  • 建设交友网站seo项目
  • 网站建设全网营销客户资源sem代运营费用
  • 北京专业网站建设公司哪家好广告联盟平台自动赚钱
  • 怎么做自己的电影网站今天时政新闻热点是什么
  • 小清新文章网站百度免费发布信息
  • 艺纵网站建设东莞推广平台有哪些
  • asp动态网站建设免费推广
  • 深圳做英文网站关键词推广优化排名如何
  • 深圳广胜达建设公司外贸网站seo
  • 做网站花的钱和优化网站有关系吗如何优化网页加载速度
  • net112企业建站系统推广app有哪些
  • 网站改版上线广告词
  • 营销型网站建设哪家便宜自媒体论坛交流推荐
  • 常州外贸集团 网站建设谷歌google官方下载
  • 大连中山网站建设域名是什么意思呢
  • 国内手机网站建设百度搜索网站优化
  • 网站建设suteng互联网产品运营
  • 中国有哪些企业网站小程序开发公司十大排名
  • 在线网站制作模拟数据分析网站
  • 做实体店推广的网站免费加客源
  • 武汉网站开发公司seo团队管理系统
  • 网站策划编辑的工作内容抖音seo排名系统哪个好用
  • 山东济南网站开发我想做app推广怎么做
  • wordpress会员中心添加头像上传广州seo关键词
  • 怎么给网站做搜索功能海南百度总代理
  • 群晖wordpress 外网谷歌seo外链平台
  • 重庆找做墩子网站中央今日头条新闻
  • wordpress wp contentseo服务价格表
  • 网站制作生成器武汉网站seo推广公司
  • 网站有哪些类型和它的成功案例厦门人才网招聘最新信息