How To Install Elasticsearch 1.7 on ubuntu

How To Install Elasticsearch 1.7 on ubuntu

Install Java 8

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer

Now that Java 8 is installed, let’s install ElasticSearch.

Run the following command to import the Elasticsearch public GPG key into apt:

wget -qO - | sudo apt-key add -

Create the Elasticsearch source list:

echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-1.7.list

Update your apt package database:

sudo apt-get update

Install Elasticsearch with this command:

sudo apt-get -y install elasticsearch

Elasticsearch is now installed. Let’s edit the configuration:

sudo vim /etc/elasticsearch/elasticsearch.yml


to localhost

Now start Elasticsearch:

sudo service elasticsearch restart

Test it

curl -X GET 'http://localhost:9200'

  "status" : 200,
  "name" : "Authority",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.7.5",
    "build_hash" : "00f95f4ffca6de89d68b7ccaf80d148f1f70e4d4",
    "build_timestamp" : "2016-02-02T09:55:30Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  "tagline" : "You Know, for Search"

Developer’s way to understand love – :)

Developer’s way to understand love –🙂


They will first try to ask and then research on internet, here what i found on internet.

1. Love as a general expression of positive sentiment – a stronger form of like
2. love usually refers to an experience one person feels for another
3. Love often involves caring for
4. love is “to be delighted by the happiness of another.”
5. love there is a “feeling of unity” and an “active appreciation of the intrinsic worth of the object of love.”
6. love as “unconditional selflessness”
7. love: attachment, caring, and intimacy
8. Biological basis : lust and attraction

​Attachment : there are two major drives in love: sexual attraction and attachment
Here one can ask question?
What really makes you happy?
What do you really want out of life?
love must be tough, The Way to Love Your Wife

Couples who seem to have happy marriages:
T-F. Never argue.
T-F. Do not depend on each other.
T-F. Both want sex equally.
T-F. Always have their needs met.
T-F. Share all responsibilities equally.
T-F. Are never lonely.
T-F. Always agree.
T-F. Think alike on most things.
T-F. Always perceive the other’s needs.
T-F. Always resolve their problems.

What are some of our common misconceptions about love?
They include the following:

• A deep longing for someone and great desire to be with that person is true love.
• If love dies, you can’t get it back.
• There is one and only one “soul mate” for each and every person.
• Love is all about emotional chemistry.
• If a relationship is rocky, it means you picked the wrong mate.
• If you happen to meet the right person, you will automatically live happily ever after.

The attraction between a man and a woman which God put within us can lead to the start of a strong emotional bond between husband and wife. Beyond this stage lies the joy of sacrificing, serving and sharing life and a spiritual bond together. Ultimately, true love leads to developing a lifelong friendship with our mate.

After almost 24 hour of thinking and research i did not understand, what is love?
It seem a subjective topic, month can be used to research and it can take years to understand a single line.

Finally My thoughts : as I was a hindi medium student, in my 12th there was a book chapter of Manu where Manu told each relation on this earth has some kind of selfishness. everyone need to other’s because of some selfishness, it seems a real truth most of time.

Install mongodb and security setting

Install MongoDB
1 Import the public key used by the package management system.

The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG Key:

sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10

2 Create a list file for MongoDB.

Create the /etc/apt/sources.list.d/mongodb.list list file using the following command:

echo 'deb dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

3 Reload local package database.

Issue the following command to reload the local package database:

sudo apt-get update

4 Install the MongoDB packages.

You can install either the latest stable version of MongoDB or a specific version of MongoDB.
Install the latest stable version of MongoDB.

Issue the following command:

sudo apt-get install mongodb-org

Deploy Rails 4.2 application with ruby 2.2 and nginx passenger on amazon ec2

Deploy Rails 4.2 application with ruby 2.2 and nginx passenger on amazon ec2

Deploying Rails 4.2 application with nginx + passenger is so easy.

Step 1
Setup EC2 server with ubuntu 14.04
Install ruby 2.2.2 and setup one database like PG etc.
This can be done following this

Once all the basic setup is done.
Now install nginx with passenger.
Follow following steps to do it.

you can now install Passenger on Ubuntu with the Advanced Packaging Tool (APT)

sudo apt-key adv --keyserver --recv-keys 561F9B9CAC40B2F7

Create an APT source file (you will need sudo privileges):

sudo vim /etc/apt/sources.list.d/passenger.list

And insert the following line in the file:

deb trusty main

Update the APT cache:

sudo apt-get update

Finally, install Passenger with Nginx:

sudo apt-get install nginx-extras passenger

Open the Nginx configuration file:

sudo vim /etc/nginx/nginx.conf

Find the following lines, in the http block:

# Phusion Passenger config
# Uncomment it if you installed passenger or passenger-enterprise
# passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
# passenger_ruby /usr/bin/passenger_free_ruby;

Uncomment both of them. Update the path in the passenger_ruby line. They should look like this:

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/passenger_free_ruby;

We need to disable the default Nginx configuration. Open the Nginx config file:

sudo vim /etc/nginx/sites-available/default

Find the lines:

listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

Comment them out, like this:

# listen 80 default_server;
# listen [::]:80 default_server ipv6only=on;

Save the file.

Now, create an Nginx configuration file for your rails app:

sudo vim /etc/nginx/sites-available/appname

Add the following server block. The settings are explained below.

server {
  listen 80 default_server;
  listen [::]:80 default_server ipv6only=on;

  passenger_enabled on;
  passenger_app_env production;
  root /home/ubuntu/appname/public;
  # redirect server error pages to the static page /50x.html
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root /home/ubuntu/appname/public;

Create a symlink for it:

sudo ln -s /etc/nginx/sites-available/appname /etc/nginx/sites-enabled/appname

Restart Nginx:

sudo service nginx restart

Now your app’s website should be accessible.

Updating code and assets:

rake assets:precompile RAILS_ENV=production
touch tmp/restart.txt