Error   test

Archive for the ‘Linux’ Category

Versioning Configuration Files

Posted July 27, 2007 at 05:07am in Computers, Linux

This topic has been discussed on other websites, however I have not read them yet I just remember seeing them. I have, in the past, changed configuration values and then later found I had better performance before I changed what I did. Rolling back can be difficult when you are doing a lot at once. A way around this is to start a subversion repository for system directories. This is something you will want to do as root to so that security is very restrictive. Also keep in mind this is the directory structure on a CentOS/RHEL 5 Box your distro may be different.

svn create /root/repo/config

svn co file:///root/repo/config /etc

cd /etc

svn add -N httpd/
svn add httpd/conf/
svn add httpd/conf.d/
svn add postfix/
svn add hosts
svn add hosts.deny
svn add hosts.allow
svn add php.d
svn add pear.conf
svn add my.cnf
svn add php.ini

svn commit

chmod 700 /root/repo/config

When adding the httpd directory you need to add the -N so that run, modules, and logs symlinks to not get added, then you add the conf and conf.d directories manually. The hosts files may seem strange, but if someone was to get in that might be a file they would want to modify. If it is modified you can simply do a svn status on the directory and see what has gone on. The last entry is so that only the root user can access any of the files. That means unless you are root or you can sudo you cannot check out or commit to that repository.

It might be a good idea to run a svn commit as a cron on the directory so any changes that are made will be updated and can be compared later. I would also recommend not adding any files that include passwords, for obvious reasons. If for some reason you submit a file with a password by accident run the svnadmin dump command, then do a search and replace in the dump file. After you have done that delete the repository on the server and create a new version off the dump file.

Installing PHP v5 and MySQL v5 on Redhat Enterprise Linux 4 (RHEL4)

Posted July 20, 2007 at 04:07am in Computers, Linux

The FTA project is using a managed dedicated server from Rackspace for the production server. The server is running PHP4 and MySQL 4, and unfortunately the site was built using PHP5 and the extensions that come with it. I am new to Redhat and did not feel comfortable upgrading components of other software so that I could compile. I did find the RPMs for PHP v5.1.6 in the CentOS Plus repository and the JSON extension in the Clyde Family repository. These are the instructions I used in the order I used them and I had a 100% flawless installation/configuration.

Download RPMs from repositories

http://mirror.centos.org/centos/4/centosplus/i386/RPMS/
http://www.clyde-family.org/el4/RPMS/

Test that you have all dependancies, anything after the “Preparing…” line is a conflict

rpm -ivh --test *.rpm

Check the what packages you have installed

rpm -qa | grep php

php-imap-4.3.9-3.22.5
php-odbc-4.3.9-3.22.5
php-4.3.9-3.22.5
php-gd-4.3.9-3.22.5
php-ldap-4.3.9-3.22.5
php-mysql-4.3.9-3.22.5
php-pear-4.3.9-3.22.5
php-domxml-4.3.9-3.22.5
php-mbstring-4.3.9-3.22.5
php-pgsql-4.3.9-3.22.5
rpm -qa | grep mysql

mysql-4.1.20-2.RHEL4.1
mysql-devel-4.1.20-2.RHEL4.1
mysql-server-4.1.20-2.RHEL4.1

Uninstall each package

sudo rpm -e --nodeps package-name

I also found this method but did not try it.

rpm -qa | grep -i php | grep 4.3.9 | xargs rpm -e -–nodeps
rpm -qa | grep -i mysql | grep 4.1.20 | xargs rpm -e -–nodeps

Then test one last time for conflicts

rpm -ivh --test *.rpm

Then install all rpms in the current directory

rpm -ivh *.rpm

The /etc/my.cnf.rpmsave file should be fine in most cases (I believe), but you will want to do a compare of /etc/php.ini and /etc/php.ini.rpmsave.

Slackware v12.0

Posted July 2, 2007 at 07:07pm in Computers, Linux

I just happened to visit the Slackware site today and noticed version 12.0 was released. This release has some great features, not that Slackware wasn’t already great. This release includes PHP 5.2.3, Python 2.5.1, Ruby 1.8.6, Subversion 1.4.4, Kernel 2.6.21.5, KDE 3.5.7 and many more. In the past Slackware has always tended to stay with some of the older packages, but all of those are the most recent releases. I doubt that the use of the latest packages will make it more buggy or turn users away. I think it will bring a larger user base into the Slackware community. I can’t wait to throw this on the laptop.

Muslim Linux

Posted April 1, 2007 at 02:04am in Arabic, Linux

Since I am planning on learning Arabic, I found this to be extremely cool, Ubuntu Muslim Edition. It is a version of Ubuntu that has applications for learning Arabic along with the Quron and prayer times. I am going to try it out sometime next week and I will let you know what type of benefits there are for the non-Arabic speaking user.

I am really happy to see all these awesome distributions that have been coming out that are centered around a certain purpose. Last night I created 5 virtual machines so I can separate my development from my desktop. I have a Python Dev, Ruby Dev, .net Dev, Linux Server, Junk testing box. So now I have a separate purpose for each one and I can limit the use to just that making my life a little easier…I think.

Just tried out Ubuntu Server

Posted April 1, 2007 at 02:04am in Linux

I just finished installing and playing around with Ubuntu v6.06.1 Server. It is a little older but pretty decent. It is a really quick way to get a LAMP server up and running without much effort or hassle. I have never been much of a fan of Ubuntu and that could be for a lot of reasons, but the server is going to be a huge help to those wanting to get a LAMP server running quick.

I have not spent much time with Ubuntu Desktop A) because it is Gnome and I don’t enjoy Gnome much and B) most of the applications have to be downloaded and I am unfortunately on dialup in my current location. I can’t forget reason C) Slackware is God