rpc.rstatd安装
先安装
pm -ivh libgssglue-0.1-11.el6.x86_64.rpm
rpm -ivh libtirpc-0.2.1-11.el6_8.x86_64.rpm
rpm -ivh rpcbind-0.2.0-12.el6.x86_64.rpm
yum install libgssglue yum install rpcbind
还有一个需要找按照包才能安装
再启动 服务
service rpcbind start
上传安装包
# rzrz waiting to receive.?a? zmodem ′???£ °′ Ctrl+C ???£?[root@localhost home]# rzrz waiting to receive.?a? zmodem ′???£ °′ Ctrl+C ???£Transferring rpc.rstatd-4.0.1.tar.gz... 100% 84 KB 84 KB/s 00:00:01 0 Errors?[root@localhost home]# [root@localhost home]# [root@localhost home]# ll总用量 71228drwxr-xr-x 2 root root 4096 7月 26 2017 Ajaxtermdrwxr-xr-x 9 root root 4096 7月 26 2017 django-rw-r--r-- 1 root root 14540 3月 11 2013 epel-release-6-8.noarch.rpm-rw-r--r-- 1 root root 6718 3月 11 2017 glances.html-rw-r--r-- 1 root root 72570276 2月 23 2016 jprofiler_linux_9_1_1.rpmdrwxr-xr-x. 7 root root 4096 5月 27 2016 lnmp1.3-fulldrwx------ 5 loadrunner root 4096 7月 26 2017 loadrunnerdrwx------. 4 lw lw 4096 3月 10 2017 lwdrwx------ 4 nagios nagios 4096 3月 10 2017 nagios-rwxr-xr-x 1 root root 188749 7月 26 2011 nmondrwxr-xr-x 2 root root 4096 1月 3 22:42 pythontest-rw-r--r-- 1 root root 86883 12月 7 2005 rpc.rstatd-4.0.1.tar.gzdrwx------ 4 loadrunner spotlight 4096 6月 26 2017 spotlightdrwxr-xr-x 2 root root 4096 6月 27 2017 test-rw-r--r-- 1 root root 1806 7月 25 2017 vmstat.txtdrwx------. 4 www www 4096 3月 10 2017 wwwdrwxrwxrwx. 2 root root 4096 3月 7 2017 wwwlogsdrwxr-xr-x. 3 root root 4096 3月 7 2017 wwwrootdrwxr-xr-x 6 root root 4096 7月 25 2017 xhprof# 解压[root@localhost home]# tar -xzvf rpc.rstatd-4.0.1.tar.gz rpc.rstatd-4.0.1/rpc.rstatd-4.0.1/READMErpc.rstatd-4.0.1/configure.inrpc.rstatd-4.0.1/aclocal.m4rpc.rstatd-4.0.1/Makefile.amrpc.rstatd-4.0.1/Makefile.inrpc.rstatd-4.0.1/config.h.inrpc.rstatd-4.0.1/configurerpc.rstatd-4.0.1/AUTHORSrpc.rstatd-4.0.1/COPYINGrpc.rstatd-4.0.1/ChangeLogrpc.rstatd-4.0.1/INSTALLrpc.rstatd-4.0.1/depcomprpc.rstatd-4.0.1/install-shrpc.rstatd-4.0.1/missingrpc.rstatd-4.0.1/mkinstalldirsrpc.rstatd-4.0.1/rstat_svc.crpc.rstatd-4.0.1/rstat_xdr.crpc.rstatd-4.0.1/rstat_proc.crpc.rstatd-4.0.1/rstat_main.crpc.rstatd-4.0.1/getdata.crpc.rstatd-4.0.1/getdata22.crpc.rstatd-4.0.1/getdata24.crpc.rstatd-4.0.1/getdata26.crpc.rstatd-4.0.1/config.hrpc.rstatd-4.0.1/getdata22.hrpc.rstatd-4.0.1/getdata24.hrpc.rstatd-4.0.1/getdata26.hrpc.rstatd-4.0.1/getdata.hrpc.rstatd-4.0.1/rstat_proc.hrpc.rstatd-4.0.1/rsysinfo.crpc.rstatd-4.0.1/rstat_clnt.crpc.rstatd-4.0.1/rup.crpc.rstatd-4.0.1/rstat.xrpc.rstatd-4.0.1/rpc.rstatd.8rpc.rstatd-4.0.1/rstatd.8rpc.rstatd-4.0.1/rsysinfo.1rpc.rstatd-4.0.1/rup.1[root@localhost home]# ll总用量 71232drwxr-xr-x 2 root root 4096 7月 26 2017 Ajaxtermdrwxr-xr-x 9 root root 4096 7月 26 2017 django-rw-r--r-- 1 root root 14540 3月 11 2013 epel-release-6-8.noarch.rpm-rw-r--r-- 1 root root 6718 3月 11 2017 glances.html-rw-r--r-- 1 root root 72570276 2月 23 2016 jprofiler_linux_9_1_1.rpmdrwxr-xr-x. 7 root root 4096 5月 27 2016 lnmp1.3-fulldrwx------ 5 loadrunner root 4096 7月 26 2017 loadrunnerdrwx------. 4 lw lw 4096 3月 10 2017 lwdrwx------ 4 nagios nagios 4096 3月 10 2017 nagios-rwxr-xr-x 1 root root 188749 7月 26 2011 nmondrwxr-xr-x 2 root root 4096 1月 3 22:42 pythontestdrwxrwxrwx 2 5094 bin 4096 12月 7 2005 rpc.rstatd-4.0.1-rw-r--r-- 1 root root 86883 12月 7 2005 rpc.rstatd-4.0.1.tar.gzdrwx------ 4 loadrunner spotlight 4096 6月 26 2017 spotlightdrwxr-xr-x 2 root root 4096 6月 27 2017 test-rw-r--r-- 1 root root 1806 7月 25 2017 vmstat.txtdrwx------. 4 www www 4096 3月 10 2017 wwwdrwxrwxrwx. 2 root root 4096 3月 7 2017 wwwlogsdrwxr-xr-x. 3 root root 4096 3月 7 2017 wwwrootdrwxr-xr-x 6 root root 4096 7月 25 2017 xhprof[root@localhost home]# chmod 777 rpc.rstatd-4.0.1[root@localhost home]# cd rpc.rstatd-4.0.1[root@localhost rpc.rstatd-4.0.1]# ll总用量 456-rw-r--r-- 1 5094 bin 35033 12月 7 2005 aclocal.m4-rw-r--r-- 1 5094 bin 153 9月 19 2005 AUTHORS-rw-r--r-- 1 5094 bin 712 12月 7 2005 ChangeLog-rw-r--r-- 1 5094 bin 1857 12月 7 2005 config.h-rw-r--r-- 1 5094 bin 1727 12月 7 2005 config.h.in-rwxr-xr-x 1 5094 bin 161353 12月 7 2005 configure-rw-r--r-- 1 5094 bin 861 12月 7 2005 configure.in-rw-r--r-- 1 5094 bin 17992 8月 15 2001 COPYING-rwxr-xr-x 1 5094 bin 14841 9月 7 2005 depcomp-rw-r--r-- 1 5094 bin 1181 9月 19 2005 getdata22.c-rw-r--r-- 1 5094 bin 461 9月 19 2005 getdata22.h-rw-r--r-- 1 5094 bin 2064 9月 19 2005 getdata24.c-rw-r--r-- 1 5094 bin 461 9月 19 2005 getdata24.h-rw-r--r-- 1 5094 bin 2236 9月 19 2005 getdata26.c-rw-r--r-- 1 5094 bin 456 9月 19 2005 getdata26.h-rw-r--r-- 1 5094 bin 7761 12月 7 2005 getdata.c-rw-r--r-- 1 5094 bin 1044 9月 19 2005 getdata.h-rw-r--r-- 1 5094 bin 7831 8月 15 2001 INSTALL-rwxr-xr-x 1 5094 bin 5598 8月 15 2001 install-sh-rw-r--r-- 1 5094 bin 1180 9月 19 2005 Makefile.am-rw-r--r-- 1 5094 bin 24984 12月 7 2005 Makefile.in-rwxr-xr-x 1 5094 bin 6283 8月 15 2001 missing-rwxr-xr-x 1 5094 bin 724 8月 15 2001 mkinstalldirs-rw-r--r-- 1 5094 bin 3594 9月 19 2005 README-rw-r--r-- 1 5094 bin 18 1月 27 2001 rpc.rstatd.8-rw-r--r-- 1 5094 bin 3660 12月 7 2005 rstat_clnt.c-rw-r--r-- 1 5094 bin 1155 9月 12 2005 rstatd.8-rw-r--r-- 1 5094 bin 4155 9月 7 2005 rstat_main.c-rw-r--r-- 1 5094 bin 6525 9月 7 2005 rstat_proc.c-rw-r--r-- 1 5094 bin 1632 9月 7 2005 rstat_proc.h-rw-r--r-- 1 5094 bin 6562 12月 7 2005 rstat_svc.c-rw-r--r-- 1 5094 bin 4870 8月 15 2001 rstat.x-rw-r--r-- 1 5094 bin 27089 12月 7 2005 rstat_xdr.c-rw-r--r-- 1 5094 bin 1611 1月 27 2001 rsysinfo.1-rw-r--r-- 1 5094 bin 5662 9月 7 2005 rsysinfo.c-rw-r--r-- 1 5094 bin 1734 1月 27 2001 rup.1-rw-r--r-- 1 5094 bin 8737 9月 7 2005 rup.c[root@localhost rpc.rstatd-4.0.1]# ./configure checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yes/home/rpc.rstatd-4.0.1/missing: Unknown `--run' optionTry `/home/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)... yeschecking for gawk... (cached) gawkchecking for gcc... gccchecking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ANSI C... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking for a BSD-compatible install... /usr/bin/install -cchecking whether ln -s works... yeschecking whether make sets $(MAKE)... (cached) yeschecking how to run the C preprocessor... gcc -Echecking for egrep... grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking sys/ioctl.h usability... yeschecking sys/ioctl.h presence... yeschecking for sys/ioctl.h... yeschecking syslog.h usability... yeschecking syslog.h presence... yeschecking for syslog.h... yeschecking whether time.h and sys/time.h may both be included... yeschecking whether gcc needs -traditional... nochecking for ANSI C header files... (cached) yeschecking return type of signal handlers... voidconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating config.hconfig.status: config.h is unchangedconfig.status: executing depfiles commands[root@localhost rpc.rstatd-4.0.1]# makerm -f rstat.hrpcgen -h -o rstat.h rstat.xmake all-ammake[1]: Entering directory `/home/rpc.rstatd-4.0.1'if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rup.o -MD -MP -MF ".deps/rup.Tpo" -c -o rup.o rup.c; \ then mv -f ".deps/rup.Tpo" ".deps/rup.Po"; else rm -f ".deps/rup.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rstat_xdr.o -MD -MP -MF ".deps/rstat_xdr.Tpo" -c -o rstat_xdr.o rstat_xdr.c; \ then mv -f ".deps/rstat_xdr.Tpo" ".deps/rstat_xdr.Po"; else rm -f ".deps/rstat_xdr.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rstat_clnt.o -MD -MP -MF ".deps/rstat_clnt.Tpo" -c -o rstat_clnt.o rstat_clnt.c; \ then mv -f ".deps/rstat_clnt.Tpo" ".deps/rstat_clnt.Po"; else rm -f ".deps/rstat_clnt.Tpo"; exit 1; figcc -g -O2 -o rup rup.o rstat_xdr.o rstat_clnt.o if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rsysinfo.o -MD -MP -MF ".deps/rsysinfo.Tpo" -c -o rsysinfo.o rsysinfo.c; \ then mv -f ".deps/rsysinfo.Tpo" ".deps/rsysinfo.Po"; else rm -f ".deps/rsysinfo.Tpo"; exit 1; figcc -g -O2 -o rsysinfo rsysinfo.o rstat_xdr.o rstat_clnt.o if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rstat_svc.o -MD -MP -MF ".deps/rstat_svc.Tpo" -c -o rstat_svc.o rstat_svc.c; \ then mv -f ".deps/rstat_svc.Tpo" ".deps/rstat_svc.Po"; else rm -f ".deps/rstat_svc.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rstat_proc.o -MD -MP -MF ".deps/rstat_proc.Tpo" -c -o rstat_proc.o rstat_proc.c; \ then mv -f ".deps/rstat_proc.Tpo" ".deps/rstat_proc.Po"; else rm -f ".deps/rstat_proc.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT rstat_main.o -MD -MP -MF ".deps/rstat_main.Tpo" -c -o rstat_main.o rstat_main.c; \ then mv -f ".deps/rstat_main.Tpo" ".deps/rstat_main.Po"; else rm -f ".deps/rstat_main.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT getdata.o -MD -MP -MF ".deps/getdata.Tpo" -c -o getdata.o getdata.c; \ then mv -f ".deps/getdata.Tpo" ".deps/getdata.Po"; else rm -f ".deps/getdata.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT getdata22.o -MD -MP -MF ".deps/getdata22.Tpo" -c -o getdata22.o getdata22.c; \ then mv -f ".deps/getdata22.Tpo" ".deps/getdata22.Po"; else rm -f ".deps/getdata22.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT getdata24.o -MD -MP -MF ".deps/getdata24.Tpo" -c -o getdata24.o getdata24.c; \ then mv -f ".deps/getdata24.Tpo" ".deps/getdata24.Po"; else rm -f ".deps/getdata24.Tpo"; exit 1; fiif gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT getdata26.o -MD -MP -MF ".deps/getdata26.Tpo" -c -o getdata26.o getdata26.c; \ then mv -f ".deps/getdata26.Tpo" ".deps/getdata26.Po"; else rm -f ".deps/getdata26.Tpo"; exit 1; figcc -g -O2 -o rpc.rstatd rstat_svc.o rstat_xdr.o rstat_proc.o rstat_main.o getdata.o getdata22.o getdata24.o getdata26.o make[1]: Leaving directory `/home/rpc.rstatd-4.0.1'[root@localhost rpc.rstatd-4.0.1]# make installmake install-ammake[1]: Entering directory `/home/rpc.rstatd-4.0.1'make[2]: Entering directory `/home/rpc.rstatd-4.0.1'test -z "/usr/local/bin" || mkdir -p -- . "/usr/local/bin" /usr/bin/install -c 'rup' '/usr/local/bin/rup' /usr/bin/install -c 'rsysinfo' '/usr/local/bin/rsysinfo'test -z "/usr/local/sbin" || mkdir -p -- . "/usr/local/sbin" /usr/bin/install -c 'rpc.rstatd' '/usr/local/sbin/rpc.rstatd'make[2]: Nothing to be done for `install-data-am'.make[2]: Leaving directory `/home/rpc.rstatd-4.0.1'make[1]: Leaving directory `/home/rpc.rstatd-4.0.1'[root@localhost rpc.rstatd-4.0.1]# [root@localhost rpc.rstatd-4.0.1]# [root@localhost rpc.rstatd-4.0.1]# ./rpc.rstatd[root@localhost rpc.rstatd-4.0.1]# rpcinfo -p program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 54696 status 100024 1 tcp 36643 status 100001 5 udp 888 rstatd 100001 3 udp 888 rstatd 100001 2 udp 888 rstatd 100001 1 udp 888 rstatd[root@localhost rpc.rstatd-4.0.1]# rpcinfo -p program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 54696 status 100024 1 tcp 36643 status 100001 5 udp 888 rstatd 100001 3 udp 888 rstatd 100001 2 udp 888 rstatd 100001 1 udp 888 rstatd[root@localhost rpc.rstatd-4.0.1]#
出错:
-bash: /etc/init.d/rpcbind: No such file or directory
[root@izbp1epaqh5z52rygsq05oz init.d]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
[root@izbp1epaqh5z52rygsq05oz init.d]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100001 5 udp 968 rstatd 少服务
100001 3 udp 968 rstatd
100001 2 udp 968 rstatd
100001 1 udp 968 rstatd
[root@izbp1epaqh5z52rygsq05oz init.d]# service nfslock start
Redirecting to /bin/systemctl start nfslock.service
[root@izbp1epaqh5z52rygsq05oz init.d]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100001 5 udp 968 rstatd
100001 3 udp 968 rstatd
100001 2 udp 968 rstatd
100001 1 udp 968 rstatd
100024 1 udp 52833 status
100024 1 tcp 46523 status
[root@izbp1epaqh5z52rygsq05oz init.d]#
查看prc服务
100001 1 udp 813 rstatd[root@izbp1epaqh5z52rygsq05oz sbin]# service portmap startRedirecting to /bin/systemctl start portmap.serviceFailed to start portmap.service: Unit not found.[root@izbp1epaqh5z52rygsq05oz sbin]# service rpcbind statusRedirecting to /bin/systemctl status rpcbind.service● rpcbind.service - RPC bind service Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; indirect; vendor preset: enabled) Active: active (running) since Sun 2018-05-06 16:32:31 CST; 1h 2min ago Main PID: 13787 (rpcbind) CGroup: /system.slice/rpcbind.service └─13787 /sbin/rpcbind -wMay 06 16:32:31 izbp1epaqh5z52rygsq05oz systemd[1]: Starting RPC bind service...May 06 16:32:31 izbp1epaqh5z52rygsq05oz systemd[1]: Started RPC bind service.[root@izbp1epaqh5z52rygsq05oz sbin]#