Ya hemos visto anteriormente Cómo Instalar Memcached (32bits) en Solaris 10, sin embargo, ahora vamos a ver cómo podemos instalarlo sobre OpenSolaris.
La verdad es que el proceso de instalación es muy similar -no en vano OpenSolaris es Solaris- y sólo debemos tener en cuenta algunas cosas.
Si instalamos MemCached desde el binario para Solaris 10 que os preparé, y queremos hacer la instalación sobre una zona creada en OpenSolaris utilizando el instalador de texto, es probable que las bibliotecas de ejecución de GCC <GCC Runtime> no se encuentren instaladas, y eso nos haga aparecer un <Not Found> en la consulta del comando <ldd>.
Vamos a ver cómo podemos instalar memcached en OpenSolaris paso a paso utilizando el binario de MemCached 1.4.5 para Solaris 10 x86
root@appserver:/# cd /opt
root@appserver:/opt# wget http://blog.sfchildren.com/blogger/memcached/binary/memcached-1.4.5-SOLARIS-X86.tar.gz
root@appserver:/opt# gzip -dc memcached-1.4.5-SOLARIS-X86.tar.gz | tar xvpf -
x memcached/32, 0 bytes, 0 tape blocks
x memcached/32/include, 0 bytes, 0 tape blocks
x memcached/32/include/memcached, 0 bytes, 0 tape blocks
x memcached/32/include/memcached/protocol_binary.h, 14855 bytes, 30 tape blocks
x memcached/32/share, 0 bytes, 0 tape blocks
x memcached/32/share/man, 0 bytes, 0 tape blocks
x memcached/32/share/man/man1, 0 bytes, 0 tape blocks
x memcached/32/share/man/man1/memcached.1, 5304 bytes, 11 tape blocks
x memcached/32/run, 0 bytes, 0 tape blocks
x memcached/32/bin, 0 bytes, 0 tape blocks
x memcached/32/bin/memcached, 97104 bytes, 190 tape blocks
x memcached/libevent, 0 bytes, 0 tape blocks
x memcached/libevent/32, 0 bytes, 0 tape blocks
x memcached/libevent/32/include, 0 bytes, 0 tape blocks
x memcached/libevent/32/include/event-config.h, 8243 bytes, 17 tape blocks
x memcached/libevent/32/include/evrpc.h, 16358 bytes, 32 tape blocks
x memcached/libevent/32/include/event.h, 37776 bytes, 74 tape blocks
x memcached/libevent/32/include/evhttp.h, 11561 bytes, 23 tape blocks
x memcached/libevent/32/include/evdns.h, 18900 bytes, 37 tape blocks
x memcached/libevent/32/include/evutil.h, 5529 bytes, 11 tape blocks
x memcached/libevent/32/bin, 0 bytes, 0 tape blocks
x memcached/libevent/32/bin/event_rpcgen.py, 45502 bytes, 89 tape blocks
x memcached/libevent/32/share, 0 bytes, 0 tape blocks
x memcached/libevent/32/share/man, 0 bytes, 0 tape blocks
x memcached/libevent/32/share/man/man3, 0 bytes, 0 tape blocks
x memcached/libevent/32/share/man/man3/evdns.3, 11563 bytes, 23 tape blocks
x memcached/libevent/32/share/man/man3/event.3, 17705 bytes, 35 tape blocks
x memcached/libevent/32/lib, 0 bytes, 0 tape blocks
x memcached/libevent/32/lib/libevent_core.la, 891 bytes, 2 tape blocks
x memcached/libevent/32/lib/libevent_core-1.4.so.2.1.3, 98224 bytes, 192 tape blocks
x memcached/libevent/32/lib/libevent.la, 856 bytes, 2 tape blocks
x memcached/libevent/32/lib/libevent_extra-1.4.so.2.1.3, 188612 bytes, 369 tape blocks
x memcached/libevent/32/lib/libevent.so symbolic link to libevent-1.4.so.2.1.3
x memcached/libevent/32/lib/libevent-1.4.so.2.1.3, 233872 bytes, 457 tape blocks
x memcached/libevent/32/lib/libevent_core.a, 127760 bytes, 250 tape blocks
x memcached/libevent/32/lib/libevent_core.so symbolic link to libevent_core-1.4.so.2.1.3
x memcached/libevent/32/lib/libevent_core-1.4.so.2 symbolic link to libevent_core-1.4.so.2.1.3
x memcached/libevent/32/lib/libevent_extra.so symbolic link to libevent_extra-1.4.so.2.1.3
x memcached/libevent/32/lib/libevent.a, 290116 bytes, 567 tape blocks
x memcached/libevent/32/lib/libevent_extra.la, 898 bytes, 2 tape blocks
x memcached/libevent/32/lib/libevent-1.4.so.2 symbolic link to libevent-1.4.so.2.1.3
x memcached/libevent/32/lib/libevent_extra.a, 226568 bytes, 443 tape blocks
x memcached/libevent/32/lib/libevent_extra-1.4.so.2 symbolic link to libevent_extra-1.4.so.2.1.3
x memcached/README, 2348 bytes, 5 tape blocks
x memcached/svc, 0 bytes, 0 tape blocks
x memcached/svc/memcached_1, 3874 bytes, 8 tape blocks
x memcached/svc/memcached_1.xml, 5129 bytes, 11 tape blocks
root@appserver:/opt# ls -ltr
total 5
drwxr-xr-x 3 root root 3 May 25 11:01 www
-rw-r--r-- 1 root root 602334 May 25 12:22 memcached-1.4.5-SOLARIS-X86.tar.gz
drwxr-xr-x 5 root root 6 May 25 12:22 memcached
root@appserver:/opt# rm memcached-1.4.5-SOLARIS-X86.tar.gz
Verificación de Dependencias
Debemos comprobar que tenemos todas las dependencias instaladas, para ello vamos a utilizar el comando <ldd> y veremos si el enlazador no ha podido encontrar alguna <so>.
NOTA: En función de la arquitectura que tengamos -x86, SPARC- se mostrarán unos archivos u otros, esto no importa mientras no aparezcan referencias <inválidas o no encontradas> En nuestro caso, no se ha encontrado el runtime de GCC -ya que se compiló con GCC-, por eso aparece libgcc_s.so.1 => (File not found)
root@appserver:/opt# cd memcached/32/binYa hemos visto que nos hace falta el runtime de GCC, por lo tanto, vamos a instalarlo utilizando el comando <pkg install SUNWgccruntime>.
root@appserver:/opt/memcached/32/bin# ldd memcached
libumem.so.1 => /lib/libumem.so.1
libnsl.so.1 => /lib/libnsl.so.1
libsocket.so.1 => /lib/libsocket.so.1
libevent-1.4.so.2 => /opt/memcached/libevent/32/lib/libevent-1.4.so.2
libpthread.so.1 => /lib/libpthread.so.1
libc.so.1 => /lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
librt.so.1 => /lib/librt.so.1
libresolv.so.2 => /lib/libresolv.so.2
libgcc_s.so.1 => (file not found)
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
libsmbios.so.1 => /usr/lib/libsmbios.so.1
libm.so.2 => /lib/libm.so.2
root@appserver:/# pkg install SUNWgccruntimeVolvemos a comprobar las dependencias, y vemos que ya se ha resulto el problema del runtime de GCC
DOWNLOAD PKGS FILES XFER (MB)
Completed 1/1 34/34 1.9/1.9
PHASE ACTIONS
Install Phase 115/115
root@appserver:/# cd /opt/memcached/32/bin/Instalación de MemCached utilizando SVC
root@appserver:/opt/memcached/32/bin# ldd memcached
libumem.so.1 => /lib/libumem.so.1
libnsl.so.1 => /lib/libnsl.so.1
libsocket.so.1 => /lib/libsocket.so.1
libevent-1.4.so.2 => /opt/memcached/libevent/32/lib/libevent-1.4.so.2
libpthread.so.1 => /lib/libpthread.so.1
libc.so.1 => /lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
librt.so.1 => /lib/librt.so.1
libresolv.so.2 => /lib/libresolv.so.2
libgcc_s.so.1 => /usr/sfw/lib/libgcc_s.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
libsmbios.so.1 => /usr/lib/libsmbios.so.1
libm.so.2 => /lib/libm.so.2
Vamos a copiar los archivos para SVC que tenemos en <$MEMCACHED_HOME/svc> -method y manifest- en sus ubicaciones correspondientes. Posteriormente añadiremos el grupo <memcache>, usuario <memcache> y project <user.memcache> definidos en nuestro archivo manifest
root@appserver:/opt/memcached/svc# cp memcached_1 /lib/svc/methodConclusión
root@appserver:/opt/memcached/svc# groupadd memcache
root@appserver:/opt/memcached/svc# useradd -g memcache -s /bin/bash -d /export/home/memcache -m memcache
80 blocks
root@appserver:/opt/memcached/svc# projadd -G memcache -U memcache -c 'MemCached Project' user.memcache
root@appserver:/opt/memcached/svc# cp memcached_1.xml /var/svc/manifest/application/cache/memcached_1
root@appserver:/opt/memcached/svc# cd /var/svc/manifest/application/cache/memcached_1
root@appserver:/var/svc/manifest/application/cache/memcached_1# svccfg
svc:> validate memcached_1.xml
svc:> import memcached_1.xml
svc:> quit
root@appserver:/var/svc/manifest/application/cache/memcached_1# svcs memcached_1
STATE STIME FMRI
disabled 12:34:52 svc:/application/cache/memcached_1:memcached_default32bits
root@appserver:/var/svc/manifest/application/cache/memcached_1# svcadm enable memcached_1
root@appserver:/var/svc/manifest/application/cache/memcached_1# svcs memcached_1
STATE STIME FMRI
online 12:42:58 svc:/application/cache/memcached_1:memcached_default32bits
La verdad es que el proceso de instalación sobre OpenSolaris es idéntico a Solaris, además con el uso de los comandos de instalación <pkg> nos simplifica la resolución de dependencias.
Referencias
No hay comentarios:
Publicar un comentario