centos安装NETCAT
来源:互联网 发布:alfred mac app store 编辑:程序博客网 时间:2024/06/07 18:59
CentOS下安装netcat
使用zookeeper过程中,需要监控集群状态。在使用四字命令时(echo conf | nc localhost 2181),报出如下错误:-bash: netcat: command not found。
我的系统是CentOS 6.6, 64位系统,默认没有安装netcat,下面时安装过程中遇到的一些问题。(下面都是使用root用户)
下载netcat安装包
wget http://sourceforge.net/projects/netcat/files/netcat/0.7.1/netcat-0.7.1-1.i386.rpm
执行安装rpm -ihv netcat-0.7.1-1.i386.rpm
- rpm -ihv netcat-0.7.1-1.i386.rpm
- warning: netcat-0.7.1-1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID b2d79fc1: NOKEY
- error: Failed dependencies:
- libc.so.6 is needed by netcat-0.7.1-1.i386
- libc.so.6(GLIBC_2.0) is needed by netcat-0.7.1-1.i386
- libc.so.6(GLIBC_2.1) is needed by netcat-0.7.1-1.i386
- libc.so.6(GLIBC_2.3) is needed by netcat-0.7.1-1.i386
解决依赖包问题
yum list glibc*
- Loaded plugins: fastestmirror, security
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.aliyun.com
- Installed Packages
- glibc.x86_64 2.12-1.149.el6 @anaconda-CentOS-201410241409.x86_64/6.6
- glibc-common.x86_64 2.12-1.149.el6 @anaconda-CentOS-201410241409.x86_64/6.6
- glibc-devel.x86_64 2.12-1.149.el6 @anaconda-CentOS-201410241409.x86_64/6.6
- glibc-headers.x86_64 2.12-1.149.el6 @anaconda-CentOS-201410241409.x86_64/6.6
- Available Packages
- glibc.i686 2.12-1.149.el6_6.9 updates
- glibc.x86_64 2.12-1.149.el6_6.9 updates
- glibc-common.x86_64 2.12-1.149.el6_6.9 updates
- glibc-devel.i686 2.12-1.149.el6_6.9 updates
- glibc-devel.x86_64 2.12-1.149.el6_6.9 updates
- glibc-headers.x86_64 2.12-1.149.el6_6.9 updates
- glibc-static.i686 2.12-1.149.el6_6.9 updates
- glibc-static.x86_64 2.12-1.149.el6_6.9 updates
- glibc-utils.x86_64 2.12-1.149.el6_6.9 updates
安装命令:
yum install glibc.i686
- rpm -ihv netcat-0.7.1-1.i386.rpm
- warning: netcat-0.7.1-1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID b2d79fc1: NOKEY
- Preparing... ########################################### [100%]
- 1:netcat ########################################### [100%]
安装netcat包
rpm -ihv netcat-0.7.1-1.i386.rpm
- rpm -ihv netcat-0.7.1-1.i386.rpm
- warning: netcat-0.7.1-1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID b2d79fc1: NOKEY
- Preparing... ########################################### [100%]
- 1:netcat ########################################### [100%]
再次测试zookeeper的四字命令,终于成功啦。
- echo conf | nc localhost 2181
- clientPort=2181
- dataDir=/data/zk/data1/version-2
- dataLogDir=/data/zk/log1/version-2
- tickTime=2000
- maxClientCnxns=500
- minSessionTimeout=4000
- maxSessionTimeout=40000
- serverId=1
- initLimit=10
- syncLimit=5
- electionAlg=3
- electionPort=3891
- quorumPort=2891
- peerType=0
0 0
- centos安装NETCAT
- centos安装netcat工具及测试
- centos安装netcat工具及测试
- centos 7.2 netcat 安装以及使用
- 安装netcat
- CentOS 6.x安装NetCat和bug解决问题
- CentoOS6.6安装netcat
- CentoOS6.6安装netcat
- Centos7 安装netcat
- netcat的安装
- centos安装netcat工具及测试——及使用方法举例
- 在Linux上安装netcat
- netcat
- NetCat
- NetCat
- netcat
- netcat
- netcat
- TimesTen 应用层数据库缓存学习:16. Aging策略与AWT缓存组
- 关于Java中各种修饰符与访问修饰符的说明
- Machine Learning in Action 学习笔记-(1)
- 细讲UIImage加载方式
- 基于消息的分布式事务简单方案
- centos安装NETCAT
- 无
- 先建立临时表再查询
- Linux 下常用 ftp 命令
- spring 切面,暂无更深理解
- 使用Gson解析Json数据案例
- 三种基本的存储引擎比较
- 警察与厨师
- 存储过程 返回值 procedure return values