Debian Wheezy install Nginx + HHVM

Source: Internet
Author: User
Tags hhvm

Debian Wheezy install Nginx + HHVM

You can use a Chinese source for installation. If not, refer to the github wiki page.
Https://github.com/facebook/hhvm/wiki/Mirror

Take the Debian Wheezy installation environment as an example.

1. modify the software source

123 echo "deb http://mirrors.163.com/debian/ wheezy main non-free contrib">/etc/apt/sources. list
Echo "deb http://mirrors.163.com/debian-security/ wheezy/updates main non-free contrib">/etc/apt/sources. list
Echo "deb http://mirrors.hypo.cn/hhvm/ wheezy main">/etc/apt/sources. list

2. Import apt key
Wget
Cat hhvm. gpg. key | apt-key add-

 

3. Install nginx and hhvm
123 apt-get update
Apt-get install nginx hhvm
/Etc/init. d/hhvm start

Hhvm listens to port 9000 by default.

4. Configure hhvm to connect to nginx in fastcgi mode, edit/etc/nginx/site-enable/default, and cancel the following comments.

Location ~ \. Php $ {
Fastcgi_split_path_info ^ (. + \. php) (/. +) $;
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Include fastcgi_params;
}

5. Create a test page and restart nginx
Echo "<? Php phpinfo ();?> ">/Usr/share/nginx/www/test. php
/Etc/init. d/nginx restart

6. Access the http: // IP/test. php page. If "HipHop" is displayed, it is successful.

The performance of hhvm is comparable to that of php5.3/5.4/5.5. The stability has become better and better after 3.4.x, and the latest version is v3.5.
The advantage of using http software source installation is that you can easily and timely follow the official upgrade. Currently, the CentOS system does not support well because many software packages are too old. We recommend that you use the debian/Ubuntu series to try hhvm.

Hhvm supports common php extensions, such as php-gd, php-mbstring, and php-mysql. A considerable number of php programs can run normally in hhvm without modification, before using it, determine which extensions are used. This is a common step for php to migrate to hhvm. See https://github.com/facebook/hhvm/wiki/Extensions

Deployment of Nginx + MySQL + PHP in CentOS 6.2

Build a WEB server using Nginx

Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5

Performance Tuning for Nginx in CentOS 6.3

Configure Nginx to load the ngx_pagespeed module in CentOS 6.3

Install and configure Nginx + Pcre + php-fpm in CentOS 6.4

Nginx installation and configuration instructions

Nginx log filtering using ngx_log_if does not record specific logs

HHVM details: click here
HHVM: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.