Welcome to Centmin Mod Community
Become a Member

installing HHVM on CentOS 6.5

Discussion in 'Feature Requests & Suggestions' started by palPalani, Jun 2, 2014.

  1. palPalani

    palPalani Member

    30
    12
    8
    May 30, 2014
    Chennai, IN
    Ratings:
    +20
    Local Time:
    8:29 AM
    Nginx 1.7
    MariaDB 5.5
    I want to try HHVM, but not able to install. There was some dependency (ImageMagic and etc.) error and i don't know, how to resolve them.


    Is there any proper guide available?
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. Matt

    Matt Well-Known Member

    929
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    2:59 AM
    1.5.15
    MariaDB 10.2
    I've only been able to get HHVM working on Debian / Ubuntu so far, using the pre-built packages. I was running it on Ubuntu with 8GB RAM, and after 6 hours, it ate ALL the RAM on the server, forked, and died. Swapped to php-fpm and no issues since.
     
  4. palPalani

    palPalani Member

    30
    12
    8
    May 30, 2014
    Chennai, IN
    Ratings:
    +20
    Local Time:
    8:29 AM
    Nginx 1.7
    MariaDB 5.5
    Yes, I saw todo list page.

    There was lot of talk and progress going on with HHVM, even PHP core team discussing about it https://wiki.php.net/phpng.

    Just i want to try.

    Thanks.
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. hungphutho

    hungphutho Member

    55
    35
    18
    Jun 2, 2014
    Ratings:
    +35
    Local Time:
    9:59 AM
    1.7.2
    Percona 5.6
  7. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah it's a known issue with HHVM, in some cases it can eat all your memory. HHVM isn't prime time ready for all usage cases yet heh.
     
  8. hungphutho

    hungphutho Member

    55
    35
    18
    Jun 2, 2014
    Ratings:
    +35
    Local Time:
    9:59 AM
    1.7.2
    Percona 5.6
    me the testing successful in the centminmod 08 / centos 7 . working :)
    [​IMG]
     
  9. dev_to

    dev_to New Member

    3
    4
    3
    Sep 22, 2014
    Ratings:
    +4
    Local Time:
    3:59 AM
    With HHVM 3.3.0 released which includes LTS are there any news about the integration/usage with centminmod? If setup wouldn't be that complicated on CentOS or if someone could provide working setup/build instructions for CentOS 6.5 i'd love to replace php-fpm myself. Performing tests on other machines and setups i could see a performance boost of 3x. Looking into that should be a lot more worth than testing PHP NG for example. HHVM is production ready (but might not be suited for every custom applciation).
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Most folks including me had run into compile issues needing work arounds for HHVM on CentOS 6.x as the HHVM folks are doing all their official testing on Ubuntu/Debian. CentOS 7.x is easier for HHVM but CentOS 7.x has it's own new learning to do due to changes from CentOS 6.x.

    So for Centmin Mod it's just still in testing for me considering 99% of users would be using CentOS 6.x

    CentOS 7 + Facebook HHVM install at How to build HHVM 3.3 on CentOS 7.0 | _ck_ says... but you're on your own for troubleshooting and note install compile time takes >2+ hours for HHVM so run it via screen just in case your SSH connection times out Who uses Screen for linux ? | Centmin Mod Community

    I assume CK meant 1.5-2GB of memory minimum

    Also be sure to keep watching HHVM issues tracker for bugs Issues · facebook/hhvm · GitHub.

     
    Last edited: Sep 22, 2014
  11. dev_to

    dev_to New Member

    3
    4
    3
    Sep 22, 2014
    Ratings:
    +4
    Local Time:
    3:59 AM
    Thanks! I'll try to build and use it in combination with the .08 beta.

    For people finding this thread who would like to test HHVM (3.2.0) on CentOS 6.5 i'll append a "quick and dirty" way. Please be aware that this is no production ready installation instruction and i would be glad if we could write up something together to be able to have a setup process which can be used by everyone who would like to run HHVM in a production environment. I'm to inexperienced to get this done myself.

    Please check:
    and Framework test coverage before considering to use HHVM.

    Usage:
    1. Install EPEL repository
    Code:
    cd /tmp
    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
    sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
    2. Install HHVM
    Code:
    cd /etc/yum.repos.d
    sudo wget http://www.hop5.in/yum/el6/hop5.repo
    yum clean all
    yum install hhvm
    Enter "hhvm --version" to see the installed version.

    3. Follow the instructions to install centminmod outlined here:
    Centmin Mod FAQ - Menu based Nginx installer

    4. Create a HHVM config and edit your vhost config
    Code:
    nano /usr/local/nginx/conf/hhvm.conf
    
    >>INSERT>>
    location ~ \.(hh|php)$ {
        fastcgi_keep_conn on;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
    <<<<
    
    vhostconf
    
    >>EDIT/INSERT>>
    #include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/hhvm.conf;
    <<<<
    5. Stop php-fpm
    Code:
    service php-fpm stop
    chkconfig php-fpm off
    6. Start HHVM
    Code:
    hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
    7. Restart nginx
    Code:
    ngxrestart
    8. Check if everything is working
    Code:
    cd /usr/local/nginx/html
    nano index.php
    
    >>INSERT>>
    <?php phpinfo();
    <<<<
    Open *your-server-ip*.tld/index.php within your browser and you should see "HipHop".
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  13. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    9:59 PM
    latest
    10
    I got HHVM working using centos 6.5 and CM beta 2 using the directions above. Then installed WordPress and it worked well except a few tweaks need to be made. When uploading a new plugin/theme it says to put in the FTP info regardless that I have the files
    chown nginx:nginx

    Is their a fix for this? Searching Google returned nothing. Anyone successfully installed WP w/ centmin mod yet?
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice

    maybe you have same issue as @Andy did at Install - Wordpress FTP access

    see How to Update WordPress Automatically Without Using FTP [Quicktip]

    so edit wp-config.php and add to very bottom of other lines

    Code:
    define('FS_METHOD','direct');
    While you're testing maybe give PHP 7.0.0-dev a try too - it's already natively supported in centmin.sh menu option 5 for PHP upgrades at PHP-FPM - PHP 5.7 (PHPNG) support testing for Centmin Mod betas | Centmin Mod Community - of course not all PHP extensions are supported
     
  15. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    9:59 PM
    latest
    10
    That did work George! Thank You! However, testing HHVM + WordPress + PageSpeed crashed nginx so PageSpeed does not work with HHVM - But it is MUCH faster when using HHVM. It's incredibly fast.
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  17. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:59 AM
    Mainline
    10.2
  18. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Nice seems the lead is going back and forth between HHVM and PHP 7. However, PHP 7 much easier to install - which why Centmin Mod .08 betas already have support for PHP7.

    Remember though PHP 7 is pre-alpha while HHVM is production in use heh and still HHVM has memory leaks from time to time still

    interesting tidbit in PHP master commit history = prepare for 7.0.0alpha1 - it's coming :D
    Code:
    +11 Jun 2015, PHP 7.0.0 Alpha 1
     
    Last edited: Jun 10, 2015
  19. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:59 AM
    Mainline
    10.2
    I have it on someone's VPS installed using PHP 7 and WP site, now for some reason all pages gets blank after he did something I don't know.

    I assume it's PHP 7 bug, so I downgraded to PHP 5.6 and problem solve right away.
    So not really ready for production site :D
     
  20. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:59 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    for blank pages, tried restarting nginx and php7 ?

    Also from the lockdown article - be aware they sort of changed the benchmarking method by actually altering the code in web PHP apps to better utilise HHVM..