Blog Page

Install Java 8 on Ubuntu 14

askadmin 0 Comments

Ubuntu by default repository supports upto Java 7, so to Install Java 8 on your Ubuntu Box. Please follow the steps as below

  1. Add webupd8team Java Repository
    sudo add-apt-repository ppa:webupd8team/java
  2. Update apt get
    sudo apt-get update
  3. Run Oracle 8 Installer
    sudo apt-get install oracle-java8-installer

Once Setup is finished, check your installed Java Version

  1. Check Java Version
    java -version

Now configure default Java Environment

  1. Setup default Java Environment
    sudo apt-get install oracle-java8-set-default

Ref :: Ref Site

add new domain / subdomain / virtualhost in ubuntu apache2

askadmin 0 Comments

Let assume you want to add a domain

To add a New Domain/Subdomain in Ubuntu Apache2, please follow the step below

Create seperate folder for your domain within /var/www/html (This is good practice to follow keeping your domain files in specific folder)

# cd /var/www/html
# sudo mkdir
# sudo mkdir

Now lets add the host entry in Apache2

# cd /etc/apache2/sites-available
# sudo vi

Insert the Code below

<VirtualHost *:80>
# This is your domain name

# This the path to same folder you created above as Document Root for your domain
DocumentRoot /var/www/html/yourdomain/public

# Available loglevels: trace8, …, trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


once done hit ESC and then type wq (To write and save the file)

Now you have to enable the site in apache2

# sudo a2ensite
# sudo service apache2 restart

Now you have to add the domain in hosts file

# sudo vi /etc/hosts

Add this line in hosts file and save

Now open the browser of your choice and type

Note : Make sure you have index.html or index.php file in /var/www/html/yourdomain/public folder. As this will be your document root folder now so you should add all files related to your site there.

Set environment path in windows from command prompt

askadmin 0 Comments

To add environment path in windows operating system from command prompt.

# Open command prompt
# set PATH = %PATH%;C:\Yourfolderforpath\subfolder

%PATH% adds the value stored in your existing path.

; separator for you new environment variable

C:\Yourfolderforpath\subfolder is the location of the new environment you want to add (eg. c:\program files\mysql\bin)

Another MySQL daemon already running with the same unix socket

askadmin 0 Comments

Are you getting Database Error “Error establishing a database connection”.

Check your mysql log and try to restart your mysql service

"#/etc/init.d/mysqld restart"

If you get the message “Another MySQL daemon already running with the same unix socket”, preform the steps as below

#shutdown -h now

#mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

#/etc/init.d/mysqld restart

Disable foreign key constraint in MySQL

askadmin 0 Comments

While creating, updating, deleting database tables or while inserting, updating deleting records in table we come across “foreign key constraint Errors”. ¬†Here is the work around to get our job done. The the lines below before and after your sql query.