ã¼ãã¯é·å¹´ããããæ¹æ³ã§ç®¡çãã¦ã¾ãããã¨ããã話ã§ããLinuxã§ãã
ãã£ã¬ã¯ããªã¬ã¤ã¢ã¦ãæ¦è¦³
ãã¨ãã°ãasoã¨bmdã¨ããååã®ã½ããã¦ã¨ã¢ãã¤ã³ã¹ãã¼ã«ãã¦ããç¶æ ã¯ãããªæã:
/usr/local/ ⬠app/ ⬠aso â aso-1.3 â â aso-1.2/ ⬠bin/ ⬠armored â â â â scrum â â â sbin/ â syd â â â share/ â man/ â â aso-1.3/ ⬠bin/ ⬠armored â â â â scrum â â â sbin/ â syd â â â share/ â man/ â â bmd â bmd-2.0 â â bmd-2.0/ ⬠bin/ â tri â â include/ â angle.h â â lib/libsnk.so.2.0.0 â bin/ ⬠armored â ../app/aso/bin/armored â â scrum â ../app/aso/bin/scrum â â tri â ../app/bmd/bin/tri â include/ â bmd â ../app/bmd/include â sbin/ â syd â ../app/aso/sbin/syd
- /usr/local/app/NAME-VERSION ã®ä¸ã«ä¸å¼ã¤ã³ã¹ãã¼ã«ãã
- /usr/local/app/NAME 㯠/usr/local/app/NAME-VERSION ã¸ã® symlink
- /usr/local/app/NAME/bin/* ã«ã¤ãã¦ã¯ã/usr/local/bin/ ã®ä¸ã« symlink ãä½ã
- /usr/local/app/NAME/sbin/* ã«ã¤ãã¦ãåæ§ã/usr/local/sbin/ ã®ä¸ã« symlink ãä½ã
- /usr/local/app/NAME/include ã«ã¤ãã¦ã¯ã
- /usr/local/app/NAME/include/*.h ã®ã¿ã¤ãã®å ´åã/usr/local/include/NAME ã« /usr/local/app/NAME/include ã¸ã® symlink ãä½ã
- /usr/local/app/NAME/include/NAME/*.h ã®ã¿ã¤ãã®å ´åã/usr/local/include/NAME ã« /usr/local/app/NAME/include/NAME ã¸ã® symlink ãä½ã
- /usr/local/app/NAME/lib ã«ã¤ãã¦ã¯ãecho "/usr/local/app/NAME/lib" > /etc/ld.so.conf.d/NAME.conf ãã (/usr/local/lib/ã«ã¯symlinkãå¼µããªã)
- /usr/local/app/NAME/share/man ã«ã¤ãã¦ã¯ãvi /etc/manpath.configãã¦MANDATORY_MANPATH /usr/local/app/NAME/share/man ã追å ãã (/usr/local/share/man/ã«ã¯symlinkãå¼µããªã)
æ°è¦ã«ã¤ã³ã¹ãã¼ã«ããå ´åã®å ·ä½æé
次ã«å ·ä½çãªæé ã
"neo"ã¨ããåã®ã½ããã¦ã¨ã¢ãæ°è¦ã«ã¤ã³ã¹ãã¼ã«ããå ´åã®æé ã
tar zxf neo-1.0.tar.gz cd neo-1.0 ./configure --prefix=/usr/local/app/neo-1.0 --sysconfdir=/usr/local/etc/neo make make install ln -snf neo-1.0 /usr/local/app/neo cd /usr/local/bin/ && ln -sf ../app/neo/bin/* . # bin/* ãããã° cd /usr/local/sbin/ && ln -sf ../app/neo/sbin/* . # sbin/* ãããã° ln -snf ../app/neo/include /usr/local/include/neo # include ãããã° echo "/usr/local/app/neo/lib" > /etc/ld.so.conf.d/neo.conf # lib ãããã° ldconfig vi /etc/manpath.config # share/man ãããã° "MANDATORY_MANPATH /usr/local/app/NAME/share/man" ã追å
å¾åã® symlink å¼µãã¨ããããã©ãããã§ãããä¸åº¦ããã®ä½æ¥ï¼å¾è¿°ï¼ãªã®ã§æ°ã«ããªãã
ç°ãªããã¼ã¸ã§ã³ã®ãã¤ã³ã¹ãã¼ã«ããå ´åã®å ·ä½æé
ã¤ã¥ãã¦ãã¥ã¼ãã¼ã¸ã§ã³ã® neo-1.1 ãã¤ã³ã¹ãã¼ã«ããå ´åããã®ã¸ãããããã½ã§ãã
tar zxf neo-1.1.tar.gz cd neo-1.1 ./configure --prefix=/usr/local/app/neo-1.1 --sysconfdir=/usr/local/etc/neo make make install ln -snf neo-1.1 /usr/local/app/neo
åºæ¬çã«ã/usr/local/app/neo ã® symlink ãå¼µãæ¿ããã ã㧠OKããªããªããæ°è¦ã®ã¨ãã® bin, sbin, include, lib, man ã® symlink ããã¹æå®ã¯ãå ¨ã¦ /usr/local/app/neo-VERISON ã§ã¯ãªã /usr/local/app/neo ã¨ãããã¹ã使ã£ã¦ããããã
ãããneo-1.1 ã§ãªã«ãä¸å ·åããã£ãå ´åã«ã¯ãåã® neo-1.0 ãæã symlink ã«å¼µãç´ãã ãã§åãæ»ããå®äºããã®ã§ã©ã¯ãã³ã
ãã®ãããª2段éã®symlinkã¯ãDebianç³»ã®/etc/alternatives/ãªã©ã§ãè¦ãããææ³ã§ããã
$ readlink /usr/bin/vim /etc/alternatives/vim $ readlink /etc/alternatives/vim # ããã®symlinkãã¤ãããã /usr/bin/vim.gnome $ readlink /usr/bin/vim.gnome # (å®ä½)
ãã¨ãä»ã®ãã·ã³ã«ã neo-1.1 ãã¤ã³ã¹ãã¼ã«ããå ´åãæ§æãä¸ç·ãªããrsync -avR /usr/local/app/neo /usr/local/app/neo-1.1 OTHERHOST:/ ã§å®äºããã®ã§ã©ã¯ãã³ã
ã¤ã¾ããååã¤ã³ã¹ãã¼ã«æ㯠symlink å¼µããªã©ã¡ããã¨ããã©ãï¼ã§ãä¸åº¦ããï¼ã§ããããã¼ã¸ã§ã³ã¢ããæï¼ãã£ã¡ã¯ä½åº¦ãããã¯ãï¼ã«ã¯æé ãé常ã«å°ãªãã¦æ¸ã管çææ³ã¨ããããã§ãã
ãã¾ã
./configure ã®ãã«ãã¼ã¹ã¯ãªãã
configureã®ãªãã·ã§ã³æå®ãããããªãã«ãã¼ã¹ã¯ãªãããç¨æãã¦ç°¡åã«ãã¦ãã¾ãã
#!/bin/sh # /usr/local/src/conf/generic . /usr/local/src/conf/common decide_version "$@" [ -z "$SYS_HOME" ] && SYS_HOME=/usr/local CONFIGURE_OPT="--sysconfdir=${SYS_HOME}/etc/${APP}" [ "$1" = "-0" ] && CONFIGURE_OPT= myconfigure \ --prefix=/usr/local/app/${APP}-${VER} \ $CONFIGURE_OPT \ ;
# -*- mode: sh; -*- # /usr/local/src/conf/common #_CFLAGS='-march=pentium3 -O3 -pipe -fomit-frame-pointer' _CFLAGS='-O2 -pipe -fomit-frame-pointer' myconfigure() { { echo env CFLAGS="${_CFLAGS}" ./configure "$@"; echo env CFLAGS="${_CFLAGS}" ./configure "$@"; } 2>&1|tee _configure.log } debugconfigure() { { echo env CFLAGS="-O0 -g" ./configure "$@"; echo env CFLAGS="-O0 -g" ./configure "$@"; } 2>&1|tee _configure.log } decide_version() { VER=${PWD##*-} APP=${PWD##*/}; APP=${APP%%-*} case $VER in [0-9]*) ;; *) VER=;; esac case $1 in [0-9]*) VER=$1 shift ;; esac if [ -z "$VER" ]; then echo -n "input version string> " read VER fi echo "APP=$APP" echo "VER=$VER" read -t 8 -p 'hit any key' dummy }
$ cd neo-1.2 $ /usr/local/src/conf/generic --prefix=/usr/local/app/nao-1.2 # ããã«ã¯ããã£ã¦ããã --sysconfdir=/usr/local/etc/neo hit any key ...(snip)... $ make
åºæã®ãªãã·ã§ã³ãããããæå®ãããã¨ãã¯ãconf/generic ã conf/nginx ã¨ãã«ã³ãã¼ãã¦ããããæå®ãã¦ã¾ãã
#!/bin/sh # /usr/local/src/conf/nginx . /usr/local/src/conf/common decide_version "$@" [ -z "$SYS_HOME" ] && SYS_HOME=/usr/local myconfigure \ --prefix=/usr/local/app/nginx-${VER} \ --conf-path=$SYS_HOME/etc/nginx/nginx.conf \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/run/nginx/nginx.lock \ --error-log-path=/var/log/nginx/default.err \ --http-log-path=/var/log/nginx/default.acc \ --http-client-body-temp-path=/var/tmp/nginx/req \ --http-proxy-temp-path=/var/tmp/nginx/proxy \ --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ --without-mail_pop3_module \ --without-mail_imap_module \ --without-mail_smtp_module \ --with-md5-asm \ --with-sha1-asm \ --with-http_stub_status_module \ --with-http_realip_module \ ;
debã¨ãrpmããã±ã¼ã¸ã«ããªãã®ï¼
ããããããã±ã¼ã¸ãããããå©ç¹ãèªåã«ã¯è¦ãã ããªãã®ã§ãdebãrpmããã±ã¼ã¸ã«ã¯ãã¦ã¾ããã
ãªãã§ã½ã¼ã¹ãèªåãã«ãããã®ï¼ ãã£ã¹ããªã®ãã¤ããªããã±ã¼ã¸ä½¿ããªãã®ï¼
ãã¤ããªããã±ã¼ã¸ã¯ããªããªä½¿ã£ã¦ãã¦ãããããã½ã¼ã¹ããèªåãã«ãã¯ããå°æ°ã§ãã
èªåãèªåãã«ãããå¤æåºæºã¯ããã§ã:
- å
ã£ã¡ãã追ã£ãããã
- ãã£ã¹ããªä»å±ã®ã¯å¾ã ã«ãã¦ã¡ãã£ã¨å¤ãã£ããããã®ã§
- configureã®ãªãã·ã§ã³ãææ¡ãã¦ããããã好ããªããã«æå®ããã
- Apacheã¨ãNginxã¨ãã§ãããä¸è¦ãªãã®ã¯ç©æ¥µçã«--without-*ã®åã
å ·ä½çã«ã¯ãã¾ããªãã¦ãHTTPãµã¼ã (Apache, Nginx, Lighttpd)ãPHPãmemcachedãTokyo Cabinetã¨ã©ã¤ãã©ãªç³»ã®ãã®ãããã¤ããããã§ãã