Monday, November 23, 2015

PostgreSQL installation on AWS Linux server

Steps to install PostgreSQL in Linux server
Prerequisites

    You will need to have access to a superuser, or sudo account, so you can install the PostgreSQL database software

Installation

First, update apt-get library

     $ sudo apt-get update

Then install PostgreSQL and its development libraries

     $ sudo apt-get install postgresql postgresql-contrib libpq-dev

PostgreSQL is now installed  

Create PostgreSQL User

To create new user run the below command with your own user name

     $ sudo -u postgres createuser -s <pg-username>

If you want to set a password for the database user, enter the PostgreSQL console with this command

$ sudo -u postgres psql

Enter the following command in PostgreSQL prompt to set the password for the user that you created before

postgres=# \password pguser

MySQL installation on AWS Linux server

Steps to install MySQL in Linux server
Prerequisites

You will need to have access to a superuser, or sudo account, so you can install the MySQL database software
Installation

First, update apt-get library

     $ sudo apt-get update

Then install MySQL and its development libraries

      $ sudo apt-get install mysql-server mysql-client libmysqlclient-dev

During the installation, your server will ask you to select and confirm a password for the MySQL "root" user. MySQL is now installed

Secure MySQL server

Run some additional commands to get our MySQL environment set up securely

First we need to tell MySQL to create its database directory structure where it will store its information

      $ sudo mysql_install_db

Afterwards, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system

      $ sudo mysql_secure_installation

Access MySQL server

To Access the MySQL shell

      $ mysql -u root -p

After entering the MySQL root password into the prompt you can able to access MySQL server prompt.

Installing RVM in deployment Server

1) Update all latest packages
  • sudo apt-get update

2) Update gpg Keypair
  • gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
If its failed then run the below command
  • command curl -sSL https://rvm.io/mpapis.asc | gpg --import -

3) Install RVM
  • curl -sSL https://get.rvm.io | bash -s stable

4) Load RVM
  • source ~/.rvm/scripts/rvm

5) Install RVM dependancies
  • rvm requirements

6) Install required dependancies
  • rvmsudo /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion



Monday, April 22, 2013


SEARCH ENGINE OPTIMIZATION (SEO)

Introduction
SEO will help search engines find and rank your site higher than the millions of other sites in response to a search query. SEO helps you get traffic from search engines. Although the basic principle of operation of all search engines is the same, the minor differences between them lead to major changes in results relevancy.

SEO Score
SEO has a unique scoring system based on the following SEO factors:
  • Page Indexable
  • Meta Description
  • H1 and H2 tags
  • ALT Image Tag
  • SEO Friendly URL
  • Title Tag
  • Number of links
  • Page Rank
Page Indexable
Search engines can understand content in HTML or text format. Content involving images, and audio and video elements are not legible to search engines. However alternatives are available to make these non-indexable formats understandable to search engines.
Images come with "alt" attribute, which can be given keyword descriptions for capture by search engines; CSS style can be implemented to replace images with text formats publishing text transcripts for audio and video content makes them indexable.

Meta Description
Meta description tag is used for a brief description of the page. It is used by all popular search engines when displaying search engine results. Having a good Meta description can improve your chances of the visitor clicking on your result in the search engine.

  • Write a sensible description and avoid automated tools for generating meta description.
  • You can include your popular keywords n the meta description as they will be bold when displayed in search engine results.
  • Keep it up to around 70 words (350 characters). Search engines display variable length but they will pick the best bit to display based on user search.
  • Use unique descriptions for each page
H1 and H2 tags
Header tags are a great way to help boost your search engine rankings. H1 tag is usually larger than normal text and helps users quickly learn what the page is about.

  • Use H1 and H2 tags to highlight important keywords
  • H1 tag should be used once on the page
  • H2 tag can be used as many times, after the H1 tag

ALT image tag
ALT image tag has became particularly important with the increase in demand for image searches which can significantly contribute to your search engine traffic if used properly. 

The best practices for image search optimizations are:

  • Use alt and title tags in your images to describe the context of the image with relevant keywords
  • Avoiding long ALT text that would be considered as spam.
  • Avoiding only image links for your site's navigation.

SEO Friendly URL
URL structure on the site appear to have a static structure like "/category/page" in contrast to dynamic structure like "/category/page?cat=3&page=1".

Avoid:
    1. using lengthy URLs with unnecessary parameters and session IDs
    2. choosing generic page names like "page1.html"

Title tag
Browser title tag is one of the most important on-page SEO factors. The following things are recommended by SEO

  • Always include a title tag on your pages.
  • Don't use multiple title tags in single page.
  • Keep the title length up to 11 words or 70 characters.
  • Use relevant keywords in your title tags.
  • Don't use single title tag across your site.
  • Using extremely lengthy titles are unhelpful for the users.

Number of links
Number of links represents number of links found on the page. Search engines consider only a certain number of links on a page and would ignore others for purposes of page rank calculation.

Page Rank
Page Rank is one of many factors that determine where your web page appears in search result ranking, but if all other factors are equal, Page Rank can have significant impact on your search engines rankings. to increase your Page Rank, you need to have "back-links," Search engines often use the number of back links that a website has as one of the most important factors for determining that website's search engine ranking, popularity and importance. As you build web pages within your website, you can create some of your own back-links by linking to relevant pages within your own website.

Conclusion
As an Internet marketing strategy, SEO considers how search engines work, what people search for, the actual search terms or keywords typed into search engines and which search engines are preferred by their targeted audience. Optimizing a website may involve editing its content, HTML and associated coding to both increase its relevance to specific keywords and to remove barriers to the indexing activities of search engines. Promoting a site to increase the number of back links, or inbound links, is another SEO tactic.


Saturday, March 31, 2012

Install Rails 3 using RVM on ubuntu


1. Installing RVM

Ruby Version Manager is a great tool for isolating your development environment to each individual project.  This allows you to have specific ruby versions with specific gemsets isolated from the rest of your development environment, virtually eliminating any potential conflicts.  Although not absolutely required to use Rails or Ruby, RVM will greatly reduce headaches with managing ruby.  To learn more about RVM, visit the RVM homepage.
Luckily, RVM provides an install script that we can download and execute with a single command.  This command will download the latest code from the github repository, so you need to have git and curl installed on the system.  If you are using a recent linux distro like Ubuntu 11.10, then you might already have git and curl installed. If not, execute the following command:

>$ sudo apt-get install git curl
Start the RVM installation by running this command:

>$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)