Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2002
    Posts
    211

    Modifications to a CPanel server

    Can I add modules like mcrypt to a cpanel server without creating havoc on it? TIA
    Last edited by iKHost; 10-29-2002 at 09:49 PM.

  2. #2
    Join Date
    Aug 2001
    Location
    United kingdom
    Posts
    1,003
    Re-compiling PHP with mcrypt is fine on a CPanel server, I've done it several times on several servers.

    Alan
    Alan Ho
    Former Systems Administrator

  3. #3
    Join Date
    Oct 2002
    Posts
    211
    thanks

  4. #4
    how would u do it ?
    FastRack Hosting - HTTP://WWW.FASTRACK-HOST.COM
    [email protected]

  5. #5
    Join Date
    Aug 2001
    Location
    United kingdom
    Posts
    1,003
    Originally posted by Halo Service
    how would u do it ?
    You need root access to the server.

    SSH into the server.

    Run the following file: /scripts/easyapache

    Once the script runs, it'll ask you to choose 1 or 2, basic or advance... choose advance mode.

    Then make sure the following modules are selected:

    * User bandwidth leech protection
    * Bytes logging Module
    * Frontpage Module
    * Raise HARD_SERVER_LIMIT
    * Rewrite Module
    * SSL Module
    * suEXEC Module

    Also, go into the following section "PHP Modules -->" and choose mcrypt or whatever other module you require.

    Exit the config screen, and browse the WHT forums while you're waiting for it to re-compile.

    I hope this helps.

    Alan
    Alan Ho
    Former Systems Administrator

  6. #6
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    User bandwidth leech protection
    If you enable that module you can't view pages using http://maindomain.com/~otheruser/ thats how shared ssl works.. you might want to skip that option Then again you might not.

  7. #7
    Join Date
    May 2001
    Location
    Indiana, Florida
    Posts
    534
    Originally posted by Dotcomsnz


    If you enable that module you can't view pages using http://maindomain.com/~otheruser/ thats how shared ssl works.. you might want to skip that option Then again you might not.
    yes, but http://server_hostname.mydomain.com/~user will still work.

  8. #8
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    https://secure.sharedssl.com/~user/ will not though for resellers and a cert setup on a domain rather than server :-)

    Do or don't install that module, depending upon your needs

  9. #9
    Originally posted by Halo Service
    how would u do it ?
    We use custom script, made from easyapache configs, but much better.

    1. Upload all latest builds of software
    2. run the script:

    #!/bin/sh

    TOPLEVEL=`pwd`
    cd $TOPLEVEL
    echo "Untarring apache...."
    tar xfz apache_1.3.27.tar.gz
    cd apache_1.3.27
    patch -p1 < ../suexec.patch
    ./configure --enable-shared=max

    #Frontpage Module

    cd $TOPLEVEL
    rm -f apache_1.3.27/src/modules/extra/mod_frontpage.c
    cd apache_1.3.27
    patch -p1 < ../fp-patch-apache_1.3.27-5.0
    cd $TOPLEVEL

    #Raise HARD_SERVER_LIMIT

    cd $TOPLEVEL
    cd apache_1.3.27
    patch -p1 < ../limit.patch
    cd $TOPLEVEL

    #SSL Module

    cd $TOPLEVEL
    echo "Untarring modssl...."
    tar xfz mod_ssl-2.8.11-1.3.27.tar.gz
    cd mod_ssl-2.8.11-1.3.27
    ./configure --with-apache=../apache_1.3.27 --with-ssl=/usr --enable-module=rewrite --enable-shared=rewrite
    cd $TOPLEVEL
    cd apache_1.3.27
    SSL_BASE=/usr \
    ./configure --enable-module=ssl --enable-module=rewrite --enable-shared=rewrite
    make
    make install

    #Php Module

    PHPVER=4.2.3
    MCRYPTVER=2.5.3

    cd $TOPLEVEL

    ###### LibMCRYPT #####

    echo -n "Untarring mcrypt"
    tar xfz libmcrypt-$MCRYPTVER.tar.gz
    echo "Done"
    cd libmcrypt-$MCRYPTVER
    ./configure --prefix=/usr --disable-posix-threads
    rm -f /usr/lib/libmcrypt.*
    rm -rf /usr/local/lib/libmcrypt
    rm -rf /usr/lib/libmcrypt
    make
    make install
    cd $TOPLEVEL

    ##### CURL #######

    echo -n "Untarring curl......"
    tar xfz curl-7.10.1.tar.gz
    echo "Done"
    cd curl-7.10.1
    ./configure --prefix=/usr --without-ssl
    make
    make install
    cd $TOPLEVEL

    ##### Flash ####

    echo -n "Untarring flash......"
    tar -x -z -f flash.tar.gz -C /usr/local
    (cd /usr/local/flash; ln -s . lib)
    (cd /usr/local/flash; ln -s . include)
    echo "Done"
    cd $TOPLEVEL

    ## Ming ##

    echo -n "Untarring ming..."
    tar xfz ming-0.2a.tgz
    echo "Done"
    cd ming-0.2a
    make
    make install
    cd $TOPLEVEL

    ##### Imap #####

    echo -n "Untarring imap...."
    /scripts/ensurerpm imap-devel
    /scripts/ensurerpm imap-uw
    if [ -e "/usr/local/libexec" ] ; then
    cp -f /usr/local/cpanel/3rdparty/bin/imapd /usr/local/libexec
    fi
    if [ -e "/usr/lib/libc-client.a" ]; then
    (cd /usr/lib;ln -s libc-client.a c-client.a)
    fi
    if [ "`grep openssl /usr/lib/libc-client.a 2>/dev/null`" = "" ]; then
    export WITHIMAP="--with-imap"
    if [ -e /etc/krb5.conf ]; then
    WITHIMAP="$WITHIMAP --with-kerberos"
    fi
    else
    export WITHIMAP="--with-imap --with-imap-ssl"
    if [ -e /etc/krb5.conf ]; then
    WITHIMAP="$WITHIMAP --with-kerberos"
    fi
    fi
    cd $TOPLEVEL

    ### mod_logbytes ###

    cd mod_log_bytes
    make
    make install
    cd $TOPLEVEL

    #### libiconv ####

    tar xfz libiconv-1.8.tar.gz
    cd libiconv-1.8
    ./configure --prefix=/usr/local
    make
    make install
    cd $TOPLEVEL

    #### Expat ####

    echo -n "Untarring expat..."
    tar xfz expat-1.95.2.tar.gz
    echo "Done"
    cd expat-1.95.2
    ./configure --prefix=/usr
    make
    make install
    cd $TOPLEVEL

    echo -n "Untarring Sablot......"
    tar xfz Sablot-0.96.tar.gz
    echo "Done"
    cd Sablot-0.96
    patch -p1 < ../Sablot-0.96.1.patch
    ./configure --prefix=/usr
    make
    make install

    cd $TOPLEVEL
    tar xfz pdflib-4.0.3.tar.gz
    cd pdflib-4.0.3
    ./configure
    make
    make install

    cd $TOPLEVEL
    tar xfz zlib-1.1.4.tar.gz
    cd zlib-1.1.4
    ./configure --shared
    make
    make install

    cd $TOPLEVEL
    tar xfz libpng-1.2.5.tar.gz
    cd libpng-1.2.5
    cp scripts/makefile.linux Makefile
    make
    make install

    cd $TOPLEVEL
    tar xfz t1lib-1.3.1.tar.gz
    cd t1lib-1.3.1
    ./configure
    make without_doc
    make install

    cd $TOPLEVEL
    tar -pxzf freetype-2.0.8.tar.gz
    cd freetype-2.0.8
    make setup
    make
    make install


    cd $TOPLEVEL
    echo -n "Untarring gd......"
    tar xfz gd-2.0.1.tar.gz
    echo "Done"
    cd gd-2.0.1
    make
    make install
    make install


    cd $TOPLEVEL
    tar xfzv mod_gzip.tar.gz
    cd mod_gzip
    make
    make install

    cd $TOPLEVEL
    tar xfz php-4.2.3.tar.gz
    echo "Done"
    cd php-4.2.3
    rm -f config.cache
    echo -n "Untarring bcmath ext...."
    tar xfz ../number4.tar.gz
    echo "Done"
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-pdflib --with-pear --with-gettext --enable-calendar --with-curl --with-iconv=/usr/local/lib --with-swf=/usr/local/flash --enable-ftp --with-gd --enable-gd-native-tt --enable-gd-imgstrttf --with-gdbm=/usr/include --with-jpeg-dir=/usr/local/lib --with-xpm-dir=/usr/X11R6 --with-png-dir=../libpng-1.2.5 --with-mcrypt --with-ming=../ming-0.2a --enable-magic-quotes --with-mysql --enable-xslt --with-xslt-sablot --enable-sablot-errors-descriptive --enable-safe-mode --enable-track-vars --enable-memory-limit=yes --enable-short-tags --enable-mailparse --with-ttf --with-t1lib --with-expat --enable-versioning --with-zlib-dir=/usr --enable-dbase --enable-mailparse --with-freetype-dir=/usr/local/include/freetype2/freetype
    echo "#undef COMPILE_DL_ZLIB" >> main/php_config.h
    echo "#define HAVE_SENDMAIL 1" >> main/php_config.h
    make
    make install
    ./configure --prefix=/usr --with-xml --with-pdflib --with-pear --with-gettext --enable-calendar --with-curl --with-iconv=/usr/local/lib --with-swf=/usr/local/flash --enable-ftp --with-gd --enable-gd-native-tt --enable-gd-imgstrttf --with-gdbm=/usr/include --with-jpeg-dir=/usr/local/lib --with-xpm-dir=/usr/X11R6 --with-png-dir=../libpng-1.2.5 --with-mcrypt --with-ming=../ming-0.2a --enable-magic-quotes --with-mysql --enable-xslt --with-xslt-sablot --enable-sablot-errors-descriptive --enable-safe-mode --enable-track-vars --enable-memory-limit=yes --enable-short-tags --enable-mailparse --with-ttf --with-t1lib --with-expat --enable-versioning --with-zlib-dir=/usr --enable-dbase --enable-mailparse --with-freetype-dir=/usr/local/include/freetype2/freetype
    echo "#undef COMPILE_DL_ZLIB" >> main/php_config.h
    echo "#define HAVE_SENDMAIL 1" >> main/php_config.h
    make
    make install
    Alex

  10. #10
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    Nice post

  11. #11
    Originally posted by Dotcomsnz
    Nice post
    small tip: split this script into 3 parts:

    a) apache install
    b) modules install
    c) php install

    and first time run it manually line_per_line to track errors

    then

    tar xfz ZendOptimizer-2.0.2-Linux_glibc21-i386.tar.gz
    cd ZendOptimizer-2.0.2-Linux_glibc21-i386
    ./install.sh
    cd..

    rm -rf apache_1.3.27
    rm -rf curl-7.10.1
    rm -rf expat-1.95.5
    rm -rf freetype-2.0.8
    rm -rf gd-2.0.1
    rm -rf libmcrypt-2.5.3
    rm -rf ming-0.2a
    rm -rf mod_gzip
    rm -rf mod_ssl-2.8.11-1.3.27
    rm -rf php-4.2.3
    rm -rf Sablot-0.96
    rm -rf libiconv-1.8
    rm -rf zlib-1.1.4
    rm -rf pdflib-4.0.3
    rm -rf t1lib-1.3.1
    rm -rf libpng-1.2.5
    rm -rf mod_gzip
    ----------------------------
    BTW, try GD 2.0.1 with GIF support ( http://www.rime.com.au/gd/ )

    use it on your own risk
    Alex

  12. #12
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    Yeah but the idea is all there.. don't copy it exactly, modify people

    Still a nice post ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •