Toggle navigation

HHVM Image Guide

Version 3.22.1

Websoft9 HHVM is a pre-configured, ready to run image for running HHVM on Alibaba Cloud.

HHVM (HipHop Virtual Machine) is an open-source virtual machine designed for executing programs written in PHP. HHVM uses a just-in-time compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to.

Application Software Directory
Software default directory: /data/wwwroot/default
Software configuration directory: /etc/httpd/conf.d

HHVM configuration file :/etc/hhvm/server.ini
PHP configuration file: /etc/hhvm/php.ini
The default configuration for HHVM is php.ini for command-line mode and server.ini for server mode (both normally found in /etc/hhvm/ on Linux distros)

Default nginx vhost configuration file: /etc/nginx/sites-available/default
Nginx vhost Configuration directory: /etc/nginx/sites-available
HHVM log files: /var/log/hhvm
Nginx log files: /var/log/nginx

Database data directory: /data/mysql
Database configuration File: /etc/mysql/mysql.conf.d/mysqld.cnf
phpMyAdmin directory:/data/wwwroot/phpMyAdmin-4.7.5-all-languages
There have a soft connection for phpMyAdmin in the directory:/data/wwwroot/default/

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address and you can enter the hhvm information page directly,if there no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、MySQL Database:Default username and password is root/123456
Control Panel URL:http://Internet IP Address/phpmyadmin
2、Linux Server:Username is root,Password is set by youself when buying.
Please Using the Putty for ssh remote and WinSCP for SFTP

Note:You can reset the password of OS through Cloud Console if you have forgotten it


Connect to a Linux instance using Windows OS

This section uses PuTTY as an example. PuTTY can be downloaded here.

You can connect to a Linux instance via PuTTY as follows:

  1. Start Putty.exe.
  2. Enter the public IP address of the instance in Host Name (or IP address).
  3. Use the default port 22.
  4. Select SSH as Connection Type.
  5. Type a session name in Saved Sessions, and then click Save. In later logins, you may directly load the session without re-entering the IP address.
  6. Click Open to connect.
  7. Upon first connection, the following dialog box will be displayed. Click Yes.
  8. As prompted, enter the username and password for the Linux ECS instance. The password will not be displayed on-screen. Press the Enter key to complete connection to the instance.

When you connect your computer to the Linux instance successfully, you can operate the instance from your computer.

Use SFTP you can mange file,upload and download file,configure Server.

  1. Start WinSCP. Login Dialog will appear.
  2. Then select your File protocol(SFTP) on the dialog
  3. Enter your host name to Host name field, username to User name and password to Password like below
  4. You may want to save your session details to a site so you do not need to type them in every time you want to connect. Press Save button and type site name.
  5. When appear the dialog below,please select the “yes”
  6. You can manane Linux file below
  7. WinSCP can integrate the Putty and transfer the log in information to Putty
  8. Now you can use Putty(Not need to log in) from the menu bar of WinSCP

Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”

There are five main steps to deploying a apps in a LAPP environment:

① upload source code -> ② modify the file system user permissions -> ③ configure the domain name (optional) -> ④ increase the site corresponding database (optional) -> ⑤ complete the installation wizard

LAPP environment only deployed a website or multiple sites, there is no domain name corresponding to the deployment of these two cases the details of the operation is slightly different, the following were explained:

You can use the upgrade command like below:

root@iZuf69y4039e4k8cngv65eZ:~# apt upgrade -y

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup and manual local backup in two ways, both of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Coming soon…

Use domain you should complete the following steps:

Step One:Domain resolution

e.g,If you using the AliCloud Domain product,you should log in to your Domain Console Panel

And find the domain name resolution interface,then add an A record to the Internet IP Address of Server from Domain Control Panel.

Step One:modify the vhost file

  1. Using SFTP to edit the /etc/nginx/sites-available/default
  2. Modify the domain related information like below,then save it
    listen 80; 
     index index.html index.htm index.php; 
     charset utf-8; 
     root /data/wwwroot/default; 
  3. Using putty to run the command “service nginx restart”


Nginx http service

~# service nginx start
~# service nginx stop
~# service nginx restart
~# service nginx reload  #Configuration file

MySQL  service

~# service mysql start|stop|restart 


~# systemctl restart|stop|start hhvm

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644,folder 755 ,Permissions Users and groups apache,apache
If there is a file permissions problem, execute the following three commands:

~# chown -R www-data.www-data /data/wwwroot/default
~# find /data/wwwroot/default -type d -exec chmod 755 {} \;
~# find /data/wwwroot/default -type f -exec chmod 644 {} \;