Migrate the SugarCRM to AWS(Amazon Web Service) server (Part II)

In Part I of Migrate the SugarCRM to AWS server, we have seen how to create an instance of the production server

and a database server instance. Continuing the process, now we will see Apache configuration and migrate the

SugarCRM database from the old database server to the new database server, which we have created in Part I.

So let’s continue the process.

Logging Into AWS EC2 instance using WinSCP/Putty

We have to gain access to files and folders on the server. So here we are using WinSCP and Putty editor.

Generating .ppk file

1. Install WinSCP

2. Install Putty

3. Run WinSCP and Click on New Session.

4. Run WinSCP->Tools->PuttyGen



5. Load .pem file created in Part I.

Note: We had created a .pem file in Part I at the end of launching the production server instance.
The same file we are using and converting .pem to .ppk file.



6. Set Key Passphrase

7. Confirm Key Passphrase

8. Save private key as .ppk file

Logging in Using .ppk file

Run WinSCP and select New Session.

Select New Site


Note: The hostname is the IP address of production server instance, which we created in Part I. 

Enter Hostname(host IP) and Username (Ubuntu or see AWS AMI documentation)

Click Advanced->Authentication and select private key (.ppk file generated in above steps.)



Basic setup using Putty

Start Putty from WinSCP. Press Ctrl+p to start Putty.

Enter key phrase.

Fire the following commands on Putty.

Upgrade to PHP 5.6

Fire the following commands as per the sequence. When we installed LAMP it provides PHP 5 but if anyone wants to use the latest version of PHP, say PHP5.6, so we add PHP 5.6.

Copying files from Old Server To AWS

We have to compress project folder on the old server using zip command.

Go to the old server console and enter the root path of the project (eg. /var/www/html/project) and execute the following command.


Now go to the putty console of the new server instance.

Here go to the root directory, execute the following commands.


Copying Database from Old MySQL server to new MySQL server

Dumping Mysql DB on the old server:


Restoring Mysql DB on the new server:

Note: MYSQL_HOST in above command is the database server instance address

which was created in Part I.

Configuring Apache

Use the following command to create a file.

Add the following configuration in the above file.

Restart the Apache server

Server set up is done with above steps.

The last thing to do is domain pointing.

Check the IP address of AWS server instance, which was created in Part I of this process.

Enter that IP address in domain pointing IP address.

If you need more help contact us here.

Facebook Comments

PHP and SugarCRM Developer @ Techaroha Solutions Private Limited, always ready to learn and explore new possibilities in technology.


Leave a Reply