How To

How To Setup php-fpm And Nginx On CentOS 6

FPM, FastCGI Process Manager is a PHP FastCGI implementation. Using php-fpm you can have a website running as its own user instead of a common user like Apache or www-data. In this post, we will go through the process of installing and configuring php-fpm with Nginx on CentOS 6.

php-fpm package is available in the official CentOS repository. There is no need to enable third party repositories in order to use php-fpm.

nginx package is available in Fedora EPEL repository.

Enable Fedora EPEL.
 

Taxonomy upgrade extras: 

How To Setup MySQL Replication

In this tutorial, I will provide step by step process to setup MySQL replication. We will create one master and one slave. We will use two CentOS 6 servers - one for master and the other for slave. This following steps have been tested on two virtual machines.

Our master server will have IP address 192.168.122.10.
Our slave server will have IP address 192.168.122.12.

You might want to run SELinux in permissive mode.

Perform these steps on the master:

Install MySQL server.

yum install mysql-server -y

Installing Redmine With MySQL And Nginx On CentOS 6

Redmine is a software project management tool which has Wiki, issue tracer, source code browser and other cool features built in. If you want to install Redmine with MySQL and Nginx on CentOS 6, follow these steps.

I always use EPEL repository with CentOS. EPEL provides additional RPM packages. We can use Nginx and some Ruby gem packages from EPEL.

Enable EPEL:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Install required packages:

yum install nginx mysql-server ruby rubygem-rack rubygem-rake ruby-mysql

Redmine requires a Ruby gem called i18n. I couldn't find the RPM for i18n gem. I had to install i18n gem using the gem installer.

gem install -v=0.4.2 i18n

Start MySQL server:

/etc/init.d/mysqld start

Use the MySQL secure installation program:

mysql_secure_installation

Connect to the MySQL server as root:

mysql -u root -p

Create a MySQL database and user for Redmine:
mysql> CREATE DATABASE redmine character set utf8;
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'secret_password' WITH GRANT OPTION;

Writing A Python Script To Send Files To Amazon S3

Amazon Simple Storage Service or Amazon S3 is a storage service with a web API. I use Amazon S3 to store backups of my blog and other sites. I made a simple python script to handle file uploads to S3.

In order to use Amazon S3, first create a bucket using your Amazon AWS account. As the name suggests, bucket is a container. You can create buckets using the AWS management console.

The script we're going to write will take two input parameters

  1. Path to file, local
  2. Target S3 path

How To Install And Configure Nagios On CentOS

Nagios is a popular networking monitoring software. Nagios lets you monitor your IT infrastructure, be it servers, routers, switches or other devices. In this post, I will walk you through the steps of installing and configuring a basic setup of Nagios on CentOS.

At the end of the tutorial you will be have a working Nagios setup to monitor

  • local disk space usage
  • local system load
  • an external website

Whenever there is a problem or recovery with any of the above, Nagios will alert you via email.

Unless you have a strong reason to compile Nagios yourself, you should use the binary packages available for your Linux distribution.

RPMForge provides packages that are not included in CentOS repositories. We will use the Nagios packages from RPMForge.

Enabling RPMForge repository

For 32 bit machines use these commands:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm

For 64 bit machines use these commands:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

Installing And Configuring Nagios

How To Get Broadcom BCM4312 Wireless To Work In Fedora

Broadcom provides Linux drivers for most of its wireless chipsets. Prior to the release of official drivers from Broadcom, the open source software community had various workarounds. Some people used Windows drivers through ndiswrapper. Others used fwcutter.

The RPM Fusion Repository for Fedora offers the Broadcom wireless drivers from its repositories. You can install them using yum.

Step 1: Enable the RPM Fusion repositories

rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

Taxonomy upgrade extras: 

How To Play Music And Video In Fedora

How to play music and video(MP3, MPEG, AVI, FLV and other multimedia files) in Fedora 12?

Due to patent encumbrance codecs required to play some proprietary file formats are not shipped with Fedora. Codecs are the programs that encode and decode digital data. These codecs are available in the rpmfusion repository for Fedora. You will be able to play mpeg, mp3, avi, flv and other commonly used file formats for music and video. You will require an Internet connection to download and install these packages on your computer.

video movie playing in gnome mplayer fedora 12 screenshot

Let us get started. Are you ready?

Taxonomy upgrade extras: 

Create RESTful Applications Using The Zend Framework

The Zend Framework 1.9 release added a new feature - Zend_Rest_Controller. Zend_Rest_Controller and Zend_Rest_Route classes go hand in hand. In the previous versions of the Zend Framework, we have had the Zend_Rest_Server component. We still have. Since Zend_Rest_Server provides an RPC like component violating the REST architectural constraint, it is likely to be deprecated in the future versions of the Zend Framework.

FOSS Project: 
Content Type: 

Pages