本文共 5874 字,大约阅读时间需要 19 分钟。
1、下载cmatrix-1.2a.tar.gz文件
[root@localhost ~]# wget https://jaist.dl.sourceforge.net/project/cmatrix/cmatrix/1.2a/cmatrix-1.2a.tar.gz--2018-07-17 15:06:03-- https://jaist.dl.sourceforge.net/project/cmatrix/cmatrix/1.2a/cmatrix-1.2a.tar.gzResolving jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)... 150.65.7.130, 2001:df0:2ed:feed::feedConnecting to jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)|150.65.7.130|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 74376 (73K) [application/x-gzip]Saving to: ‘cmatrix-1.2a.tar.gz’100%[=====================================================>] 74,376 4.68KB/s in 16s 2018-07-17 15:06:20 (4.68 KB/s) - ‘cmatrix-1.2a.tar.gz’ saved [74376/74376]
2、解压缩cmatrix-1.2a.tar.gz文件
[root@localhost ~]# tar xvf cmatrix-1.2a.tar.gzcmatrix-1.2a/cmatrix-1.2a/NEWScmatrix-1.2a/TODOcmatrix-1.2a/aclocal.m4cmatrix-1.2a/READMEcmatrix-1.2a/configurecmatrix-1.2a/configure.incmatrix-1.2a/cmatrix.1cmatrix-1.2a/cmatrix.ccmatrix-1.2a/config.guesscmatrix-1.2a/install-shcmatrix-1.2a/cmatrix.speccmatrix-1.2a/cmatrix.spec.incmatrix-1.2a/matrix.fntcmatrix-1.2a/config.subcmatrix-1.2a/missingcmatrix-1.2a/mkinstalldirscmatrix-1.2a/Makefile.amcmatrix-1.2a/Makefile.incmatrix-1.2a/mtx.pcfcmatrix-1.2a/config.h.incmatrix-1.2a/matrix.psf.gzcmatrix-1.2a/stamp-h.incmatrix-1.2a/AUTHORScmatrix-1.2a/INSTALLcmatrix-1.2a/ChangeLogcmatrix-1.2a/acconfig.hcmatrix-1.2a/COPYING
[root@localhost ~]# cd cmatrix-1.2a
[root@localhost cmatrix-1.2a]# yum install ncurses-deve
```[root@bogon cmatrix-1.2a]# ./configure && make && make installloading cache ./config.cachechecking for a BSD compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking whether make sets ${MAKE}... yeschecking for working aclocal... missingchecking for working autoconf... missingchecking for working automake... missingchecking for working autoheader... missingchecking for working makeinfo... missingchecking for gcc... nochecking for cc... noconfigure: error: no acceptable cc found in $PATH当执行“./configure && make && make install ”命令出现如上信息时,表示没有安装gcc,gcc安装过程如下[root@bogon cmatrix-1.2a]# yum -y install gcc[root@bogon cmatrix-1.2a]# yum -y install gcc-c++[root@bogon cmatrix-1.2a]# yum install make安装完后再运行“./configure && make && make install ”命令,如下:[root@localhost cmatrix-1.2a]# ./configure && make && make installcreating cache ./config.cachechecking for a BSD compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking whether make sets ${MAKE}... yeschecking for working aclocal... missingchecking for working autoconf... missingchecking for working automake... missingchecking for working autoheader... missingchecking for working makeinfo... missingchecking for gcc... gccchecking whether the C compiler (gcc ) works... yeschecking whether the C compiler (gcc ) is a cross-compiler... nochecking whether we are using GNU C... yeschecking whether gcc accepts -g... yeschecking for a BSD compatible install... /usr/bin/install -cchecking whether make sets ${MAKE}... (cached) yeschecking for main in -lncurses... yeschecking how to run the C preprocessor... gcc -Echecking for ANSI C header files... yeschecking for fcntl.h... yeschecking for sys/ioctl.h... yeschecking for unistd.h... yeschecking for termios.h... yeschecking for termio.h... yeschecking return type of signal handlers... voidchecking for putenv... yeschecking for curses.h... yeschecking for ncurses.h... yeschecking for tgetent in -lncurses... yesUsing ncurses as the termcap librarychecking for use_default_colors in -lncurses... yeschecking for resizeterm in -lncurses... yeschecking for wresize in -lncurses... yeschecking for consolechars... nochecking for setfont... /usr/bin/setfontchecking for /usr/lib/kbd/consolefonts... yeschecking for /usr/share/consolefonts... nochecking for mkfontdir... nochecking for /usr/lib/X11/fonts/misc... nochecking for /usr/X11R6/lib/X11/fonts/misc... noconfigure: warning: *** You do not appear to have an X window fonts directory in the standard*** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The*** mtx.pcf font will not be installed. This means you will probably not*** be able to use the mtx fonts in your x terminals, and hence be unable*** to use the -x command line switch. Sorry about that...updating cache ./config.cachecreating ./config.statuscreating Makefilecreating cmatrix.speccreating config.hgcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -Wall -Wno-comment -c cmatrix.cgcc -g -O2 -Wall -Wno-comment -o cmatrix cmatrix.o -lncurses -lncursesmake[1]: Entering directory `/root/cmatrix-1.2a'/bin/sh ./mkinstalldirs /usr/local/bin /usr/bin/install -c cmatrix /usr/local/bin/cmatrixmake install-man1make[2]: Entering directory `/root/cmatrix-1.2a'/bin/sh ./mkinstalldirs /usr/local/man/man1mkdir /usr/local/manmkdir /usr/local/man/man1/usr/bin/install -c -m 644 ./cmatrix.1 /usr/local/man/man1/cmatrix.1make[2]: Leaving directory `/root/cmatrix-1.2a'Installing matrix fonts in /usr/lib/kbd/consolefonts...make[1]: Leaving directory `/root/cmatrix-1.2a'到此,cmatrix安装完成,任意路径,输入cmatrix运行,按q退出。效果如下[root@localhost cmatrix-1.2a]# cmatrix![](https://s1.51cto.com/images/blog/201807/17/abaa3c9ee4b6cf559c3db8173c2cd2bc.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)cmatrix常用命令如下:-a :异步滚动(默认)-b :随机粗体-B :全部粗体-o :使用旧风格滚动-x :X window 模式-V :显示版本信息-u :刷新频率,0-9,也就是滚动的快慢(值越小越快)-C :显示的颜色,支持green(默认),red,blue,white,yellow,cyan,magenta and black[root@localhost ~]# cmatrix -b -u 3 -C yellow![](https://s1.51cto.com/images/blog/201807/17/4a2e39f2aa2889910d633b6bfb92d18f.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
转载于:https://blog.51cto.com/5232821/2146115