change boot order for dual boot(Windows XP and Ubuntu)

If you installed Windows and Ubuntu as dual boot then by default windows will boot 1st. To change the boot order we need to change the boot order.

Change default operating system at boot
 To change which operating system starts by default when the computer starts up, edit the grub configuration file.
1.Make a backup of the configuration file, and open it in a text editor:
  cp /boot/grub/menu.lst /boot/grub/menu.lst backup-menu.lst  ### this will to keep a backup of original file
  vi /boot/grub/menu.lst  ### open menu.lst file
2. Find “default 0” line in the menu.lst file
   Ex: type /default and press enter to go to that line.
3. Replace with the following line:
      default X

    Note: You should replace X with a number, according to the order which your operating systems appear in the configuration file. You should start counting from 0. For example, if you wish the default operating system to be the first in the list, replace X with 0, if you wish the default operating system to be the second in the list, replace X with 1, and so on.

post configuration of mysql in ubuntu : allow database access to remote system

Configuration changes on MySQL to accept remote connections from a particular ipaddress

    If you are using Debian Linux file is located at /etc/mysql/my.cnf location
    If you are using Red Hat Linux/Fedora/Centos Linux file is located at /etc/my.cnf location
    If you are using FreeBSD you need to create a file /var/db/mysql/my.cnf

now edit my.cnf depending on your Linux
vi /etc/mysql/my.cnf

Make sure line skip-networking is commented
Add line, go to the line bind-address and repalce 127.0.0.1 to your sql server IP
bind-address=YOUR-SERVER-IP
exit my.cnf file after saving...
/etc/init.d/mysql restart

  open mysql prompt
 mysql -u root -p mysql
 GRANT ALL ON yourdatabasename.* TO username@'your-ipaddress' IDENTIFIED BY
'PASSWORD';

Note: your databasename is replace by your database name and your-ipaddress  is replaced by ip address of remote machine from  which you want to connect to MySql database

how to restore windows MBR : fix windows boot loder (MBR)

If a computer has dual boot with Windows and Linux, then the linux bootloder is used to boot the OS . So, if we loose linux OS or the linux partition deleted accidentally then the windows OS wouldn't boot and we will get grub screen. To resolve this issue we need to fix the windows MBR(Mater Boot Record).
Requirement for this process:1.Windwos OS cd/dvd
                                            2.Administrator password of Windows OS
Follow below steps for Windows XP and Windows Server 2003
1.Boot the windows os using os CD/DVD .Insert the Windows os CD/DVD into CD/DVD drive and reboot the system with CD/DVD.
2.Once the os boot with CD/DVD, press R to go to Repair Mode.
3.Press 1 to change environment to CD/DVD.
4.Give Administrator password of windows os.
5.Type FIXMBR and press enter.
6.Press Yes to continue
7.Remove CD/DVD form drive and reboot the system.
 Now your windows will boot as normal.

Follow below steps for Windows 7

1. Boot your computer to the Windows 7 DVD (or to a "Repair CD"). At this screen choose to install now.
2. Select your language and click next.
3. Click the button for "Use recovery tools" and Click Next
4. Click on  "Command Prompt".
5.We need to know what drive letter has been assigned the DVD drive to access the folder.
  Type diskpart and press enter
  Type list vouume and press enter  ---This command will show all drives on the system.Remember the drive letter of CD/DVD
  Type exit and press enter
6.Type G: to go to G drive. ( Assue G is the CD/DVD drive)
  CD root and press enter
  Type dir and press. Verify that bootcect.exe is there in boot directory.
8. To restore the "bootsector code"
   Type bootsect /nt60 SYS /mbr and press enter
9. Type exit and reboot the system.

installation of SugarCRM in ubuntu server

Below packages required to Installed SugarCRM. In 2 different Ubuntu Server.
Ex: Server-01: Apache and PHP & Server-02: Database Server (MySQL)
Install all the required packages using the following commands on Server-02
sudo apt-get install mysql-server

Install all the required packages using the following commands on Server-01
sudo apt-get install apache2
sudo apt-get install libapache2-mod-php5 libapache2-mod-perl2
sudo apt-get install php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap unzip
sudo apt-get install php5-mhash php5-mysql php5-odbc curl libwww-perl imagemagick

Creating Database for SugarCRM
mysql -u root –p
Then type your MySQL password and run this command
mysql> create database sugarcrm;
mysql> exit


Follow the steps to allow access of MySql form remote server or system
Loging into mysql server. Now need to edit my.cnf depending on your Linux
vi /etc/mysql/my.cnf
Make sure line skip-networking is commented.
Go to the line bind-address and replace 127.0.0.1 to your mysql server IP, the new line should look like below..
bind-address=YOUR-SERVER-IP
exit my.cnf file after saving...
/etc/init.d/mysql restart
  open mysql prompt
 mysql -u root -p mysql
 GRANT ALL ON yourdatabasename.* TO username@'your-ipaddress' IDENTIFIED BY
'PASSWORD';
*yourdatabasename is replace by your database name,your-ipaddress  is replaced by ip address of remote machine from which you want to connect to MySql database

Installed SugarCRM
Now you need to go to your webserver document root directory (default location is /var/www) or your choice…
cd /var/www
Download SugarCRM

Now unzip file for using this command
unzip SugarCE-6.1.2.zip
Changed the folder name
sudo mv SugarCE-6.1.2.zip sugarcrm
Changed the ownership of this folder
sudo chown –Rf www-data:www-data sugarcrm
Give Write permitions for apache on some of SugarCRM Files
cd /var/www/sugarcrm
sudo chmod 766 config.php
sudo chmod 766 custom
sudo chmod -R 766 data
sudo chmod -R 766 cache
sudo chmod -R 766 modules

Open php configuration file do below chane
vi /etc/php5/apache2/php.ini
Change
;memory_limit = 16M  to memory_limit = 50M
Change
;upload_max_filesize = 2M to upload_max_filesize = 10M
Restart web server using the following command
sudo /etc/init.d/apache2 restart

Configure sugarCRM
Now open your webbrowser and enter the following address
http:// hostname or server-ip/sugarcrm/install.php
While configuring give mysql server ip and password as we have installed mysql database on different server.


Range of IP Address


There are 2 versions of IP  i.e.  IPV4 and IPV6
IPV4:IPV4 is called decimal doted notation, it is a 32bit address .
IPV6:IPV6 is called hexadecimal doted notation, it is a 128bit address..

IPV4 divided into classes.Please find below
Class A Range : 0.0.00 to 127.255.255.255        Reserved for LAN & WAN
Class B Range :128.0.0.0 to 192.255.255.255    Reserved for LAN & WAN
Class C Range:192.0.0.0 to 223.255.255.255     Reserved for LAN & WAN
Class D Range:224.0.0.0 to 239.255.255.255     Reserved for Multicasting
Class E Range: 240.0.0.0.0 to 255.255.255.255 Reserved for R&D(Research & Development)

IPV4 divided in Private and Public ip address.
Private IP address
Class A Range: 10.0.0.0 to 10.255.255.255
Class B Range:172.16.0.0 to 172.31.255.255
Class C Range:192.168.0.0 to 192.168.255.255
Above ip address are not valid for internet.These ip address are only valid for private organizations.All other ip address are public ip.