Version Control & Packaging

Install PHP-APC on CentOS

  1. Yum up some packages:
    yum install php-pear php-devel httpd-devel
  2. Install APC using pear (the pear installer is smarter than the pecl installer):
    When the installer asks about APXS, say ‘no’. 
    pear install pecl/apc
  3. Tell PHP to load APC:
    echo extension=apc.so > /etc/php.d/apc.ini
  4. Edit the file /etc/php.d/apc.ini, and add the following lines:
    apc.ttl="7200"
    apc.user_ttl="7200"
    apc.shm_segments="3"

Create CentOS PHP RPM

YUM Prerequisites

Before we start, we need to have all the dependencies installed:

Newer Software Versions in CentOS

In general, the software version in CentOS are behind. It's just the way CentOS and Red Hat operate. They aim for long term support and stability.

But if you have to use a newer software package, you may find that some newer packages in CentOS's test repository, as listed in this page Available Repositories for CentOS. For CentOS 5 testing packages, you can find them in http://dev.centos.org/centos/5/testing/.

YUM Download Source RPM

How do I yum install SRPM from CentOS/Red Hat site, instead of manually download the srpm from one of the ftp website?

Install yum-utils

# yum install yum-utils

Yum and RPM Tips

Get the dependency

If the package is already installed, use "rpm -qR <package-name>" to get the list of packages that this package depends on. For example:

$ rpm -qR openldap

If the package is not yet installed, use "yum  deplist <package-name>" to get the list of packages that this package depends on. For example:

Signing RPM Packages

The chapter Signing Packages in Maximum RPM explains clearly on how to sign RPM packages.

There are a few things to note though. In the page http://www.rpm.org/max-rpm/s1-rpm-pgp-getting-ready.html, it asked to put the gpg key name name path into rpmrc. This has changed. You have to put the following into ~/.rpmmacros:

Create Local Repository

Prepare GPG key

 

Create the repository

This will show you how to create the repository over http.

First create directory structure on the server, say server1:

[root@server1 ~]# mkdir -p /var/www/repo/CentOS/4/local/i386/RPMS

If createrepo is not already installed, as it will not be by default, install it.

Git Server on Gentoo

Installation

To install the Git version control system on a Gentoo server, follow the steps below:

Checking Rails Project into Subversion

The book "Rails Cookbook" has a wonderful section on "Getting Your Rails Project into Subversion".

In short, here are the steps: