v8js Ubuntu 16
From DreamFactory
This module allows you to execute server-side JavaScript, using the V8 engine.
- Install Dependencies
-
$ sudo apt-get install build-essential git php7.1-dev php-pear
-
- Copy the V8 library
-
$ git clone https://github.com/dreamfactorysoftware/v8-compiled.git
-
$ sudo mkdir /opt/v8
-
$ sudo cp -R v8-compiled/ubuntu_16.04/PHP7.1/* /opt/v8/
-
- Build and Install v8js from source
-
$ git clone https://github.com/phpv8/v8js.git
-
$ cd v8js
-
$ git checkout 1.3.6
-
$ git pull origin 1.3.6
-
$ phpize
-
$ ./configure --with-v8js=/opt/v8
-
$ make
-
$ sudo make install
-
$ sudo sh -c 'echo "extension=v8js.so" > /etc/php/7.1/mods-available/v8js.ini'
-
$ sudo phpenmod v8js
-
- Restart Apache or Nginx and PHP-FPM