Red Crackle Blog

How to kill an unresponsive process in Unix

I am sure you would have come across Windows' processes that hang. And I am sure you know what to do. CTL + ALT + DEL and kill the process using the Task Manager. In this article, we'll how to do that on Unix using command line.

Here are the steps:

1) See the PID of the process that has hung and you want to kill. Execute the following command in the terminal.

ps aux

This command will list all the processes running on your system. Here is the format:

How to use Drupal 7 with MySQL master-slave setup

Drupal 7 has made it very easy to use it with MySQL master-slave setup. Assume that we have 3 MySQL servers configured in master-slave mode. In this article, we'll show you how to configure Drupal's settings.php so that it uses the three MySQL servers.

In settings.php, start with the MySQL master configuration. Replace mysql-master-db, mysql-master-username, mysql-master-password and mysql-master-IP with the appropriate details of your MySQL master.

How to set up Percona XtraDB Cluster on Ubuntu

Using Percona XtraDB Cluser with at least 3 nodes is a good option when you want to use MySQL in a high-availability mode. The advantage is that even if one of the nodes goes down, the application will still be able to read and write to the MySQL database. In this article, we'll show you the steps to install Percona XtraDB Cluster 5.6 on Ubuntu 12.04. Here are the steps:

1) Percona packages are signed with a key. First we need to add the key to apt. Execute the following command on all the three servers.

How to connect to GlusterFS from a client machine

This article is for those users who already have GlusterFS server installed. In the article, we demonstrate how to connect to GlusterFS server from a client.The example shown in the article first installs GlusterFS native client 3.5.2 on Ubuntu 12.04. After this, a series of command line prompts are executed to connect to the GlusterFS server from a client. Add GlusterFS PPA and install its client library. A directory will also be created on the client machine from where GlusterFS will be mounted.Don't forget to replace parameter names with local ones While using the code provided in the article.

How to change location where MySQL stores data on disk

Most developers who install MySQL via apt-get on Ubuntu will know that it comes with pre-defined settings. The directory where MySQL stores its data is one such setting. The default location is /var/lib/mysql. There are times when this location will have to be changed. But a lot of developers face difficulty in this regard. This article will guide you through the process. Use the command line prompts provided in the article to arrive at desired results. After you have completed the steps mentioned in this article, make sure you restart MySQL. And voila, MySQL will use the new directory specified by you to store data.

How to cache pages by role in Varnish

Varnish is generally used to cache pages for anonymous users. It is also used to cache pages by role. At Red Crackle, we deploy Varnish to cache pages by role for corporate sites that are exclusively visible only under SSO. This ensures all users are authenticated but there is no user related information present on most of these pages. This article explains how Varnish caches pages and how configuration can be altered to cache pages by role. The article uses hook_init() to set a cookie that identifies user roles. hook_user_logout() is then used to remove the cookie as soon as the user logs out.

 
Ready to get started?REQUEST A QUOTE