Install SilkJS on Centos 6
The topic for the topic was the situation in which I ended up trying to install SilkJS on OS Centos . Officially, SilkJS can be installed on OSX and Ubuntu (& forks). For OS Centos, the installer is still under development, although a makefile for Centos is included in the package.
So what is SilkJS?
SilkJS is a command processor and a super-fast http-server, which is an add-on for the JavaScript v8 engine developed by Google. It is optimized for running server-side applications, console applications, and network servers. An obvious competitor to a product like NodeJS .
In short, its features:
Installation
All actions are performed as root :
Check the OS version:
Checking the architecture:
Create the src folder and go to it and
Install if subversion and git are not installed
We get a copy of the git repository of the program:
Go to the SilkJS folder
Until now, the installation process is strictly according to the instructions posted on the developer's site.
Open and edit the src / SilkJS / Makefile file (here we use the Vim text editor )
we comment on lines 5 - 12 in which the MAKEFILE variable is defined, in line 3 we set the MAKEFILE variable to Makefile.centos
Next, open Makefile.centos
and add mysql support to line 8 (for some reason it was not available for Centos )
We look at what packages are required for installation
Then install the packages necessary for the program to work.
To install libmemcached-devel you need to disable (if connected) the remi repository :
If PHP uses libmemcached and was installed from the repository remi , you have to reinstall ? Php-pecl-the memcached :
Next, install the libmm package , which is not in the standard yum repositories :
Separately, it must be said about support for MySQL .
I have MariaDB installed on my machine, so install
If MySQL is installed, then you should install the mysql-devel package
This completes the dependency installation process.
Next, go to the ~ / src / SilkJS folder and run compilation
If the installation process completed successfully, you can try starting SilkJS :
We type in the browser
So what is SilkJS?
SilkJS is a command processor and a super-fast http-server, which is an add-on for the JavaScript v8 engine developed by Google. It is optimized for running server-side applications, console applications, and network servers. An obvious competitor to a product like NodeJS .
In short, its features:
- supports server side JavaScript
- perfect for RIA
- provides an “easy” API for accessing the system features of OS Linux and OSX
- implements Ajax requests as RPC
- etc.
Installation
All actions are performed as root :
[bash]# sudo su -
Check the OS version:
[bash]# cat /etc/redhat-release
CentOS release 6.3 (Final)
Checking the architecture:
[bash]# getconf LONG_BIT
64
Create the src folder and go to it and
[bash]# mkdir src
[bash]# cd src
Install if subversion and git are not installed
[bash]# yum install subversion git
We get a copy of the git repository of the program:
[bash]# git clone https://github.com/mschwartz/SilkJS.git SilkJS
Go to the SilkJS folder
[bash]# cd SilkJS
Until now, the installation process is strictly according to the instructions posted on the developer's site.
Open and edit the src / SilkJS / Makefile file (here we use the Vim text editor )
[bash]# vim src/SilkJS/Makefile
we comment on lines 5 - 12 in which the MAKEFILE variable is defined, in line 3 we set the MAKEFILE variable to Makefile.centos
Next, open Makefile.centos
[bash]# vim src/SilkJS/src/Makefile.centos
and add mysql support to line 8 (for some reason it was not available for Centos )
We look at what packages are required for installation
-lmysqlclient -lmm -lgd -lncurses -lssl -lpthread -lsqlite3 -lcurl -lssh2 -lmemcached -lcairo
Then install the packages necessary for the program to work.
[bash]# yum groupinstall "Development Tools"
[bash]# yum install openssl-devel.x86_64 gd-devel.x86_64 ncurses-devel.x86_64 libcurl-devel.x86_64 libssh2-devel.x86_64 cairo-devel.x86_64 sqlite-devel.x86_64 expat-devel.x86_64
To install libmemcached-devel you need to disable (if connected) the remi repository :
yum --disablerepo=remi libmemcached-devel
If PHP uses libmemcached and was installed from the repository remi , you have to reinstall ? Php-pecl-the memcached :
[bash]# yum erase php-pecl-memcached libmemcached
[bash]# yum --disablerepo=remi php-pecl-memcached libmemcached
Next, install the libmm package , which is not in the standard yum repositories :
[bash]# wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/x86_64/os/Packages/mm-1.4.2-6.fc12.x86_64.rpm
[bash]# yum localinstall mm-1.4.2-6.fc12.x86_64.rpm
Separately, it must be said about support for MySQL .
I have MariaDB installed on my machine, so install
[bash]#yum install MariaDB-devel.x86_64
If MySQL is installed, then you should install the mysql-devel package
[bash]#yum install mysql-devel.x86_64
This completes the dependency installation process.
Next, go to the ~ / src / SilkJS folder and run compilation
[bash]# cd ~/src/SilkJS
[bash]# make
[bash]# make install
If the installation process completed successfully, you can try starting SilkJS :
[bash]# ./silkjs httpd/main.js &
We type in the browser
http://localhost:9090
and rejoice!