centos

Installing Rails 3 with JRuby on CentOS Linux

There are many benefits of using JRuby with Rails, among others: great thread-support via JVM, easy integration with the vast amount of functionality provided by existing Java libraries, streamlined database access and deployment. We have blogged about installing latest Rails with native Ruby and NginX.

Installing and Configuring Clojure on CentOS 5

Make sure you have epel Yum repo installed, if you don't:
$ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
Please note that the above instructions are for a 64-bit architecture, on a 32-bit architecture:
$ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Make sure you have working version of JDK 6 (including the compiler), if not install it by running:
$ sudo yum install java-1.6.0-openjdk-devel
Proceed with the installation of leiningen "a build tool for Clojure designed to not set your hair on fire":
$ sudo yum install readline rlwrap
$ cd /usr/local/bin
$ sudo wget https://github.com/technomancy/leiningen/raw/stable/bin/lein --no-check-certificate
$ sudo chmod 775 lein
$ lein
First run of "lein" will download all the required stuff and display help, after which you can run interactive shell with simply:
$ lein repl

Installing Ruby On Rails 3 on CentOS with Nginx

This tutorial assumes that you are working with the local account on CentOS 5.x and sudo into root as necessary.

Configuring Yum

Yum is a popular package manager for CentOS and RedHat Linux distributions. Unfortunately, standard Yum repositories carry significantly outdated packages. Fortunately, there are third-party Yum repositories with more updated LAMP packages which we can use. One such repository is provided and hosted by RackSpace itself.

Installing MongoDB On CentOS or Fedora with Yum

The best way to install MongoDB on yum-enabled Linux distributions (CentOS or Fedora) is through yum package manager. MongoDB.org provides repositories (depending on your OS and CPU architecture) that you should add to your list of yum repos:
http://www.mongodb.org/display/DOCS/CentOS+and+Fedora+Packages

Once you have the repository properly installed under /etc/yum.repos.d you can install the latest stable mongoDB release with:

sudo yum install mongo-stable-server

which will actually install both the server and the client (since client is set as a dependency).

Once installed MongoDB can be started with:

sudo /etc/init.d/mongod start

Further, if you need to Mongo-enable your PHP just run:

sudo pecl install mongo

and follow instructions.

Reliable Yum Repo for Easy Upgrades to the Latest Packages, on RedHat and CentOS

Yum is a great update manager for RedHat/CentOS Linux. Unfortunately, default repos are typically way behind the stable releases of the packages contained in them. If you need to install PHP, MySQL, Python or other major package, you will find that the versions in default repos are old to the extent of being useless. This used to force Yum users to resort to third-party repositories and many open-source volunteers have hosted latest versions of packages as yum repositories, helping and assisting the community.

While most efforts were noble and honest contributions, it's always tricky to install packages from unknown sources. The dark fear of "what if" will nag you and your security team (if you have one) will point you to the door. Now there's a good solution, however. One of the most trusted names in the industry, Rackspace hosting now has a Yum repo for popular RedHat packages.

The wiki documentation for how to install and use it can be found at: http://wiki.iuscommunity.org/Doc/ClientUsageGuide

Install Ruby 1.9 on CentOS

Unfortunately, CentOS 5.5 comes with a very old version of Ruby: 1.8.5. Even the latest rubygems require at least 1.8.6 to install. To make things more dire, centos-test and rpmforge yum repos do not carry a more up-to-date Ruby version.

If you are fine upgrading to just 1.8.6, and want to use Yum, see my blog post: Installing Ruby 1.8.6 on CentOS with Yum, otherwise following is how to install Ruby 1.9.2 from sources:

Tutorial: Installing Django 1.1. on CentOS 5.4

This step-by-step tutorial walks you through the installation of Django 1.1 with Apache and MySQL. on CentOS 5. The example VPS used during the walk-through is the popular SliceHost from RackSpace ™ The steps involved should be quite similar for any properly installed CentOS 5.x (or RedHat EL 5.x).

We use the latest stable version of Python: 2.6 and mod_wsgi (far superior alternative to mod_python), in this tutorial. Django is not, yet, compatible with Python 3.x branch (few things are).

Installing Webmin Securely with SSL on CentOS 5.2

# yum install openssl
# yum install openssl-devel
# yum install perl
# yum install perl-Net-SSLeay perl-Crypt-SSLeay
# rpm --import http://www.webmin.com/jcameron-key.asc

Create the /etc/yum.repos.d/webmin.repo file containing :

[webmin]
name=Webmin Distribution Neutral
baseurl=http://download.webmin.com/download/yum
enabled=0

Then run:

# yum --enablerepo=webmin install webmin

Check installation success with:

/etc/init.d/webmin status

If everything is good and webmin is running access it via:
https://yourdomain.com:10000/

Upgrading Subversion to 1.5 on CentOS 5.2 Using Yum

Default CentOS 5.2 yum repositories are still on Sybversion 1.4.x branch, so if you need the latest Subversion client, you are out of luck... or not, if you read this blog post :) This quick tutorial will show you how to upgrade in less than 5 minutes.

We will use RPMForge repos for the upgrade.

  • Download and install proper RPMForge repo RPM for your server architecture (64bit or 32bit) from RPMForge website.
  • Edit /etc/yum.repos.d/rpmforge.repo and change enabled=1 to "0". We do not want this repo to be enabled by default, because an accidental "svn update" will update all your packages to bleeding-edge, test-quality versions. RPMForge has many experimental rpms.
  • Run: yum --enablerepo=rpmforge check-update subversion and make sure the version of subversion you are looking for is available. It should show you something like:

Install PHP 5.2 on CentOS 5.2 Using Yum

Yum is a standard installation utility for CentOS 5.2. One of the reasons I favor CentOS over other Linux distros is actually because it comes with yum. It is that good!

Unfortunately, CentOS 5.2 does not generally include the latest versions of libraries, because it follows conservative path of the RedHat Enterprise. Which is not that bad of an idea, for a server OS... until you need that latest version of something and you are stuck... or: not necessarily.

If you a are a Drupal developer, there's a very good reason why you need the latest version of PHP: 5.2. The reason is called FileField module. This module is required by another absolutely essential module ImageField making it a matter of life-or-death (just kidding) to have PHP 5.2 on your server. But the latest CentOS release (ironically also 5.2) only comes with PHP 5.1.6.

What to do?

Syndicate content