Category Archives: Hosting

Install Mcrypt PHP extension on Ubuntu (PHP-FPM + Nginx)

To install Mcrypt PHP extension on Ubuntu / Debian run following command ( this step is same for Nginx and apache )

This will create a mcrypt module in /etc/php5/mods-available directory. If it doesnt we need to create symlink for this.

Now enable mcrypt by running

After this restart php5-fpm service by

 

Upgrade Google Cloud Compute Engine VM Instance

There two ways you can upgrade or downgrade your VM instances.

a. Stop – configure – start

b. Minimum downtime ( by swapping the disk )

a. This is a very easy method to do this. The main disadvantage of this is, it requires downtime. If you are okay with a 5 – 10 minute of downtime then you can go with this method.

b. If you this to happen almost real time then follow these steps

If you have a Google cloud compute engine VM Instance and wants to upgrade or downgrade  Continue reading

How to access remote mysql server using local phpmyadmin

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL or MariaDBwith the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables,fields or rows; executing SQL statements; or managing users and permissions. source: wikipedia

To access remote mysql database from your local phpmyadmin, open config.inc.php file by

Add following line

You can refer this article to install phpmyadmin on Ubuntu: http://devendraverma.com/install-phpmyadmin-on-ubuntu/

Deploy WordPress button is disabled in Google Cloud Launcher

Google Cloud WordPress Launcher Screen

In order to use Click to Deploy with Google Compute Engine you need to make sure “Google Cloud Deployment Manager API” is enabled on your project. You can enable this API from Developer console->APIs page.

Google Cloud API Manager Screen

Moreover, if you have multiple accounts added in your browser try using Chrome Incognito tab to login in order to make sure your email has the right permissions.

Enable password authentication and set root password – Ubuntu

To enable Password Authentication

Open file etc/ssh/sshd_config by

Search for PasswordAuthentication no, just change this to

To set root password

it will ask for new root password and confirm root password. To test this logout from current session and try to login using root as user and password that you have just assigned.

 

How to know which port MySQL is running on – Ubuntu

To find a listener on a port, do this:

You should see a line that looks like this if mysql is indeed listening on that port.

 reference: stackoverflow.com

Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration

Apache shows this error message when you don’t have mod_rewrite enabled. To enable it follow below steps

1. cd to apache2 (usually in cd /etc/apache2 )

2. enter this command – sudo a2enmod rewrite

3. now restart the apache service – sudo service apache2 restart

That’s it !

 

PhpMyadmin is not working after installation on Ubuntu

I have installed Phpmyadmin on  my Ubuntu Server, but while accessing it I am getting

The requested URL /phpmyadmin was not found on this server.

Error message, I have found following solution which worked for me.

  1. Add the following line to the end of of file /etc/apache2/apache2.conf:
  2. to add this line enter this command  sudo nano /etc/apache2/apache2.conf
  3. Include /etc/phpmyadmin/apache.conf

  4. Restart Apache by giving this command on the command line:sudo /etc/init.d/apache2 restart

(As an alternative to step 2, you can command

)