Install Picly Beta 2.4
Picly is developed with Node JS. Its installation is easy as you can see in the following sections.
Current version of Picly (beta 2.4) is for non commercial use.
We work hard to release first production version in the coming weeks.
We want to hear you!
For any support question, you can mail to email@example.com
Before You Start
Picly has a few dependecies like Redis, Graphics Magick, OpenCV, and so on. In order to install them you have two options: a script included in the beta 2.4 package or to install each dependency manually.
Option 1: By script
Create Picly folder
$ mkdir picly && cd picly
Download beta 2.4 package
$ wget https://picly.blob.core.windows.net/piclydownloads/picly-f43705ff-beta25.tar
$ tar -xvf picly-xxxxxxxx-betaXX.tar
Remove tar file
$ rm picly-xxxxxxxx-betaXX.tar
Once you have the files, you can execute the script:
Option 2: Step by step
If you want install each dependencies step by step, here you have the following instructions.
You need install them firstly Node:
NodeJS 8.11.2 LTS:
Picly is fully tested with NodeJS 8.11.2 LTS version.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
More info at Node JS.
Redis 4+ or 3.4+:
The suggested way of installing Redis is the following:
$ wget https://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable make
More info at Redis website.
GM is on the most use graphics manipulations library. You can install it in Ubuntu systems with:
$ sudo apt-get update sudo apt-get install -y graphicsmagick
More info at Graphics Magick
IM is another popular graphics library used by Picly plugins as well. You can install it in Ubuntu systems with:
$ sudo apt-get install -y imagemagick
More info at Image Magick
Cairo is an open source graphics library used by some default Picly plugins. To install it:
$ sudo apt-get install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
More info at Cairo
Open source library with hundreds of algorithm to analyze images. Again, in Ubuntu systems, you can install it with:
sudo apt-get install -y libopencv-dev
More info at Open CV website
As easy as in Ubuntu systems:
sudo npm i -g node-gyp
More info at Node.js native addon build tool
Inside of picly directory you have made previously you need enter the following command to install and compile Node JS dependencies
$ npm install
Note: this install process can take some time to complete and some warnings can be shown.
In order to get your license, just:
$ npm run update-license
Picly Beta 2.4 version is free for non commercial use. Pro and Business version will be released soon. Any question about this? Ask to firstname.lastname@example.org
Last, check dependencies:
$ npm run check-dependencies
With this command, Picly checks all dependencies are fine.
Start Picly servers
Picly has been developed using microservices architecture to allow an easy installation and easy scalation from a single server to multiple servers.
For running Picly in a single server just type the url and the port where your server will be listening:
$ npm run startsingleserver 192.168.1.103 8000
We are based on 'convention over configuration' premise so... that's all! There is no need edit your config.json to start but, of course, you can change your config later (see config section in 'Documentation').
Note that this action will replace the URL and port entered into your config.json, so there is no need to type the same url and port later. To start with the same parameters is enough with:
npm run startsingleserver
It's valid to enter the server URL as 'localhost' and the port is an optional parameter (by default, the port is 8088).
Open Admin Web Panel
Open your browser and enter the URL and port according you put them as parameters before.
Enter as default user is "admin". Default password is "admin"
Now you have your own images server with on the fly transformations using Picly url syntax!
Up & running with PM2 tool
PM2 Picly installation
Alternatively, instead of 'npm run' you can use PM2 process manager to run Picly installation.
For single server, using PM2 tool, start Picly is as easy as:
$ pm2 start picly_singleserver.js 192.168.1.103 8000
In multiserver mode, Picly is composed by five node servers:
- Admin Web Panel Server, located at /picly_web/picly_webserver.js
- Picly API Server, located at /picly_api/picly_apiserver.js
- Picly Provider Server Server, located at /picly_provider/picly_providerserver.js
- Picly Background Server, located at /picly_background/picly_backgroundserver.js
- Public API Picly Server, located at /picly_publicapi/picly_publicapiserver.js
You can run your Picly installation by these commands:
$ pm2 start picly_web/picly_webserver.js $ pm2 start picly_api/picly_apiserver.js $ pm2 start picly_provider/picly_providerserver.js $ pm2 start picly_background/picly_backgroundserver.js $ pm2 start picly_publicapi/picly_publicapiserver.js