openSUSE-12.2ã«darkhttpdãcheckinstallãã¦rpmã§å ¥ãã
ã³ãã³ãããããã£ã¨ä½¿ããå²ã«ä¸æçãªç©ç½®ãã®ã¿ãªããã¦ã§ãéçºç¨ã«ãéå®ããç°¡æHTTPdã®darkhttpdãå°å ¥ãã¾ãããã
ã¨ãæã£ãããã©ã
% zypper se darkhttpd ...
ãã¯ãåºã¦æ¥ãªãã£ããã¦ã§ãã®ããã±ã¼ã¸æ¤ç´¢ã§ã出てこないã
darkhttpdã¯æ®éã«ã½ã¼ã¹ãtarçã§å ¬éãã¦ãããããã«ããæ°ç§ã¨æãããªãã³ã³ãã¯ããªè¯ãåã`make`ãã¦`cp darkhttpd ~/opt/bin`ã¨ããã¦ãæ§ããªãã®ã ãã©ãcheckinstallã§ãæ軽ã«rpmã«ãã¦å°å ¥ãã¦ã¿ãã
å ãã¯checkinstallãå°å ¥ãã¾ãããããã¡ãã¯zypperã§å°å ¥ã§ãã¾ãã
% zypper in checkinstall-lang
...
langã®ä¾åããã±ã¼ã¸ã§æ¬ä½ãå ¥ãã®ã§ã³ãã³ãæã¤ã®ã楽ãªãã§ãã´ã¡ã³ããµã¤ã´ã¡ã³ããµã¤ã»ï½ã»
ãã¦ãcheckinstallãå°å ¥ã§ãããªãæ©é使ã£ã¦ã¿ã¾ãããããªããzypperã§å°å ¥ããcheckinstallã¯`/usr/sbin`ã«å°å ¥ããã¦ãã¾ãããã£ã¦rootãããªãã¨ä½¿ãã¾ããã
% sudo su
...
% which checkinstall
/usr/sbin/checkinstall
checkinstallãä»åã¯darkhttpdã®tarçãå±éãããã£ã¬ã¯ããªã¼ã§å®è¡ãã¾ãã
% ls AUTHORS Makefile README darkhttpd.c % checkinstall ...
対話ãé²ãã¾ãã
checkinstall 1.6.2, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran ãã®ã½ããã¦ã§ã¢ã¯GNU GPLã®ä¸ã§ãªãªã¼ã¹ãã¦ãã¾ãã The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: ããã±ã¼ã¸ã®ããã¥ã¡ã³ãã¼ã·ã§ã³ãæºå..OK 使ç¨ããããã±ã¼ã¸æ¹å¼ãé¸ãã§ãã ããã Slackwareãªã[S], RPMãªã[R], Debianãªã[D]ãå ¥åR ãã®ããã±ã¼ã¸ã®èª¬æãæ¸ãã¦ãã ãã 説æã®æ«å°¾ã¯ç©ºè¡ãEOFã«ãã¦ãã ããã >> When you need a web server in a hurry. >> ************************************** **** RPM package creation selected *** ************************************** ãã®ããã±ã¼ã¸ã¯ä»¥ä¸ã®å 容ã§æ§æããã¾ã: 1 - Summary: [ When you need a web server in a hurry. ] 2 - Name: [ darkhttpd ] 3 - Version: [ 1.8 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ x86_64 ] 8 - Source location: [ darkhttpd-1.8 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ darkhttpd ] å¤æ´ãããã®ã®çªå·ãå ¥åãã¦ãã ãããEnterã§ç¶è¡ãã¾ã: Installing with make...Installing with install... ========================= ã¤ã³ã¹ãã¼ã«ã®çµæ =========================== make: *** ã¿ã¼ã²ãã `install' ã make ããã«ã¼ã«ãããã¾ãã. ä¸æ¢. **** ã¤ã³ã¹ãã¼ã«ã¯å¤±æãã¾ãããããã±ã¼ã¸ã®ä½æãä¸æãã¾ã ã¯ãªã¼ã³ã¢ãã..OK Bye.
oops!!
darkhttpdã®Makefileã«ã¯installã«ã¼ã«ãç¡ãã®ã§ããã
% cat Makefile CC?=cc CFLAGS?=-O LIBS=`[ \`uname\` = "SunOS" ] && echo -lsocket -lnsl` .PHONY: all clean all: darkhttpd darkhttpd: darkhttpd.c $(CC) $(CFLAGS) $(LIBS) darkhttpd.c -o $@ clean: rm -f darkhttpd core darkhttpd.core
installã«ã¼ã«ã追è¨ãã¾ãããã»ï½ã»ï¼
% echo -e '\ninstall: darkhttpd\n\tinstall darkhttpd /usr/local/bin\n' >> Makefile
ãã¦ãã¦ã¯ã³ã¢ã¢ã»ï½ã»
% checkinstall checkinstall 1.6.2, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran ãã®ã½ããã¦ã§ã¢ã¯GNU GPLã®ä¸ã§ãªãªã¼ã¹ãã¦ãã¾ãã 使ç¨ããããã±ã¼ã¸æ¹å¼ãé¸ãã§ãã ããã Slackwareãªã[S], RPMãªã[R], Debianãªã[D]ãå ¥åR ************************************** **** RPM package creation selected *** ************************************** ãã®ããã±ã¼ã¸ã¯ä»¥ä¸ã®å 容ã§æ§æããã¾ã: 1 - Summary: [ When you need a web server in a hurry. ] 2 - Name: [ darkhttpd ] 3 - Version: [ 1.8 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ Applications/System ] 7 - Architecture: [ x86_64 ] 8 - Source location: [ darkhttpd-1.8 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ darkhttpd ] å¤æ´ãããã®ã®çªå·ãå ¥åãã¦ãã ãããEnterã§ç¶è¡ãã¾ã: Installing with make...Installing with install... ========================= ã¤ã³ã¹ãã¼ã«ã®çµæ =========================== cc -O `[ \`uname\` = "SunOS" ] && echo -lsocket -lnsl` darkhttpd.c -o darkhttpd install darkhttpd /usr/local/bin ======================== ã¤ã³ã¹ãã¼ã«ã«æåãã¾ãã ========================== Copying documentation directory... ./ ./AUTHORS ./README tempãã£ã¬ã¯ããªã«ãã¡ã¤ã«ãã³ãã¼..OK Stripping ELF binaries and libraries...OK manãã¼ã¸ãå§ç¸®..OK ãã¡ã¤ã«ãªã¹ããä½æ..OK RPMããã±ã¼ã¸ãä½æ..OK 注æ: ããã±ã¼ã¸ã¯ã¤ã³ã¹ãã¼ã«ããã¾ãã tempãã¡ã¤ã«ãåé¤..OK ããã¯ã¢ããããã±ã¼ã¸ãæ¸ãè¾¼ã¿..OK OK temp dirãåé¤..OK ********************************************************************** Done. The new package has been saved to /usr/src/packages/RPMS/x86_64/darkhttpd-1.8-1.x86_64.rpm You can install it in your system anytime using: rpm -i darkhttpd-1.8-1.x86_64.rpm **********************************************************************
å ã»ã©å¤±æããéã«å®ç¾©æ¸ã¿ã ã£ãå 容ãæ®ã£ã¦ããã®ã§ Enter 1å㧠rpm ä½æã¾ã§é²ã¿ã¾ãããæå¾ã«åºã¦ããã¡ãã»ã¼ã¸ãåºã«ãããã±ã¼ã¸ã`rpm -i`ã§ã¤ã³ã¹ãã¼ã«ãã¾ãããã
% rpm -i /usr/src/packages/RPMS/x86_64/darkhttpd-1.8-1.x86_64.rpm
rootããæãã¦ä¸è¬ã¦ã¼ã¶ã¼ã§`darkhttpd`ã使ã£ã¦ã¿ã¾ãããã
% exit % which darkhttpd /usr/local/bin/darkhttpd % darkhttpd . --daemon && curl http://localhost:8080 && pkill darkhttpd darkhttpd/1.8, copyright (c) 2003-2011 Emil Mikulic. listening on: http://0.0.0.0:8080/ <html> <head> <title>/</title> </head> <body> <h1>/</h1> <tt><pre> <a href="..">..</a>/ <a href="AUTHORS">AUTHORS</a> 56 <a href="Makefile">Makefile</a> 274 <a href="README">README</a> 1352 <a href="backup-120220121215-pre-darkhttpd-1.8.tgz">backup-120220121215-pre-darkhttpd-1.8.tgz</a> 5201601 <a href="darkhttpd">darkhttpd</a> 47038 <a href="darkhttpd.c">darkhttpd.c</a> 74774 <a href="description-pak">description-pak</a> 39 <a href="doc-pak">doc-pak</a>/ </pre></tt> <hr> Generated by darkhttpd/1.8 on Sun, 02 Dec 2012 03:28:58 GMT </body> </html>
åä½ãã¹ãã®ç°¡åã®çº`curl`ã§HTTP GETãã¦ãã¾ããããã¡ããChromeçã®ã¦ã§ããã©ã¦ã¶ã¼ã§ã確èªã§ãã¾ãããªããdarkhttpdã®ä½¿ãæ¹ã«ã¤ãã¦ã¯ãªãã·ã§ã³ç¡ãã§`darkhttpd`ãå®è¡ããã°è¡¨ç¤ºããã¾ãã