Friday, February 28, 2014

Create a ppk file from a pem file


1) Download and Install PuTTY. Run PuTTYgen;

 2) Import the .pem file into the PuTTYgen from Conversions->Import Key menu.

3) Change the key-comments. [These key comments appear when we connect to instance using .ppk.]

4) Create a pass-phrase if you want an additional level of security. This is asked when you connect to the instance.

5) Click on Save Private Key.

 6) Use the key to connect to the instance now.



I hope it helped. Feel free to comment...

Wednesday, November 6, 2013

netmon

netmon

/etc/init.d/mysql restart

I hope it helped. Feel free to comment...

Monday, September 16, 2013

Setting UP Apache2, MySQL and PHP5 machine on Google Compute Engine

In my case, i am using f1-micro Debian instance.  

First download gcutil

then use this link to install the servers.
https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian

then create a rule in firewall using gcutil
gcutil addfirewall http2 --description="Incoming http allowed." --allowed="tcp:http"
https://developers.google.com/compute/docs/quickstart

I hope it helped. Feel free to comment...

Friday, September 13, 2013

Apache Bechmarking (ab)

I am using Ubuntu 12.04. First, install ab
sudo apt-get install apache2-utils



I hope it helped. Feel free to comment...

Friday, July 26, 2013

Some useful php scripts

Some useful php scripts
https://github.com/lornajane/PHP-Web-Services
I hope it helped. Feel free to comment...

Thursday, July 4, 2013

Extract .tar unbuntu/linux terminal

tar -xvf filename.tar

I hope it helped. Feel free to comment...

Tuesday, June 18, 2013

Import / Export MySQL Database using Ubuntu terminal

To import .sql file into MySQL database
mysql -u mysql_user -p dabase_name < /path/import_file_name.sql
It will ask for the password, enter the mysql password and your sql script will be executed.

To export a database and gzip it, use
mysqldump -h localhost -u mysql_user -pMysql_password database_name | gzip > /path/export_file_name_$(date +%m-%d-%Y).sql.gz
$(date +%m-%d-%Y) is optional. It inserts today's date in the file name. You can also use this export command without   $(date +%m-%d-%Y)

 mysqldump -h localhost -u mysql_user -pMysql_password database_name | gzip > /path/export_file_name_$(date +%m-%d-%Y).sql.gz

I hope it helped. Feel free to comment...