📜 ⬆️ ⬇️

Installing SilkJS on Centos 6

The topic for the topic was the situation I was in trying to install SilkJS on Centos OS. Officially, SilkJS can be installed on OSX and Ubuntu (& forks). For Centos OS, the installer is still under development, although a Centos makefile is present in the package.

So what is SilkJS?

SilkJS is a command processor and super-fast http-server, which is an add-on to a v8 JavaScript engine developed by Google. It is optimized for running server-side applications, console applications and network servers. An obvious competitor to a product such as NodeJS .
In short, its features:


Installation
')
We perform all actions from the root user :
[bash]# sudo su - 

Check the OS version:
 [bash]# cat /etc/redhat-release CentOS release 6.3 (Final) 

Check the architecture:
 [bash]# getconf LONG_BIT 64 

Create a 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 

Get a copy of the program's git repository:
 [bash]# git clone https://github.com/mschwartz/SilkJS.git SilkJS 

Go to the folder SilkJS
 [bash]# cd SilkJS 


Until now, the installation process is strictly according to the instructions posted on the developer’s website.

Open and edit the src / SilkJS / Makefile file ( Vim text editor is used here)
 [bash]# vim src/SilkJS/Makefile 

we comment lines 5 through 12 in which the definition of the variable MAKEFILE is going, in line 3 we assign the value Makefile.centos to the variable MAKEFILE


Next, open the Makefile.centos
 [bash]# vim src/SilkJS/src/Makefile.centos 



and add mysql support to line 8 (for some reason it was missing for Centos )


See 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 enabled) the remi repository:
 yum --disablerepo=remi libmemcached-devel 

If PHP uses libmemcached and was installed from the remi repository, then php-pecl-memcached must be reinstalled:
 [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, I must say about the support of MySQL .
I have MariaDB installed on my machine, so install
 [bash]#yum install MariaDB-devel.x86_64 

If MySQL is installed, you should also install the mysql-devel package.
 [bash]#yum install mysql-devel.x86_64 

This installation process is complete.

Next, go to the folder ~ / src / SilkJS and run the compilation
 [bash]# cd ~/src/SilkJS [bash]# make [bash]# make install 

If the installation process is completed successfully, you can try running SilkJS :
 [bash]# ./silkjs httpd/main.js & 

We type in a browser
 http://localhost:9090 
and rejoice!

Source: https://habr.com/ru/post/152291/


All Articles