# wget https://ftp.gnu.org/gnu/libidn/libidn2-2.3.0.tar.gz
# tar xvfz libidn2-2.3.0.tar.gz
# cd libidn2-2.3.0
# autoreconf
# ./configure CFLAGS="-m64" CPPFLAGS="-I/usr/local/include" LDFLAGS="-m64"
# vi ./lib/puny_decode.c
-- 마지막 줄의 아래부분 전체 삭제
#ifdef HAVE_SYMVER_ALIAS_SUPPORT
__typeof__ (_idn2_punycode_decode_internal) _idn2_punycode_decode
__attribute__ ((visibility ("default"),
alias ("_idn2_punycode_decode_internal")));
__asm__ (".symver _idn2_punycode_decode, _idn2_punycode_decode@IDN2_0.0.0");
#endif
# vi ./lib/puny_encode.c
-- 마지막 줄의 아래부분 전체 삭제
#ifdef HAVE_SYMVER_ALIAS_SUPPORT
__typeof__ (_idn2_punycode_encode_internal) _idn2_punycode_encode
__attribute__ ((visibility ("default"),
alias ("_idn2_punycode_encode_internal")));
__asm__ (".symver _idn2_punycode_encode, _idn2_punycode_encode@IDN2_0.0.0");
#endif
# make
# sudo make install
ncurses
TUI기반 프로그램을 개발하기 위해 API를 제공하는 라이브러리
SVR4에서 TUI어플리케이션을 개발하기 위해 사용한 curses터미널 제어라이브러리를 새롭게 만든 라이브러리가 ncurses다. curses는 cursor optimizaion이라는 의미다. 일반적으로 terminfo데이터베이스를 사용한다. 솔라리스에는 curses는 제공하지만, ncurses는 기본 제공하지 않기 때문에 별도로 설치해야 한다.
ncursesw는 ncurses의 와이드 캐릭터 버전이다. 쉽게 말하자면 UTF-8을 지원하는 라이브러리다. 솔라나라는 터미널 문자셋 기준이 UTF-8이기 때문에 ncursesw를 사용해야 한다.
ncursesw를 설치하면 /usr/local/share/terminfo에 터미널 정보 데이터베이스가 설치된다. 솔라리스에는 /usr/share/lib/terminfo가 있는데, 이보다 더 많은 터미널을 지원한다.
# wget https://invisible-island.net/archives/ncurses/ncurses-6.3.tar.gz
# tar xvfz ncurses-6.3.tar.gz
# cd ncurses-6.3
# ./configure --with-shared --enable-widec --disable-overwrite \
--enable-sp-funcs \
--enable-term-driver \
--enable-const \
--enable-ext-colors \
--enable-ext-mouse \
--enable-ext-putwin \
--enable-no-padding \
--enable-sigwinch
1)2)
...
** Configuration summary for NCURSES 6.3 20211021:
extended funcs: yes
xterm terminfo: xterm-new
bin directory: /usr/local/bin
lib directory: /usr/local/lib
include directory: /usr/local/include/ncursesw 3)
man directory: /usr/local/share/man
terminfo directory: /usr/local/share/terminfo
** Include-directory is not in a standard location
# make
# make install
1)--disable-overwrite파라메터 이후의 파라메터들은 확장용 파라메타다. UTF-8 지원이 가능한 ncursesw 으로 설치한다. 또한 솔라리스에서는 curses라이브러리와 같이 사용하기 위해 --disable-overwrite옵션을 붙인다. 2) 64비트로 컴파일 하려면 CFLAGS="-m64" LDFLAGS="-m64" CXXFLAGS="-m64" 옵션을 붙인다. 3) ncurses 라이브러리의 헤더가 설치되는 위치는 /usr/local/include/ncursesw이다. 꼭 기억하자. 빌드할 때 initscr32 심볼은 찾을 수 없다는 오류가 발생하면 대부분 라이브러리 헤더가 잘못 삽입되었을 때 발생한다.
1) 솔라리스에서 컴파일 하려면 cf_XOPEN_SOURCE=500 으로 되어있는 부분에서 500 을 지운다. 9058 라인이다. 2) 64비트로 컴파일 하려면 를 붙인다.
설정 및 실행
설정
설정 파일은 /usr/local/etc/lynx.cfg이다.
root@wl ~ # vi /usr/local/etc/lynx.cfg 1)
LOCALE_CHARSET:TRUE
SSL_CERT_FILE:/usr/local/ssl/certs/ca-bundle.crt
root@wl ~ # vi /usr/local/etc/lynx.lss 2)
li: normal: gray
1) lynx 설정 파일. 로케일 설정을 사용해 캐릭터셋을 설정하도록 수정한다. 솔라나라는 UTF-8 로케일을 사용한다. SSL 인증서 번들파일도 지정해준다. 2) LSS(Lynx Style Sheet) 설정 파일. 솔라나라는 li태그를 많이 사용하기 때문에, lynx의 기본 스타일 시트를 사용하면 보라색을 많이 사용한다. 이를 기본 텍스트로 수정한다.
링스 실행화면
root@wl ~ # lynx
링스 실행화면 - 솔라나라
root@wl ~ # lynx http://www.solanara.net
솔라나라와 Lynx
솔라나라는 Lynx 를 공식지원하지 않는다. 이미지 및 스크린샷을 사용하는 페이지에서는 제대로 보일 수 없기 때문이다. 하지만 어느정도의 불편을 감수하면 내용을 읽는데에는 지장없을것이다.
root@wl ~ # /usr/local/apache2/bin/apachectl status
Apache Server Status for localhost (via 127.0.0.1)
Server Version: Apache/2.4.x (Unix) mod_fastcgi/2.4.x OpenSSL/1.0.x
Server MPM: event
Server Built: Aug 23 2013 15:06:17
_________________________________________________________________
Current Time: Friday, 30-Aug-2013 00:00:00 KST
Restart Time: Friday, 23-Aug-2013 00:00:00 KST
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 6 days 22 hours 16 minutes 51 seconds
Server load: 0.03 0.02 0.02
Total accesses: 282940 - Total Traffic: x.9 GB
CPU Usage: u1534.48 s309.82 cu0 cs0 - .308% CPU load
.473 requests/sec - 8.6 kB/second - 18.2 kB/request
1 requests currently being processed, 124 idle workers
PID Connections Threads Async connections
total accepting busy idle writing keep-alive closing
26034 0 yes 0 25 0 0 0
26035 0 yes 0 25 0 0 0
26036 0 yes 0 25 0 0 0
26037 0 yes 0 25 0 0 0
28433 1 yes 1 24 0 1 0
Sum 1 1 124 0 1 0
________________________________________________________________
____________________________________________________W________...
................................................................
................................................................
................................................................
................................................................
................
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
root@wl ~ #
아파치 웹서버의 상태를 보려면, 아파치 웹서버의 mod_status를 활성화해야 하며, http://hostname/server-status 에 접근 가능해야 한다.
사용
root@wl ~ # lynx --help
USAGE: lynx [options] [file]
Options are:
- receive options and arguments from stdin
-accept_all_cookies
accept cookies without prompting if Set-Cookie handling
is on (off)
-anonymous apply restrictions for anonymous account,
see also -restrictions
-assume_charset=MIMEname
charset for documents that don't specify it
-assume_local_charset=MIMEname
charset assumed for local files
-assume_unrec_charset=MIMEname
use this instead of unrecognized charsets
-auth=id:pw authentication information for protected documents
-base prepend a request URL comment and BASE tag to text/html
outputs for -source dumps
-bibhost=URL local bibp server (default http://bibhost/)
-book use the bookmark page as the startfile (off)
-buried_news toggles scanning of news articles for buried references (on)
-cache=NUMBER NUMBER of documents cached in memory
-case enable case sensitive user searching (off)
-center toggle center alignment in HTML TABLE (off)
-cfg=FILENAME specifies a lynx.cfg file other than the default
-child exit on left-arrow in startfile, and disable save to disk
-child_relaxed exit on left-arrow in startfile (allows save to disk)
-cmd_log=FILENAME log keystroke commands to the given file
-cmd_script=FILENAME
read keystroke commands from the given file
(see -cmd_log)
-connect_timeout=N
set the N-second connection timeout (18000)
-cookie_file=FILENAME
specifies a file to use to read cookies
-cookie_save_file=FILENAME
specifies a file to use to store cookies
-cookies toggles handling of Set-Cookie headers (on)
-core toggles forced core dumps on fatal errors (off)
-crawl with -traversal, output each page to a file
with -dump, format output as with -traversal, but to stdout
-curses_pads uses curses pad feature to support left/right shifting (on)
-debug_partial incremental display stages with MessageSecs delay (off)
-delay=NNN set NNN-second delay at statusline message (0.000)
-display=DISPLAY set the display variable for X exec'ed programs
-display_charset=MIMEname
charset for the terminal output
-dont_wrap_pre inhibit wrapping of text in <pre> when -dump'ing and
-crawl'ing, mark wrapped lines in interactive session (off)
-dump dump the first file to stdout and exit
-editor=EDITOR enable edit mode with specified editor
-emacskeys enable emacs-like key movement (off)
-enable_scrollback
toggles compatibility with comm programs' scrollback
keys (may be incompatible with some curses packages) (off)
-error_file=FILE write the HTTP status code here
-exec enable local program execution
-force_empty_hrefless_a
force HREF-less 'A' elements to be empty (close them as
soon as they are seen) (off)
-force_html forces the first document to be interpreted as HTML (off)
-force_secure toggles forcing of the secure flag for SSL cookies (off)
-forms_options toggles forms-based vs old-style options menu (on)
-from toggle transmission of From headers (on)
-ftp disable ftp access (off)
-get_data user data for get forms, read from stdin,
terminated by '---' on a line
-head send a HEAD request (off)
-help print this usage message
-hiddenlinks=[option]
hidden links: options are merge, listonly, or ignore
-historical toggles use of '>' or '-->' as terminator for comments (off)
-homepage=URL set homepage separate from start page
-image_links toggles inclusion of links for all images (off)
-index=URL set the default index file to URL
-ismap toggles inclusion of ISMAP links when client-side
MAPs are present (off)
-justify do justification of text (off)
-link=NUMBER starting count for lnk#.dat files produced by -crawl (0)
-listonly with -dump, forces it to show only the list of links (off)
-localhost disable URLs that point to remote hosts (off)
-locexec enable local program execution from local files only (off)
-lss=FILENAME specifies a lynx.lss file other than the default
-mime_header include mime headers and force source dump
-minimal toggles minimal versus valid comment parsing (on)
-newschunksize=NUMBER
number of articles in chunked news listings
-newsmaxchunk=NUMBER
maximum news articles in listings before chunking
-nobold disable bold video-attribute
-nobrowse disable directory browsing
-nocc disable Cc: prompts for self copies of mailings (off)
-nocolor turn off color support
-noexec disable local program execution (DEFAULT) (on)
-nofilereferer disable transmission of Referer headers for file URLs (on)
-nolist disable the link list feature in dumps (off)
-nolog disable mailing of error messages to document owners (on)
-nomargins disable the right/left margins in the default
style-sheet (off)
-nomore disable -more- string in statusline messages
-nonrestarting_sigwinch
make window size change handler non-restarting (off)
-nonumbers disable the link/form numbering feature in dumps (off)
-nopause disable forced pauses for statusline messages
-noprint disable some print functions, like -restrictions=print (off)
-noredir don't follow Location: redirection (off)
-noreferer disable transmission of Referer headers (off)
-noreverse disable reverse video-attribute
-nostatus disable the miscellaneous information messages (off)
-notitle disable the title at the top of each page (off)
-nounderline disable underline video-attribute
-number_fields force numbering of links as well as form input fields (off)
-number_links force numbering of links (off)
-partial toggles display partial pages while downloading (on)
-partial_thres [=NUMBER]
number of lines to render before repainting display
with partial-display logic (-1)
-passive-ftp toggles passive ftp connection (on)
-pauth=id:pw authentication information for protected proxy server
-popup toggles handling of single-choice SELECT options via
popup windows or as lists of radio buttons (off)
-post_data user data for post forms, read from stdin,
terminated by '---' on a line
-preparsed show parsed text/html with -source and in source view
to visualize how lynx behaves with invalid HTML (off)
-prettysrc do syntax highlighting and hyperlink handling in source
view (off)
-print enable print functions (DEFAULT), opposite of -noprint (on)
-pseudo_inlines toggles pseudo-ALTs for inlines with no ALT string (on)
-raw toggles default setting of 8-bit character translations
or CJK mode for the startup character set (off)
-realm restricts access to URLs in the starting realm (off)
-read_timeout=N set the N-second read-timeout (18000)
-reload flushes the cache on a proxy server
(only the first document affected) (off)
-restrictions=[options]
use -restrictions to see list
-resubmit_posts toggles forced resubmissions (no-cache) of forms with
method POST when the documents they returned are sought
with the PREV_DOC command or from the History List (off)
-rlogin disable rlogins (off)
-scrollbar toggles showing scrollbar (off)
-scrollbar_arrow toggles showing arrows at ends of the scrollbar (on)
-selective require .www_browsable files to browse directories
-short_url enables examination of beginning and end of long URL in
status line (off)
-show_cfg Show `LYNX.CFG' setting (off)
-show_cursor toggles hiding of the cursor in the lower right corner (on)
-show_rate toggles display of transfer rate (on)
-soft_dquotes toggles emulation of the old Netscape and Mosaic
bug which treated '>' as a co-terminator for
double-quotes and tags (off)
-source dump the source of the first file to stdout and exit
-stack_dump disable SIGINT cleanup handler (off)
-startfile_ok allow non-http startfile and homepage with -validate (off)
-stderr write warning messages to standard error when -dump
or -source is used (off)
-stdin read startfile from standard input (off)
-tagsoup use TagSoup rather than SortaSGML parser (off)
-telnet disable telnets (off)
-term=TERM set terminal type to TERM
-tlog toggles use of a Lynx Trace Log for the current
session (on)
-tna turn on "Textfields Need Activation" mode (off)
-trace turns on Lynx trace mode (off)
-trace_mask customize Lynx trace mode (0)
-traversal traverse all http links derived from startfile
-trim_input_fields
trim input text/textarea fields in forms (off)
-underline_links toggles use of underline/bold attribute for links (on)
-underscore toggles use of _underline_ format in dumps (off)
-use_mouse turn on mouse support (off)
-useragent=Name set alternate Lynx User-Agent header
-validate accept only http URLs (meant for validation)
implies more restrictions than -anonymous, but
goto is allowed for http and https (off)
-verbose toggles [LINK], [IMAGE] and [INLINE] comments
with filenames of these images (on)
-version print Lynx version information
-vikeys enable vi-like key movement (off)
-width=NUMBER screen width for formatting of dumps (default is 80)
-with_backspaces emit backspaces in output if -dumping or -crawling
(like 'man' does) (off)
-xhtml-parsing enable XHTML 1.0 parsing (off)