IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Administration système Discussion :

Installation de memcached via configure et Make


Sujet :

Administration système

  1. #1
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2007
    Messages
    365
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2007
    Messages : 365
    Par défaut Installation de memcached via configure et Make
    Bonjour à tous,

    Je suis en train de faire une installation de memcached sur un serveur web seulement voilà j'ai différentes erreurs lors que je tape la commande Make (et certainement lorsque je tape la commande ./configure ).

    Voici ce que j'ai obtenu lorsque j'ai effectué un ./configure puis la commande Make :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    [root@localhost memcached-1.4.5]# ./configure --enable-64bit --build x86_64-redhat-linux-gnu
    checking build system type... x86_64-redhat-linux-gnu
    checking host system type... x86_64-redhat-linux-gnu
    checking target system type... x86_64-redhat-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables... 
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for icc in use... no
    checking for Sun cc in use... no
    checking for gcc option to accept ISO C99... -std=gnu99
    checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking sasl/sasl.h usability... yes
    checking sasl/sasl.h presence... yes
    checking for sasl/sasl.h... yes
    checking for gcov... /usr/bin/gcov
    checking for main in -lgcov... yes
    checking for libevent directory... (system)
    checking for library containing socket... none required
    checking for library containing gethostbyname... none required
    checking for library containing umem_cache_create... no
    checking for library containing gethugepagesizes... no
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for inttypes.h... (cached) yes
    checking for print macros for integers (C99 section 7.8.1)... yes
    checking for an ANSI C-conforming const... yes
    checking for socklen_t... yes
    checking for endianness... little
    checking for htonll... no
    checking for library containing pthread_create... none required
    checking for mlockall... yes
    checking for getpagesizes... no
    checking for memcntl... no
    checking for sigignore... yes
    checking for alignment... need
    checking for setppriv... no
    checking umem.h usability... no
    checking umem.h presence... no
    checking for umem.h... no
    checking for xml2rfc... no
    checking for xsltproc... /usr/bin/xsltproc
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating doc/Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    You have new mail in /var/spool/mail/root
    [root@localhost memcached-1.4.5]# make
    make  all-recursive
    make[1]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5 »
    Making all in doc
    make[2]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make  all-am
    make[3]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[3]: Rien à faire pour « all-am ».
    make[3]: quittant le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[2]: quittant le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[2]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5 »
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-memcached.o -MD -MP -MF .deps/memcached-memcached.Tpo -c -o memcached-memcached.o `test -f 'memcached.c' || echo './'`memcached.c
    mv -f .deps/memcached-memcached.Tpo .deps/memcached-memcached.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-hash.o -MD -MP -MF .deps/memcached-hash.Tpo -c -o memcached-hash.o `test -f 'hash.c' || echo './'`hash.c
    mv -f .deps/memcached-hash.Tpo .deps/memcached-hash.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-slabs.o -MD -MP -MF .deps/memcached-slabs.Tpo -c -o memcached-slabs.o `test -f 'slabs.c' || echo './'`slabs.c
    mv -f .deps/memcached-slabs.Tpo .deps/memcached-slabs.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-items.o -MD -MP -MF .deps/memcached-items.Tpo -c -o memcached-items.o `test -f 'items.c' || echo './'`items.c
    mv -f .deps/memcached-items.Tpo .deps/memcached-items.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-assoc.o -MD -MP -MF .deps/memcached-assoc.Tpo -c -o memcached-assoc.o `test -f 'assoc.c' || echo './'`assoc.c
    mv -f .deps/memcached-assoc.Tpo .deps/memcached-assoc.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-thread.o -MD -MP -MF .deps/memcached-thread.Tpo -c -o memcached-thread.o `test -f 'thread.c' || echo './'`thread.c
    mv -f .deps/memcached-thread.Tpo .deps/memcached-thread.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-daemon.o -MD -MP -MF .deps/memcached-daemon.Tpo -c -o memcached-daemon.o `test -f 'daemon.c' || echo './'`daemon.c
    mv -f .deps/memcached-daemon.Tpo .deps/memcached-daemon.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-stats.o -MD -MP -MF .deps/memcached-stats.Tpo -c -o memcached-stats.o `test -f 'stats.c' || echo './'`stats.c
    mv -f .deps/memcached-stats.Tpo .deps/memcached-stats.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-util.o -MD -MP -MF .deps/memcached-util.Tpo -c -o memcached-util.o `test -f 'util.c' || echo './'`util.c
    mv -f .deps/memcached-util.Tpo .deps/memcached-util.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DNDEBUG   -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-cache.o -MD -MP -MF .deps/memcached-cache.Tpo -c -o memcached-cache.o `test -f 'cache.c' || echo './'`cache.c
    mv -f .deps/memcached-cache.Tpo .deps/memcached-cache.Po
    gcc -std=gnu99  -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls   -o memcached memcached-memcached.o memcached-hash.o memcached-slabs.o memcached-items.o memcached-assoc.o memcached-thread.o memcached-daemon.o memcached-stats.o memcached-util.o memcached-cache.o    -levent
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-memcached.o -MD -MP -MF .deps/memcached_debug-memcached.Tpo -c -o memcached_debug-memcached.o `test -f 'memcached.c' || echo './'`memcached.c
    mv -f .deps/memcached_debug-memcached.Tpo .deps/memcached_debug-memcached.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-hash.o -MD -MP -MF .deps/memcached_debug-hash.Tpo -c -o memcached_debug-hash.o `test -f 'hash.c' || echo './'`hash.c
    mv -f .deps/memcached_debug-hash.Tpo .deps/memcached_debug-hash.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-slabs.o -MD -MP -MF .deps/memcached_debug-slabs.Tpo -c -o memcached_debug-slabs.o `test -f 'slabs.c' || echo './'`slabs.c
    mv -f .deps/memcached_debug-slabs.Tpo .deps/memcached_debug-slabs.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-items.o -MD -MP -MF .deps/memcached_debug-items.Tpo -c -o memcached_debug-items.o `test -f 'items.c' || echo './'`items.c
    mv -f .deps/memcached_debug-items.Tpo .deps/memcached_debug-items.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-assoc.o -MD -MP -MF .deps/memcached_debug-assoc.Tpo -c -o memcached_debug-assoc.o `test -f 'assoc.c' || echo './'`assoc.c
    mv -f .deps/memcached_debug-assoc.Tpo .deps/memcached_debug-assoc.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-thread.o -MD -MP -MF .deps/memcached_debug-thread.Tpo -c -o memcached_debug-thread.o `test -f 'thread.c' || echo './'`thread.c
    mv -f .deps/memcached_debug-thread.Tpo .deps/memcached_debug-thread.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-daemon.o -MD -MP -MF .deps/memcached_debug-daemon.Tpo -c -o memcached_debug-daemon.o `test -f 'daemon.c' || echo './'`daemon.c
    mv -f .deps/memcached_debug-daemon.Tpo .deps/memcached_debug-daemon.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-stats.o -MD -MP -MF .deps/memcached_debug-stats.Tpo -c -o memcached_debug-stats.o `test -f 'stats.c' || echo './'`stats.c
    mv -f .deps/memcached_debug-stats.Tpo .deps/memcached_debug-stats.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-util.o -MD -MP -MF .deps/memcached_debug-util.Tpo -c -o memcached_debug-util.o `test -f 'util.c' || echo './'`util.c
    mv -f .deps/memcached_debug-util.Tpo .deps/memcached_debug-util.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-cache.o -MD -MP -MF .deps/memcached_debug-cache.Tpo -c -o memcached_debug-cache.o `test -f 'cache.c' || echo './'`cache.c
    mv -f .deps/memcached_debug-cache.Tpo .deps/memcached_debug-cache.Po
    gcc -std=gnu99 -fprofile-arcs -ftest-coverage -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls   -o memcached-debug memcached_debug-memcached.o memcached_debug-hash.o memcached_debug-slabs.o memcached_debug-items.o memcached_debug-assoc.o memcached_debug-thread.o memcached_debug-daemon.o memcached_debug-stats.o memcached_debug-util.o memcached_debug-cache.o   -lgcov  -levent
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.     -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT sizes.o -MD -MP -MF .deps/sizes.Tpo -c -o sizes.o sizes.c
    mv -f .deps/sizes.Tpo .deps/sizes.Po
    gcc -std=gnu99  -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls   -o sizes sizes.o  -levent
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.     -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT testapp.o -MD -MP -MF .deps/testapp.Tpo -c -o testapp.o testapp.c
    mv -f .deps/testapp.Tpo .deps/testapp.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.     -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
    mv -f .deps/util.Tpo .deps/util.Po
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.     -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT cache.o -MD -MP -MF .deps/cache.Tpo -c -o cache.o cache.c
    mv -f .deps/cache.Tpo .deps/cache.Po
    gcc -std=gnu99  -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls   -o testapp testapp.o util.o cache.o  -levent
    gcc -std=gnu99 -DHAVE_CONFIG_H -I.     -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT timedrun.o -MD -MP -MF .deps/timedrun.Tpo -c -o timedrun.o timedrun.c
    mv -f .deps/timedrun.Tpo .deps/timedrun.Po
    gcc -std=gnu99  -m64 -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls   -o timedrun timedrun.o  -levent
    make[2]: quittant le répertoire « /usr/local/src/memcached-1.4.5 »
    make[1]: quittant le répertoire « /usr/local/src/memcached-1.4.5 »
    [root@localhost memcached-1.4.5]# make install
    make  install-recursive
    make[1]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5 »
    Making install in doc
    make[2]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make  install-am
    make[3]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[4]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[4]: Rien à faire pour « install-exec-am ».
    test -z "/usr/local/share/man/man1" || /bin/mkdir -p "/usr/local/share/man/man1"
     /usr/bin/install -c -m 644 'memcached.1' '/usr/local/share/man/man1/memcached.1'
    make[4]: quittant le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[3]: quittant le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[2]: quittant le répertoire « /usr/local/src/memcached-1.4.5/doc »
    make[2]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5 »
    make[3]: entrant dans le répertoire « /usr/local/src/memcached-1.4.5 »
    test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
      /usr/bin/install -c 'memcached' '/usr/local/bin/memcached'
    test -z "/usr/local/include/memcached" || /bin/mkdir -p "/usr/local/include/memcached"
     /usr/bin/install -c -m 644 'protocol_binary.h' '/usr/local/include/memcached/protocol_binary.h'
    make[3]: quittant le répertoire « /usr/local/src/memcached-1.4.5 »
    make[2]: quittant le répertoire « /usr/local/src/memcached-1.4.5 »
    make[1]: quittant le répertoire « /usr/local/src/memcached-1.4.5 »
    You have new mail in /var/spool/mail/root
    [root@localhost memcached-1.4.5]#

    Je voudrais savoir qu'est ce qui est requis pour pouvoir installer memcached ?

    Y a t'il possibilité de pouvoir installer memcached via un fichier de format RPM ?

    Voici l'environnement technique du serveur où je souhaite installer Memcached :

    Distribution : RedHat Enterprise Linux Server 5.1 64 bit
    Apache 2.2.3
    Php 5.1.6
    Version de memcached à installer : 1.4.5

    Cordialement .

  2. #2
    Membre émérite
    Avatar de matrix788
    Profil pro
    Inscrit en
    Juin 2002
    Messages
    740
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 740
    Billets dans le blog
    2
    Par défaut
    salut,

    le readme est là pour çà :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Dependencies:
     
       -- libevent, http://www.monkey.org/~provos/libevent/ (libevent-dev)
     
    If using Linux, you need a kernel with epoll.  Sure, libevent will
    work with normal select, but it sucks.
     
    epoll isn't in Linux 2.4, but there's a backport at:
     
        http://www.xmailserver.org/linux-patches/nio-improve.html
     
    You want the epoll-lt patch (level-triggered).
    en gros, as-tu vérifié la présence de libevent, et la version de ton noyau installée ?

  3. #3
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2007
    Messages
    365
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2007
    Messages : 365
    Par défaut
    Bonjour et merci pour ta réponse.

    Je suis passé finalement par l'installation de memcached 1.4.5 grâce au fichier de format RPM mais non plus en .tar.gz .

    Juste avant j'ai installé une version plus récente de libevent (1.4) sous RPM .


    J'arrive bien à démarrer Memcached. Par contre lors de son démarrage je dois spécifier la quantité de mémoire à allouer par exemple (Il y a un fichier de configuration de /etc/memcached.conf , mais j'ai vu que les valeurs ajoutées n'étaient pas prises en compte au rédémarrage de memcached, cela viendrais certainement d'une tantative d'installation de memcached en .tar.gz précédente ) .

    Je voudrais faire démarrer memcached lorsque le système démarre sans passer par la commande
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    chkconfig <nom_du_service> on
    . Comment peut on (en général) exécuter un script shell au démarrage du système ?

    Cordialement .

  4. #4
    Membre émérite
    Avatar de matrix788
    Profil pro
    Inscrit en
    Juin 2002
    Messages
    740
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 740
    Billets dans le blog
    2
    Par défaut
    par .bashrc

    sinon fait un locate et repère tes installations précédentes. La prochaine fois, privilégies une installation dans /opt.

  5. #5
    Membre émérite Avatar de ctxnop
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2007
    Messages
    858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Morbihan (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2007
    Messages : 858
    Par défaut
    Salut,
    je suis peut être aveugle mais je n'ai pas vu une seule erreur lors de ton .configure/make/make install, pour moi ca s'était bien passé. Tu en avait peut être a l'exécution ? mais dans ce cas il aurait fallut nous les montrer.

    Sinon, à propos de la solution du .bashrc, je déteste cette méthode ^^'.
    .bashrc c'est quand tu log un user via Bash. Le système à donc démarré depuis longtemps et rien ne prouve que tu boot sur un user qui utilise Bash ou même que ce dernier est installé sur la machine. En prime ca ne s'applique qu'a l'utilisateur pour lequel la modification du bashrc a été faite (tu me dira qu'on peut toujours la reporté dans /etc/bashrc).
    Pour lancer un script au démarrage de la bécanne le mieu est de faire un script de service (selon les système c'est généralement dans /etc/init.d/...). Ca permet de contrôler quand il sera lancer (dépendance inter-service), de loguer son exécution dans syslog, de le relancer facilement, etc...
    Et ca c'est vraiment au démarrage, pas besoin de loguer un utilisateur dont le shell par défaut est bash.

  6. #6
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2007
    Messages
    365
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2007
    Messages : 365
    Par défaut
    Bonjour ,

    En faite lorsque j'avais installé Memcached par le fichier de format .tar.gz j'ai vu qu'il y avait une série de messages contenant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "Werror" "-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached-daemon.o"
    .

    Comment peut on utiliser /etc/init.d pour pouvoir lancer un script au démarrage du système ? Car dans un premier temps je voudrais faire démarrer Memcached en lui allouant une quantité de mémoire maximum et dans un deuxième temps charger les données dans Memcached depuis une base de données externe .

    Cordialement .

  7. #7
    Membre émérite Avatar de ctxnop
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2007
    Messages
    858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Morbihan (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2007
    Messages : 858
    Par défaut
    Werror est une option de gcc qui permet de traiter les warnings en tant qu'erreur (être plus strict sur la qualité du code donc).
    Il ne s'agit donc pas d'une erreur. Quand gcc trouve une erreur il dit quelque chose comme :
    main.c: (.text+0x17f): undefined reference to `debug_init'
    Donc [nom du fichier] : ([position dans le fichier]) : Message d'erreur

    Quand au script de démarrage, bah tu copie un autre script, le plus simple possible, pour te servir de base. Dans le Start tu colle les commandes que tu veux exécuter. Tant qu'a faire ca serais bien de remplir le stop et le restart histoire d'en faire un vrai service.
    Une fois le script terminé tu l'ajoute a la liste des service (après le démarrage de la BDD si elle est sur le même ordi, vu que tu en as besoin)
    Je ne peux pas vraiment être plus précis sans savoir sur quel type de système init tu es.

  8. #8
    Membre éclairé
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2007
    Messages
    365
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2007
    Messages : 365
    Par défaut
    Comment puis-je savoir le type de système init que j'ai sur le serveur ?

  9. #9
    Membre émérite Avatar de ctxnop
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2007
    Messages
    858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Morbihan (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2007
    Messages : 858
    Par défaut
    Bah tu va voir xD
    Vu que t'es sur Red Hat (j'ai pas utilisé depuis fort fort longtemps donc ce que je vais te raconté est de mémoire, et personnellement je ne fais pas confiance une seule seconde a ma mémoire, il lui arrive de pas être trop a coté de la plaque mais prendre ce qu'elle raconte pour argent comptant c'est du suicide) :
    dans /etc/ tu dois avoir plusieurs dossiers rc# (rc0, rc1, rc2, ... rcS), il y en as un qui contient des scripts (c'est peut-être bien /etc/init.d) les autres contiennent des liens symboliques vers ces scripts (donc regarde la destination des liens pour trouver le répertoire où mettre ton script).
    Donc là où ya les scripts tu colle le tiens en te basant sur un des autres.
    Puis tu fais un lien symbolique dans le répertoire rc2.
    Si je me plante pas, rc# représente le niveau de boot. Sous linux il y a 7 niveau de boot, de 0 (arret de la machine) à 6 (redémarrage).
    le niveau 1 c'est un boot d'administration et les autres sont des niveaux "utilisateur". De mémoire le boot classique et normal c'est le 2, au pire des cas, ton script à besoin que ta bdd soit démarré et celle-ci possède son propre script, donc partout où tu trouve un lien pour la bdd tu met le tiens aussi.
    Tu verra que les liens sont nommé en commencant par un S ou un K. S = Start, K = Kill, donc si tu met SMonscript c'est la fonction start du script qui est appellée dans le niveau de boot, si tu met K c'est la fonction stop.
    Tu verra aussi que les liens sont numéroté. En fait le processus les lance dans l'ordre, donc tu nomme ton lien pour qu'il arrive après la base de données.
    Avec un peu de google par dessus tu devrais combler les problèmes de ma mémoire.

  10. #10
    Membre actif
    Avatar de debianhunter
    Profil pro
    Inscrit en
    Décembre 2009
    Messages
    63
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2009
    Messages : 63
    Par défaut
    RedHat utilise un demarrage type System V, avec comme le dit ctxnop, un systeme de runlevel. Il faut ecrire un script a la mano dans /etc/init.d. Ce script doit contenir:
    • Un commentaire pour chkconfig qui indique les runlevels dans lequel le service doit etre demarre, l'ordre de start, et l'ordre de stop

    • Un switch sur $1 qui prend en compte les parametres start et stop (au moins) et eventuellement restart/reload

    Une fois ce script ecrit, il faut lancer chkconfig qui va creer des liens symboliques dans les rc# qui vont bien.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    49
    50
    51
    52
    53
    54
    55
    % cd /etc/init.d
    % cat > trial 
    #!/bin/bash
    #
    # chkconfig: 2345 26 74
    # description: starts some stuff at system start up
    # processname: yoyo
    # config: /etc/yoyo.conf
    
    # Source function library.
    . /etc/init.d/functions
    
    start() {
            echo "Starting up daemon: "
    }
    
    stop() {
            echo "Shutting down daemon: "
    }
    
    restart() {
            stop
            start
    }
    
    # See how we were called.
    case "$1" in
      start)
            start
            ;;
      stop)
            stop
            ;;
      restart|reload)
            restart
            ;;
      *)
            echo "Usage: trial {start|stop|restart|reload}"
            exit 1
    esac
    
    % chmod u+x trial
    % ls ../rc*.d/*trial
    ls: ../rc*.d/*trial: No such file or directory
    % /sbin/chkconfig --add trial
    %  ls -l ../rc*.d/*trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc0.d/K74trial -> ../init.d/trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc1.d/K74trial -> ../init.d/trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc2.d/S26trial -> ../init.d/trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc3.d/S26trial -> ../init.d/trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc4.d/S26trial -> ../init.d/trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc5.d/S26trial -> ../init.d/trial
    lrwxrwxrwx    1 root     root           15 Aug  5 14:00 ../rc6.d/K74trial -> ../init.d/trial
    %
    On voit bien que chkconfig a cree des liens symboliques vers notre script trial. Le nom de ces liens indique a init ce qu'il doit faire:
    • Si le nom du symlink commence par un S, il doit lancer le script avec le parametre start

    • Si le nom du symlink commence par un K, il doit lancer le script avec le parametre stop

    Enfin, le nombre qui suit le S ou le K donne l'ordre dans lequel le script doit etre lance par rapport aux autres scripts contenus dans le meme runlevel.

    Ici, on constate que chkconfig a bien fait son boulot: le nom du symlink ne commence avec S que dans les runlevels 2345 et il est en position 26. Pour les autres runlevels (016), il commence bien par K et est en position 74.

    Un peu de lecture, et ca plus specifiquement pour RedHat.

  11. #11
    Membre émérite Avatar de ctxnop
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juillet 2007
    Messages
    858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Morbihan (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2007
    Messages : 858
    Par défaut
    Ah cool, quelqu'un qui connait vraiment !
    Bon, ma mémoire était pas si loin mais c'était clairement imparfait.
    Etant sous Gentoo je connais très mal ce système.

Discussions similaires

  1. installation sysprep sur des configurations différentes
    Par boss_gama dans le forum Windows Serveur
    Réponses: 3
    Dernier message: 19/06/2007, 23h33
  2. [Débutant] Installation de Mechanize via CPAN
    Par ghohm dans le forum Modules
    Réponses: 21
    Dernier message: 14/06/2007, 16h43
  3. installer jeux java via bluetooth sur samsung
    Par bil_home dans le forum Java ME
    Réponses: 7
    Dernier message: 26/02/2007, 14h55
  4. Installer un noyau via un ".deb"
    Par byloute dans le forum Administration système
    Réponses: 2
    Dernier message: 07/02/2007, 09h53
  5. [CF][VB.NET/PPC] Comment installer un .cab via un autre .cab ?
    Par borgfabr dans le forum Windows Mobile
    Réponses: 8
    Dernier message: 04/05/2005, 12h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo