码迷,mamicode.com
首页 > 其他好文 > 详细

使用alien命令让deb包和rpm互相转换

时间:2018-01-05 15:25:55      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:cgroup   下载   安装   receive   简单   read   git   nload   linux   

OS version: CentOS7 / Debian9

发现alien这个命令时很惊喜,之前在debian上安装etcd找不到安装包感觉很不科学,有了alien命令事情一下就变简单了。

这里以etcd为例,将etcd从rpm包转换成deb包,然后传送到debian机器上安装。(这个命令也可以把deb包转换成rpm包)

1、找一台centos机器,下载etd安装包

在centos上下载rpm包需要安装一个插件

# yum install -y yum-plugin-downloadonly

下载rpm包

# yum install etcd --downloadonly --downloaddir=/tmp/

这时,在/tmp下就能看到刚才下载的包了。

2、找一台debian机器测试安装

# dpkg -i etcd_3.2.9-4_amd64.deb
Selecting previously unselected package etcd.
(Reading database ... 87613 files and directories currently installed.)
Preparing to unpack etcd_3.2.9-4_amd64.deb ...
Unpacking etcd (3.2.9-4) ...
Setting up etcd (3.2.9-4) ...
/var/lib/dpkg/info/etcd.postinst: line 6: [: configure: integer expression expected
Processing triggers for man-db (2.7.6.1-2) ...
# etcd --version
etcd Version: 3.2.9
Git SHA: f1d7dd8
Go Version: go1.8.3
Go OS/Arch: linux/amd64
# dpkg -L etcd
# systemctl start etcd
# systemctl status etcd
● etcd.service - Etcd Server
   Loaded: loaded (/usr/lib/systemd/system/etcd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-01-05 10:51:34 CST; 7s ago
 Main PID: 20249 (etcd)
      CPU: 85ms
   CGroup: /system.slice/etcd.service
           └─20249 /usr/bin/etcd --name=default --data-dir=/var/lib/etcd/default.etcd --listen-client-urls=http://localhost:2379

Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: 8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 2
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: 8e9e05c52164694d became leader at term 2
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 2
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: setting up the initial cluster version to 3.2
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: published {Name:default ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32
Jan 05 10:51:34 BJ-S-22-v06 systemd[1]: Started Etcd Server.
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: ready to serve client requests
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: set the initial cluster version to 3.2
Jan 05 10:51:34 BJ-S-22-v06 etcd[20249]: enabled capabilities for version 3.2

使用alien命令让deb包和rpm互相转换

标签:cgroup   下载   安装   receive   简单   read   git   nload   linux   

原文地址:https://www.cnblogs.com/keithtt/p/8203387.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!