itlife65 it 生活网分享CentOS 安装 rz sz 工具
itlife65 it生活网分享CentOS 安装 rz sz 工具
因为直接的主机默认没有安装rz sz 的上传工具,现在分享安装过程如下:
0、查看系统的版本
[root@itlife365.com src]# cat /etc/redhat-lsb
cat: /etc/redhat-lsb: Is a directory
[root@itlife365.com src]# cat /etc/redhat-release
CentOS release 6.3 (Final)
[root@itlife365.com src]# uname -a
Linux itlife365.com 2.6.32-279.el6.i686 #1 SMP Fri Jun 22 10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
1、下载rzsz安装包rzsz-3.48.tar.gz
[root@itlife365.com tomcat20131211]#
[root@itlife365.com tomcat20131211]# wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
--2013-12-11 22:00:35-- http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
Resolving freeware.sgi.com... 192.48.178.134
Connecting to freeware.sgi.com|192.48.178.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65566 (64K) [application/x-gzip]
Saving to: “rzsz-3.48.tar.gz”
100%[===================================================================================>] 65,566 17.3K/s in 3.7s
2013-12-11 22:00:39 (17.3 KB/s) - “rzsz-3.48.tar.gz” saved [65566/65566]
2、下载完成 后解压
[root@itlife365.com tomcat20131211]# ls
rzsz-3.48.tar.gz
[root@itlife365.com tomcat20131211]# tar -zxvf rzsz-3.48.tar.gz
src/
src/COPYING
src/Makefile
src/README
src/crc.c
src/crc.doc
src/crctab.c
src/gz
src/mailer.rz
src/minirb.c
src/minirb.doc
src/rbsb.c
src/rz.c
src/rz.doc
src/sz.c
src/sz.doc
src/undos.c
src/undos.doc
src/zm.c
src/zmodem.h
src/zmr.c
src/zupl.t
[root@itlife365.com tomcat20131211]# ls
rzsz-3.48.tar.gz src
[root@itlife365.com tomcat20131211]# cd src/
[root@itlife365.com src]# ls
COPYING crc.doc gz Makefile minirb.doc README rz.doc sz.doc undos.doc zmodem.h zupl.t
crc.c crctab.c mailer.rz minirb.c rbsb.c rz.c sz.c undos.c zm.c zmr.c
3、解压后生成scr目录,这个软件安装与常规的GNU软件不同—没有configure(配置)及make install (安装过程)。
先执行命令make,将给出下面的提示:
[root@itlife365.com src]# make
Please study the #ifdef's in crctab.c, rbsb.c, rz.c and sz.c,
make any necessary hacks for oddball or merged SYSV/BSD systems,
then type 'make SYSTEM' where SYSTEM is one of:
posix POSIX compliant systems
aix AIX systems
next NeXtstep v3.x (POSIX)
odt SCO Open Desktop
everest SCO Open Desktop (elf, strict)
sysvr4 SYSTEM 5.4 Unix
sysvr3 SYSTEM 5.3 Unix with mkdir(2), COHERENT 4.2
sysv SYSTEM 3/5 Unix
sysiii SYS III/V Older Unix or Xenix compilers
xenix Xenix
x386 386 Xenix
bsd Berkeley 4.x BSD, Ultrix, V7
tandy Tandy 6000 Xenix
dnix DIAB Dnix 5.2
dnix5r3 DIAB Dnix 5.3
amiga 3000UX running SVR4
POSIX POSIX compliant systems (SCO Open Desktop, strict)
undos Make the undos, todos, etc. program.
doc Format the man pages with nroff
4、根据自己的系统选择make的位置参数,一般情况下,选posix或linux就可以了。执行命令make posix
[root@itlife365.com src]# make posix
cc -O -DPOSIX -DMD=2 rz.c -o rz
size rz
text data bss dec hex filename
25129 648 10496 36273 8db1 rz
rm -f rb rx rc
ln rz rb
ln rz rx
ln rz rc
cc -O -DPOSIX sz.c -o sz
size sz
text data bss dec hex filename
30391 708 43104 74203 121db sz
rm -f sb sx zcommand zcommandi
ln sz sb
ln sz sx
ln sz zcommand
ln sz zcommandi
[root@itlife365.com src]# ls
COPYING gz minirb.doc README rz.doc sz.c zcommand zmr.c
crc.c mailer.rz rb rx sb sz.doc zcommandi zupl.t
crc.doc Makefile rbsb.c rz sx undos.c zm.c
crctab.c minirb.c rc rz.c sz undos.doc zmodem.h
5、把相关文件复制到目录/usr/bin下面。这里只需要拷贝2个文件rz及sz
[root@itlife365.com src]# cp rz sz /usr/bin/
6、现在可以测试一下rz sz命令是否可用了
[root@itlife365.com src]# rz
rz ready. Type "sz file ..." to your modem program
?a? zmodem ′??. °′ Ctrl+C ??.
?rz 3.48 01-27-98 finished.
**** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
[root@itlife365.com src]# cd ..
[root@itlife365.com tomcat20131211]# ls
rzsz-3.48.tar.gz src
[root@itlife365.com tomcat20131211]# mkdir tomcat_installpackage
[root@itlife365.com tomcat20131211]# cd tomcat_installpackage/
[root@itlife365.com tomcat_installpackage]# ls
[root@itlife365.com tomcat_installpackage]# rz
rz ready. Type "sz file ..." to your modem program
?a? zmodem ′??. °′ Ctrl+C ??.
Transferring apache-tomcat-6.0.37.tar.gz...
100% 6724 KB 69 KB/s 00:01:37 0 ′?
Transferring tomcat-connectors-1.2.37-src.tar.gz...
100% 1492 KB 1492 KB/s 00:00:01 0 ′?
?rz 3.48 01-27-98 finished.
**** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
[root@itlife365.com tomcat_installpackage]# ls
apache-tomcat-6.0.37.tar.gz tomcat-connectors-1.2.37-src.tar.gz
[root@itlife365.com tomcat_installpackage]# du -sh *
6.6M apache-tomcat-6.0.37.tar.gz
1.5M tomcat-connectors-1.2.37-src.tar.gz
7、可以看出,已经可以上传了,
8、常见问题:
a、修改参数,如果不修改Makefile会出现:
**** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
在编译前修改cd src
vim Makefile
只需要修改第四行的 “OFLAG= -O” 为 “OFLAG= -O -DREGISTERED”
b、如果用户出现权限错误,请参照如下修改
[root@itlife365.com bin]# su - test
[test@itlife365.com ~]$ rz -y
/dev/pts/3: Permission denied
[root@itlife365.com bin]# cd /dev/pts
[root@itlife365.com pts]# ll
总计 0
crw--w---- 1 root tty 136, 1 12-13 12:00 1
crw--w---- 1 root tty 136, 2 12-13 10:55 2
crw--w---- 1 root tty 136, 3 12-13 11:10 3
[root@itlife365.com pts]# chmod 777 1 #同理为其他虚拟终端赋权即可
完成。。
简单街省钱折扣购物网,集淘宝,天猫,拍拍,京东等品牌商品 www. jiandanjie . com