Posts

Mysql installation steps

Basic System Configuration 1. Add fully qualified domain name in   /etc/hosts file      127.0.0.1 localhost.localdomain localhost      12.34.56.78 servername.example.com servername 2. Add host name in /etc/hostname       echo "servername" > /etc/hostname       hostname -F /etc/hostname Installing MySQL Make sure your package repositories and installed programs are up to date by issuing the following commands: 1. apt-get update 2. apt-get upgrade --show-upgraded 3. apt-get install mysql-server   To change privileges of mysql use this command  and change root password    mysql_secure_installation Using MySQL Type following command at your prompt: mysql -u root -p Forgot password recovery If you’ve forgotten your root password, use the package reconfiguration tool to change that password: 1. dpkg-reconfigure mysql-server-5.1 Let’s create a database and assi...

Setup single node elasticsearch, logstash and Kibana4 in aws ec2

Image
System Settings 1.To change hostname    Edit host name file   sudo nano /etc/hostname   Add these contents in hostname   ec2-54-XXX-XXX-XX.compute-1.amazonaws.com 2. To change hosts file       To edit hosts file      sudo nano /etc/hosts      Add ip address and hostname in hosts file       10.200.1.X ec2-XX-XX_XX.compute-1.amazonaws.com Java installation 1. To download java   To download 1.7 use this    wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http %3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-x64.tar.gz" –output-document="jdk-7u75-linux-x64.tar.gz" 2. Extract jdk in jvm folder   1. Create folder jvm in /usr/lib/ path      sudo mkdir jvm 2. Move jdk f...

Redis installation setup

Redis installation setup Download and extract redis tar  1. wget http://download.redis.io/releases/redis-2.8.19.tar.gz tar xzf redis-2.8.19.tar.gz 2. Install redis cd redis-2.8.19 make 3. After that you should run the recommended command: make test 4. Lastly run make install, which installs the program system-wide. sudo make install 5. To set redis as a service Run these commands cd utils Need to run the install_server.sh file sudo ./install_server.sh here can set which port redis server is to run , Default port is 6379 6. To start and stop redis service sudo service redis_6379 start sudo service redis_6379 stop 7. Run this command to set Redis to automatically start when you boot up sudo update-rc.d redis_6379 defaults 8. Test redis server To access the Redis database by typing the following c...

sudoers file issue

  Sudoers file issue If messed up your sudoers file.You'll need to: Reboot into recovery mode (hit escape during boot, choose the recovery mode option on the grub screen) Choose the 'Enable networking' option Choose the 'Drop to root shell' option run visudo, fix your file Reboot with normal grub option

Tomcat installation

Tomcat Installation download tar file from https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz extract to /usr/lib/ folder rename apache-tomcat-7.0.42 to tomcat In /etc/bash.bashrc set CATALINA_HOME=/usr/lib/tomcat PATH=$PATH:/usr/lib/tomcat/bin To start tomcat as service create a file in /etc/init.d/ name it tomcat add this lines in tomcat #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin start() { sh /usr/lib/tomcat/bin/startup.sh } stop() { sh /usr/lib/tomcat/bin/shutdown.sh } case $1 in start|stop) $1;; restart) stop; start;; *) echo "Run as $0 ...

Ubuntu installation

Ubuntu 12.04 os setup After installed ubuntu 12.04  os then  need to install other packages like skype, git, java all that informations here posted To Install ubuntu http://releases.ubuntu.com/12.04/ download Wubi installer wubi.exe is simple way to install ubuntu. Create new user sudo groupadd ubuntu                              ubuntu  --> groupname sudo adduser dev -ingroup ubuntu                 Dev -->username  Set proxy setting To set the proxy setting system widely sudo vim etc/enviroment  Add these contents in environment file http_proxy="http://domainname:port" https_proxy="https://domainname:port" no_proxy="localhost"  TO create password less sudo user...

To create Executable jar

Image
To create Executable jar files in java I got 3 ways to  create executable jar files  we can use 1. Eclipse 2. Ant script 3. Java command    Eclipse method I created the simple java hello world program to demonstrate this method. package com.test.createjar; public class Main {         public static void main(String[] args){         System.out.println("Hello World !");     } } To right click the project name and goto Export -> export 1. We get export window Then we will select Runnable jar file option. It will forward  to the Runnable jar file specification window 2. Runnable jar file specification window * Here we select the launch configuration as method name and project name * Destination path and jar file name After clicks Finish button it created a executable jar file. 2.  Ant script Through ant script also ea...