ISPConfig 3.1 + Metronome XMPP on CentOS 7.2 (based on the Perfect Server tutorial)

Discussion in 'Installation/Configuration' started by dragosl, Oct 1, 2016.

  1. dragosl

    dragosl New Member

    I've followed the tutorial https://www.howtoforge.com/tutorial...l-php-pureftpd-postfix-dovecot-and-ispconfig/ and I'm stuck at getting ISPConfig 3.1 to configure Metronome XMPP on CentOS 7.2 (the XMPP instructions in the ISPConfig 3.1 Manual are mostly for Debian so I adapted a bit for CentOS).

    I did the following:
    1. yum install lua* prosody libidn libidn-devel libidn2 libidn2-devel
    2. adduser -M -s /sbin/nologin -c 'Metronome' metronome
    3. cd /opt; git clone https://github.com/maranda/metronome.git metronome; cd ./metronome; ./configure # results below
    [root@ares metronome]# ./configure
    Lua interpreter found: /usr/bin/lua...
    Looking for Lua... Checking Lua includes... lua.h found in /usr/include/lua.h
    Writing configuration...

    Installation prefix: /usr/local
    Metronome configuration directory: /usr/local/etc/metronome
    Using Lua from: /usr

    Done. You can now run 'make' to build.​
    4. make; make install # results below
    [root@ares metronome]# make
    sed 's|^#!\/usr\/bin\/env lua$|#!\/usr\/bin\/env lua|' plugins/muc_log_http/generate_log > generate_log.install
    sed "s|^#!\/usr\/bin\/env lua$|#!\/usr\/bin\/env lua|; \
    s|^CFG_SOURCEDIR=.*;$|CFG_SOURCEDIR='/usr/local/lib/metronome';|; \
    s|^CFG_CONFIGDIR=.*;$|CFG_CONFIGDIR='/usr/local/etc/metronome';|; \
    s|^CFG_DATADIR=.*;$|CFG_DATADIR='/usr/local/var/lib/metronome';|; \
    s|^CFG_PLUGINDIR=.*;$|CFG_PLUGINDIR='/usr/local/lib/metronome/modules/';|;" < metronome > metronome.install
    sed "s|^#!\/usr\/bin\/env lua$|#!\/usr\/bin\/env lua|; \
    s|^CFG_SOURCEDIR=.*;$|CFG_SOURCEDIR='/usr/local/lib/metronome';|; \
    s|^CFG_CONFIGDIR=.*;$|CFG_CONFIGDIR='/usr/local/etc/metronome';|; \
    s|^CFG_DATADIR=.*;$|CFG_DATADIR='/usr/local/var/lib/metronome';|; \
    s|^CFG_PLUGINDIR=.*;$|CFG_PLUGINDIR='/usr/local/lib/metronome/modules/';|;" < metronomectl > metronomectl.install
    sed 's|certs/|/usr/local/etc/metronome/certs/|' metronome.cfg.lua.dist > metronome.cfg.lua.install
    test -f metronome.release && \
    cp metronome.release metronome.version || true
    make -C util-src install
    make[1]: Entering directory `/opt/metronome/util-src'
    gcc -fPIC -Wall -I/usr/include -c -o encodings.o encodings.c
    MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
    gcc -o encodings.so encodings.o -shared -lidn
    gcc -fPIC -Wall -I/usr/include -c -o hashes.o hashes.c
    MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
    gcc -o hashes.so hashes.o -shared -lcrypto
    gcc -fPIC -Wall -I/usr/include -c -o pposix.o pposix.c
    pposix.c: In function ‘lc_fallocate’:
    pposix.c:679:2: warning: #warning Only using posix_fallocate() fallback. [-Wcpp]
    #warning Only using posix_fallocate() fallback.
    ^
    pposix.c:680:2: warning: #warning Linux fallocate() is strongly recommended if available: recompile with -D_GNU_SOURCE [-Wcpp]
    #warning Linux fallocate() is strongly recommended if available: recompile with -D_GNU_SOURCE
    ^
    pposix.c:681:2: warning: #warning Note that posix_fallocate() will still be used on filesystems that dont support fallocate() [-Wcpp]
    #warning Note that posix_fallocate() will still be used on filesystems that dont support fallocate()
    ^
    MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
    gcc -o pposix.so pposix.o -shared
    gcc -fPIC -Wall -I/usr/include -c -o signal.o signal.c
    MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
    gcc -o signal.so signal.o -shared
    install *.so ../util/
    rm pposix.o signal.o
    make[1]: Leaving directory `/opt/metronome/util-src'
    make -C certs localhost.cnf
    make[1]: Entering directory `/opt/metronome/certs'
    sed 's,example\.com,localhost,g' openssl.cnf > localhost.cnf
    make[1]: Leaving directory `/opt/metronome/certs'
    make -C certs localhost.key
    make[1]: Entering directory `/opt/metronome/certs'
    openssl genrsa 4096 > localhost.key
    Generating RSA private key, 4096 bit long modulus
    .......................................++
    .........................................................++
    e is 65537 (0x10001)
    make[1]: Leaving directory `/opt/metronome/certs'
    make -C certs localhost.cert
    make[1]: Entering directory `/opt/metronome/certs'
    openssl req -new -x509 -nodes -key localhost.key -days 1825 \
    -sha1 -out localhost.cert -utf8 -config localhost.cnf
    make[1]: Leaving directory `/opt/metronome/certs'
    [root@ares metronome]# make install
    install -d /usr/local/bin /usr/local/etc/metronome /usr/local/lib/metronome/modules /usr/local/lib/metronome
    install -m750 -d /usr/local/var/lib/metronome
    install -d /usr/local/etc/metronome/certs
    install -d /usr/local/lib/metronome/core /usr/local/lib/metronome/net /usr/local/lib/metronome/util
    install -m755 ./metronome.install /usr/local/bin/metronome
    install -m755 ./metronomectl.install /usr/local/bin/metronomectl
    install -m644 core/* /usr/local/lib/metronome/core
    install -m644 net/*.lua /usr/local/lib/metronome/net
    install -d /usr/local/lib/metronome/net/http
    install -m644 net/http/*.lua /usr/local/lib/metronome/net/http
    install -m644 util/*.lua /usr/local/lib/metronome/util
    install -m644 util/*.so /usr/local/lib/metronome/util
    install -d /usr/local/lib/metronome/util/sasl
    install -m644 util/sasl/* /usr/local/lib/metronome/util/sasl
    umask 0022 && cp -r plugins/* /usr/local/lib/metronome/modules
    install -m755 ./generate_log.install /usr/local/lib/metronome/modules/muc_log_http/generate_log
    install -m644 certs/* /usr/local/etc/metronome/certs
    test -e /usr/local/etc/metronome/metronome.cfg.lua || install -m644 metronome.cfg.lua.install /usr/local/etc/metronome/metronome.cfg.lua
    test -e metronome.version && install metronome.version /usr/local/lib/metronome/metronome.version || true
    make install -C util-src
    make[1]: Entering directory `/opt/metronome/util-src'
    install *.so ../util/
    make[1]: Leaving directory `/opt/metronome/util-src'​
    5. install ISPConfig 3.1 - at the XMPP part it detects Metronome XMPP but throws some errors:
    Configuring Mailman
    Configuring Dovecot
    Configuring Spamassassin
    Configuring Amavisd
    Configuring Getmail
    Configuring Jailkit
    Configuring Pureftpd
    Configuring BIND
    Configuring Apache
    Configuring vlogger
    [INFO] service OpenVZ not detected
    Configuring Bastille Firewall
    Configuring Metronome XMPP Server
    PHP Warning: unlink(/etc/metronome/metronome.cfg.lua): No such file or directory in /tmp/ispconfig3-stable-3.1-36e7a4c956bfce74d87b264feefc41c659581454/install/lib/installer_base.lib.php on line 1583
    writing new private key to 'localhost.key'
    ..... ### certificate details here
    make: *** No rule to make target `localhost.key'. Stop.
    make: *** No rule to make target `localhost.csr'. Stop.
    make: *** No rule to make target `localhost.cert'. Stop.
    chmod: cannot access ‘/etc/metronome/certs/localhost.key’: No such file or directory
    chown: cannot access ‘/etc/metronome/certs/localhost.key’: No such file or directory
    sh: update-rc.d: command not found
    Failed to restart .service: Unit name .service is not valid.
    Configuring Fail2ban
    .........​
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Metronome support in ISPConfig exists for Debian and Ubuntu only, thats why the perfect server does not cover Metronome. It might be possible to use it on centOS as well, but you will have to ensure that everything is installed in the same paths that are used on Debian and Ubuntu, e.g. that the metronome config Dir is /etc/metronome/
     

Share This Page