CentOs

CentOS 5 - sudo vi - What happened to my colors?!?

So this was bugging me for a while. Finally I decided to figure out what the heck was going on.

Whenever I wanted to edit a config file while not being logged in as root, I would sudo vi it but all the pretty colors would disappear. If I vi'd it directly without sudo, my vim profile would kick in and the colors would be there. If I logged in as root or su - and then edit the file, the pretty colors would be there....

So I then typed:

[root@lunch ~]# which vi
alias vi='vim'
/usr/bin/vim
[root@lunch ~]# sudo which vi
/bin/vi
[root@lunch ~]#

Setting up GitWeb (A Git Web Interface)

Git comes with a pretty nice repository browser that is pretty easy to setup.

You can see an example here:
http://git.kernel.org/

Building git automatically creates everything you need.

Detailed installation instructions are in the INSTALL document of this folder, but a simple install can be done as follows:

Let's assume you want to create a virtual host named git.yourdomain.com (for your site, replace all git.yourdomain.com below with your site name).

Building, Installing and Sharing a Repository with Git 1.7

Prerequisites:
packages gcc, zlib-devl, and perl-ExtUtils-MakeMaker, and python-devel must be installed.

yum install gcc
yum install zlib-devel
yum install perl-ExtUtils-MakeMaker
yum install python-devel

First, let's build git. I am assuming you want it installed for all users so let's switch to root and build it:
su -
cd /usr/local/src
wget http://kernel.org/pub/software/scm/git/git-1.7.1.tar.gz
tar xvfh git-1.7.1.tar.gz
cd git-1.7.1
./configure
make
make install

Now, verify the install:
git --version

You should see:
git version 1.7.1

Getting Trac 0.11.7 Installed on CentOs 5.4 is Painful

So I just went through a few hours of pain moving Trac from my old faithful FC 6 (3 years uptime!!!) to Centos 5.4. I tried to battle SELinux for a while, but finally surrendered to it as I will discuss later.

Problem 1: ImportError: No module named genshi
Problem 2: Permission denied: 'path-to-trac-projects/projectname/VERSION'

Problem 1 occurred because I installed Genshi before installing python-devel.
The installation will go fine if you don't, but
YOU HAVE TO INSTALL PYTHON-DEVEL FIRST OR YOU WILL FACE THE SAME PAIN.

Syndicate content