Posts

Showing posts from February, 2015

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 ...