How to install Node.js via binary archive on Linux (node-v8.11.3-linux-x64.tar.xz)

1) Node version = node-v8.11.3-linux-x64.tar.xz
Unzip the binary archive to any directory you wanna install Node, I use /usr/local/lib/nodejs

sudo mkdir /usr/local/lib/nodejs
sudo tar -xJvf node-v8.11.3-linux-x64.tar.xz -C /usr/local/lib/nodejs
sudo mv /usr/local/lib/nodejs/node-v8.11.3-linux-x64 /usr/local/lib/nodejs

2) Set the environment variable sudo nano ~/.profile, add below to the end

# Nodejs
export NODEJS_HOME=/usr/local/lib/nodejs/node-v8.11.3-linux-x64/bin

3) Refresh profile
. ~/.profile
( . is including within command )

4) Test installation using
$ node -v


fallocate: fallocate failed: Text file busy in ubuntu OS

fallocate: fallocate failed: Text file busy in ubuntu OS

swapoff -a turns off swap usage. You were trying to allocate 15G to /swapfile,
but you can’t do that if it’s in use.
You do a swapoff -a, fallocate (you may have to delete the current /swapfile first), mkswap /swapfile, then swapon -a.

swapoff -a
swapon -a

sudo fallocate -l 1G /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile




Sample Virtual Host with PHP Setting For Site Available At Nginx

For /etc/nginx/site-availables/default

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;
    index index.php index.html index.htm index.nginx-debian.html;

    server_name localhost;

    location / {
        try_files $uri $uri/ =404;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;

    location ~ /\.ht {
        deny all;


For custom virtual host

server {
    listen 8088;
    listen [::]:8088;

    root /var/www/custom_site/public;
    index index.php index.html index.htm;

    server_name localhost;

    location / {
        try_files $uri $uri/ /index.php?$query_string;

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;


How to deploy Laravel Project at CPanel without installing Composer

How to deploy Laravel Project at CPanel without installing Composer

1) Generate – Compile the whole project at local and add one php file to run php scripts at Server

system(‘php ../artisan config:clear’);
system(‘php ../artisan config:cache’);
system(‘php ../artisan cache:clear’);
system(‘php ../artisan config:cache’);

2) Upload the whole project to the server at CPanel
3) Create a new subdomain
4) Run the subdomain from the browser
5) Compile the whole project from Browser

5) Run the subdomain / configured domain from browser

Enable PHP error reporting at apache in ubuntu

Change / turn on the error_reporiing setting at /etc/php5/apache2/php.ini
to check the php.ini file path, you can search by phpinfo(); at a test php file and then check the php.ini file path


He are new values:
error_reporting = E_ALL & ~E_NOTICE
display_errors = On


After changing the setting at php.ini, restart the apache2 server
sudo service apache2 restart