Install Asciidoc on RHEL
官方网站:http://www.methods.co.nz/asciidoc/
安装前提:Python 2.4以上。
当前系统的Python版本:
1 2 3 |
[root@heartbeat1 software]# python -V Python 2.6.6 [root@heartbeat1 software]# |
上传介质到服务器,并解压:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
[root@heartbeat1 software]# pwd /software [root@heartbeat1 software]# ll total 3752 -rw-r--r-- 1 root root 2426880 Oct 22 06:38 0a7add1d9996.tar -rw-r--r-- 1 root root 1407916 Dec 16 06:52 asciidoc-8.6.9.zip drwxr-xr-x 11 root root 4096 Dec 16 06:45 Reusable-Cluster-Components-glue--0a7add1d9996 [root@heartbeat1 software]# unzip asciidoc-8.6.9.zip Archive: asciidoc-8.6.9.zip inflating: asciidoc-8.6.9/a2x.py inflating: asciidoc-8.6.9/asciidocapi.py inflating: asciidoc-8.6.9/asciidoc.conf inflating: asciidoc-8.6.9/asciidoc.py inflating: asciidoc-8.6.9/BUGS inflating: asciidoc-8.6.9/BUGS.txt inflating: asciidoc-8.6.9/CHANGELOG inflating: asciidoc-8.6.9/CHANGELOG.txt (... ...etc。) extracting: asciidoc-8.6.9/examples/website/images/icons/callouts/14.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/15.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/2.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/3.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/4.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/5.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/6.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/7.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/8.png inflating: asciidoc-8.6.9/examples/website/images/icons/callouts/9.png [root@heartbeat1 software]# [root@heartbeat1 software]# cd asciidoc-8.6.9 [root@heartbeat1 asciidoc-8.6.9]# ls a2x.py doc lang-de.conf Makefile.in asciidocapi.py docbook45.conf lang-el.conf MANIFEST asciidoc.conf docbook-xsl lang-en.conf README asciidoc.py examples lang-es.conf README.txt BUGS filters lang-fr.conf slidy.conf BUGS.txt help.conf lang-hu.conf stylesheets CHANGELOG html4.conf lang-it.conf tests CHANGELOG.txt html5.conf lang-nl.conf text.conf common.aap images lang-pt-BR.conf themes configure INSTALL lang-ro.conf vim configure.ac install-sh lang-ru.conf xhtml11.conf COPYING INSTALL.txt lang-uk.conf xhtml11-quirks.conf COPYRIGHT javascripts latex.conf dblatex lang-cs.conf main.aap [root@heartbeat1 asciidoc-8.6.9]# |
如果解压后的目录里没有“configure”则需要先执行autoconf.sh
1 2 3 4 |
[root@heartbeat1 asciidoc-8.6.9]# ls -al | grep --color configure -rwxrwxr-x 1 root root 89892 Nov 5 2013 configure -rw-rw-r-- 1 root root 107 Nov 5 2013 configure.ac [root@heartbeat1 asciidoc-8.6.9]# |
当前环境中有“configure”所以不需要autoconf了。
./configure:
1 2 3 4 5 6 7 8 9 10 |
[root@heartbeat1 asciidoc-8.6.9]# ls -al | grep --color "Makefile" -rw-rw-r-- 1 root root 4546 Sep 27 2012 Makefile.in [root@heartbeat1 asciidoc-8.6.9]# [root@heartbeat1 asciidoc-8.6.9]# ./configure checking for a sed that does not truncate output... /bin/sed checking whether ln -s works... yes checking for a BSD-compatible install... /usr/bin/install -c configure: creating ./config.status config.status: creating Makefile [root@heartbeat1 asciidoc-8.6.9]# |
./configure的阶段会生成Makefile。
make:
1 2 3 4 |
[root@heartbeat1 asciidoc-8.6.9]# make Fixing CONF_DIR in asciidoc.py Fixing CONF_DIR in a2x.py [root@heartbeat1 asciidoc-8.6.9]# |
make install:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@heartbeat1 asciidoc-8.6.9]# ls /usr/local/bin | grep --color asciidoc [root@heartbeat1 asciidoc-8.6.9]# [root@heartbeat1 asciidoc-8.6.9]# ls /usr/local/bin | grep --color a2x [root@heartbeat1 asciidoc-8.6.9]# [root@heartbeat1 asciidoc-8.6.9]# make install Fixing CONF_DIR in asciidoc.py Fixing CONF_DIR in a2x.py /usr/bin/install -c -d //usr/local/bin /usr/bin/install -c asciidoc.py a2x.py //usr/local/bin/ /usr/bin/install -c -d //usr/local/etc/asciidoc/filters/code /usr/bin/install -c filters/code/code-filter.py //usr/local/etc/asciidoc/filters/code/ /usr/bin/install -c -d //usr/local/etc/asciidoc/filters/music /usr/bin/install -c filters/music/music2png.py //usr/local/etc/asciidoc/filters/music/ /usr/bin/install -c -d //usr/local/etc/asciidoc/filters/graphviz (... ... etc。) /usr/bin/install -c -d //usr/local/etc/asciidoc/themes/volnitsky /usr/bin/install -c -m 644 themes/volnitsky/volnitsky.css //usr/local/etc/asciidoc/themes/volnitsky/ (cd //usr/local/bin; ln -sf asciidoc.py asciidoc) (cd //usr/local/bin; ln -sf a2x.py a2x) [root@heartbeat1 asciidoc-8.6.9]# [root@heartbeat1 asciidoc-8.6.9]# ls /usr/local/bin | grep --color asciidoc asciidoc asciidoc.py [root@heartbeat1 asciidoc-8.6.9]# ls /usr/local/bin | grep --color a2x a2x a2x.py [root@heartbeat1 asciidoc-8.6.9]# |
这样,就安装完成了:
1 2 3 |
[root@heartbeat1 ~]# whereis asciidoc asciidoc: /usr/local/bin/asciidoc.py /usr/local/bin/asciidoc /usr/local/etc/asciidoc [root@heartbeat1 ~]# |
——————————————
Done。
1 thought on “Install Asciidoc on RHEL”