Java Installation on Ubuntu Linux

Java Installation on Ubuntu Linux

sudo apt-get update
sudo apt-get install default-jdk

update-alternatives –config java

sudo vi /etc/profile.d/java.sh

#/bin/bash
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

sudo reboot

env | grep JAVA_HOME

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

sudo java -version

 

Output >

openjdk version “11.0.4” 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu219.04)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu219.04, mixed mode, sharing)

 

MySQL Installation on Ubuntu Linux

sudo apt-get install mysql-server mysql-client

mkdir /downloads/mysql -p
sudo cd /downloads/mysql
sudo wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.48.tar.gz
sudo tar -zxvf mysql-connector-java-5.1.48.tar.gz

 

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]
default-storage-engine=INNODB
innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_log_file_size=2G
character_set_server=utf8mb4
collation-server=utf8mb4_bin
max_allowed_packet=256M
transaction-isolation=READ-COMMITTED
binlog_format=row

 

sudo service mysql restart

sudo mysql -u root -p

CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

CREATE USER ‘jira’@’%’ IDENTIFIED BY ‘kamisama123’;

GRANT ALL PRIVILEGES ON jira.* TO ‘jira’@’%’;
quit;

 

Jira Installation on Ubuntu Linux

mkdir /downloads/jira -p
cd /downloads/jira
sudo wget https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-core-8.5.0.tar.gz

sudo cp /downloads/mysql/mysql-connector-java-5.1.48/mysql-connector-java-5.1.48.jar /opt/jira/lib/

sudo chmod 700 /opt/jira -R
sudo chmod 700 /opt/jira-home -R

sudo vi /etc/profile.d/jira.sh

#/bin/bash
export JIRA_HOME=/opt/jira-home

 

sudo reboot

sudo /opt/jira/bin/start-jira.sh

sudo netstat -nl | grep -E -i “proto|8080”

output > Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 :::8080 :::* LISTEN
Proto RefCnt Flags Type State I-Node Path

tail -f /opt/jira-home/log/atlassian-jira.log

VNC Viewer and RDP on Ubuntu 18.04

$ sudo apt update

$ sudo apt install xfce4 xfce4-goodies

$ sudo apt install tightvncserver

$ vncserver $ vncserver -kill :1

$ mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

$ nano ~/.vnc/xstartup (paste the follow being in the xstartup file and write out) #!/bin/bash xrdb

$HOME/.Xresources startxfce4 &

$ sudo chmod +x ~/.vnc/xstartup $ vncserver

Array.reduce

Array.reduce()

It is an ECMA5 function.

It is use to reduce the array to a single value by performing certain operation in the callback function.
In simple terms callback function will be called for all the elements in the array.

Call signature

array.reduce(function(total, currentValue, currentIndex, arr), initialValue)

total – is the processed value in each iteration
currentValue – current array element in the iteration
InitialValue – Initial value of total if needed

More on Medium

8 Ways to Optimize your WordPress Website

If you are about to create a new WordPress website or trying to tune existing one  and wonder what you should consider to optimize it then you have come to the right place. Several factors contribute to the loading speed of your website., such as Hosting Server, Selected Theme, Installed Plugins, Running Scripts, Content Delivery Network, Caching Techniques and Animation. Let’s discuss in details.

1. Choose an Awesome Hosting Partner

Continue reading