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


    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
    
  • 相关阅读:
    CentOS7设置tomcat开机自启动
    MySQL复制表结构和表数据
    SpEL表达式总结
    Flink快速入门
    Flink架构、原理与部署测试
    第十一篇:Spark SQL 源码分析之 External DataSource外部数据源
    第十篇:Spark SQL 源码分析之 In-Memory Columnar Storage源码分析之 query
    第九篇:Spark SQL 源码分析之 In-Memory Columnar Storage源码分析之 cache table
    第八篇:Spark SQL Catalyst源码分析之UDF
    第七篇:Spark SQL 源码分析之Physical Plan 到 RDD的具体实现
  • 原文地址:https://www.cnblogs.com/keithtt/p/8203387.html
Copyright © 2020-2023  润新知