In this article i will show you how to install HHVM on lubuntu 17.10, some of you may not know about HHVM, what is HHVM? HHVM is like virtual machine or execution engine for php and hack programming language.
HHVM is the secret behind facebook scaling their application which is in php language, so if you are doubting php language in terms of performance and scaling then HHVM is your answer, using HHVM you can scale your php application like a boss!
Another good thing is that HHVM runs very well in lubuntu and ubuntu in general, but before we get our hands dirty with HHVM first we need to install it on our lubuntu. HHVM is available as part of lubuntu/ubuntu repository, so it's pretty easy to install.
How to install HHVM on Lubuntu 17.10
- open command line
- run update command
sudo apt-get update
sudo apt-get install hhvm
Alright, to try out HHVM let's do a hello world program with php that runs on HHVM, first create a php file named hello.php like this:
<?php
echo "Hello World!";
And then run HHVM as server from the same directory as the hello.php, like this:
hhvm -m server -p 8989
Now you can open web browser and go to url http://localhost:8989/hello.php
*note: you can use whatever port you wish to use, port 8989 is just an example.
This is just a basic usage of HHVM, maybe in the future article i will show you more example on how to use HHVM, see you next time!
*note: you can use whatever port you wish to use, port 8989 is just an example.
This is just a basic usage of HHVM, maybe in the future article i will show you more example on how to use HHVM, see you next time!
No comments:
Post a Comment