将tar包放到linux服务器上
解压tar包,tar zxvf rpc.rstatd.....
打开解压的文件夹 cd rpc.rstatd....
4.编译
编译时报错:
[root@VM_74_238_centos rpc.rstatd-4.0.1]# ./configure
checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yes/usr/local/src/rpc.rstatd-4.0.1/missing: Unknown `--run' optionTry `/usr/local/src/rpc.rstatd-4.0.1/missing --help' for more informationconfigure: WARNING: `missing' script is too old or missingchecking for gawk... gawkchecking whether make sets $(MAKE)... nochecking for gawk... (cached) gawkchecking for gcc... nochecking for cc... nochecking for cc... nochecking for cl... noconfigure: error: no acceptable C compiler found in $PATHSee `config.log' for more details.未安装gcc包,使用yum安装,yum install gcc
5. make
报错:[root@VM_74_238_centos rpc.rstatd-4.0.1]# make
-bash: make: command not found查看环境变量的路径:
[root@VM_74_238_centos rpc.rstatd-4.0.1]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin已经添加,考虑make安装包是否未安装,yum install make
6. make install
7. 启动 rpc.rstatd
报错:Cannot register service: RPC: Unable to receive; errno = Connection refused......
这个错误是因为服务器没有开启端口映射的功能,需要安装portmap
解决办法: yum install portmap
确认的linux版本,如果是6.0及以上,rpcbind替代了portmap
启动rpcbind
# /etc/rc.d/init.d/rpcbind start
8. 启动 rpc.rstatd
成功