Install oracle-java8 in ubuntu


add-apt-repository ppa:webupd8team/java
sudo apt-get install software-properties-common python-software-properties
add-apt-repository ppa:webupd8team/java
apt update; sudo apt install oracle-java8-installer
apt install oracle-java8-set-default

How to create your perfect server with ubuntu xenial


apt-get update && apt-get -y upgrade
apt-get install -y unzip
cd /tmp
wget --no-check-certificate -O installer.tgz "https://github.com/servisys/ispconfig_setup/tarball/master"
tar zxvf installer.tgz
cd *ispconfig*
bash install.sh

add index.php in default file of nginx at location : /etc/nginx/sites-available/default
enable phpmyadmin and squirrelmail by uncommenting in ispconfig.vhost location : /etc/nginx/sites-available/ispconfig.vhost

For Mysql backup
mysqldump -u root -p DB > DB.sql
For Mysql Restore
mysql -uUSER -pPASSWORD DB < DB.sql

To view service logs
sudo journalctl -f

To list journal entries for the nginx service:
sudo journalctl --unit nginx

To list journal entries for the nginx service starting from a given time:
sudo journalctl --unit nginx --since  "2016-10-30 18:17:16"

Add jquery to webpage from javascript console

 


var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();