Archive

Archive for the ‘Centos 5.2’ Category

Upgrade OTRS 2.3.4 to OTRS 2.4.1-01 using OTRS rpm’s on Centos

July 24th, 2009 No comments

OTRS is an Open source Support Ticket System, its fairly easy to setup and has the ability to receive emails and add them automatically as tickets.

Personally I like its flexibility and they have just released OTRS 2.4.1 (Aitutaki – One Foot Island, Cook Island) which improves alot of its flexibilty.

It has great documentation at  http://doc.otrs.org/2.4/en/html/

I have version 2.3.4 installed and I want to upgrade it to the latest version OTRS 2.4.1.

Download the rpm

wget http://ftp.otrs.org/pub/otrs/RPMS/fedora/4/otrs-2.4.1-01.noarch.rpm

Change the permissions.

chmod 777 otrs-2.4.1-01.noarch.rpm

Run the rpm upgrade.

rpm -Uvh otrs-2.4.1-01.noarch.rpm

Upgrade the database Part 1

MySQL

cat /opt/otrs/scripts/DBUpdate-to-2.4.mysql.sql | mysql -p -f -u root otrs

PostgreSQL

cat /opt/otrs/scripts/DBUpdate-to-2.4.postgresql.sql | psql otrs

Run the migration script as OTRS user.

su otrs

/opt/otrs/scripts/DBUpdate-to-2.4.pl

I got this error and ignoreed it.

Message: Need Type!

Traceback (10973):

Module: Kernel::System::NotificationEvent::NotificationAdd (v1.2)

Module: main::MigrateCustomerNotification (v1.6) Line: 218

Module: /opt/otrs/scripts/DBUpdate-to-2.4.pl (v1.6) Line: 99

Update the database Part 2

MySQL

cat /opt/otrs/scripts/DBUpdate-to-2.4-post.mysql.sql | mysql -p -f -u root otrs

PostgreSQL

cat /opt/otrs/scripts/DBUpdate-to-2.4-post.postgresql.sql | psql otrs

Restart httpd and mysqld

service httpd restart

service mysqld restart

Restart otrs service

service otrs restart

Goto your otrs installation http://localhost/otrs/index.pl

Categories: Centos 5.2, Open Source Tags:

How To Install Suns VirtualBox tools on a Centos Virtual Machine

July 22nd, 2009 No comments

If you get the error

Could not find the Linux kernel header files – the directories
/lib/modules/2.6.18-128.el5/build/include and /usr/src/linux/include
do not exist.

Then you need to install the following packages.

yum install kernel sources

yum install kernel-devel

yum install gcc

Create the following link

ln -s /usr/src/kernels/2.6.18-92.1.18.el5-i686 /usr/src/linux

And now you should be able to run.

sh VBoxLinuxAdditions-x86.run

Source of this tip – http://forums.virtualbox.org/viewtopic.php?f=6&t=16721

Categories: Centos 5.2, Command Line, VirtualBox Tags:

How To Turn Off Overwrite Request on when you copy in Centos

July 15th, 2009 No comments

When copying a folder in centos, it interactively asks if you want to overwrite a file, the -f flag does not work.  Simple solution, use \cp.

How to Find Large Files using Linux Command Line

May 7th, 2009 No comments

find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’

or

find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’ > filelist.txt

To put the results in a text file.

Found here, a good resource for command line stuff – http://snippets.dzone.com/posts/show/1491

How to Install Tracks 1.7 on Centos 5.2

April 5th, 2009 No comments

 

Install Ruby on Rails – Use http://www.how-to-linux.com/2008/12/how-to-install-ruby-on-rails-on-centos-52/

Create a database for Tracks

mysql -u root -p

create database tracks;

exit

Download Tracks from http://bsag.bingodisk.com/public/files/tracks-current.zip

Unzip the Tracks archive

unzip tracks-current.zip

Put tracks into /opt

mv tracks-1.7 /opt

Edit /opt/tracks-1.7/config/database.yml

vi /opt/tracks-1.7/config/database.yml

Add you mysql server details

production:

  adapter: mysql

  database: tracks

  hosts: localhost

  username: root

  password: neveruserrootpassword

Change a config in site.yml

vi /opt/tracks-1.7/config/site.yml

Add something unique in the salt parameter.

Add the Tracks data to the database

rake db:migrate RAILS_ENV=production

If you get this error;

no such file to load — mysql

Download ruby-mysql – http://rubyforge.org/frs/?group_id=4550

tar mysql-ruby-2.7.tar.gz

cd mysql-ruby-2.7

ruby extconf.rb –with-mysql-config

make

make install

Now run the server

script/server -e production

Goto http://localhost:3000

How To Fix Yum When It Hangs With No Error Message

April 1st, 2009 No comments

Yum on one of my centos boxes simply would not work.  Once you entered a yum command such as;

yum clean all

yum upgrade

it hung and would not work.

Apparently I needed to remove the __db.* in /var/lib/rpm

rm -f /var/lib/rpm/__db.*

See this link for more info - http://www.serpentine.com/blog/2007/01/04/dealing-with-yum-hangs-on-fc6/

Categories: Centos 5.2 Tags: ,

How To Open Port 80 on Iptables on Centos

March 18th, 2009 No comments

Edit /etc/sysconfig/iptables:

vi /etc/sysconfig/iptables

Add the following line

-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

Save and restart iptables.

service iptables restart

Categories: Centos 5.2 Tags: , ,

How To Install Elgg 1.5 on Centos 5.2

March 18th, 2009 No comments

You will need to update the repositories so you can get php 5.2

vi /etc/yum.repos.d/utterrambling.repo

Add

[utterramblings]

name=Jason’s Utter Ramblings Repo

baseurl=http://www.jasonlitka.com/media/EL5/i386/

enabled=1

gpgcheck=1

gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

Change the baseurl to http://www.jasonlitka.com/media/EL5/x86_64 if 64 bit.

Install the necessary packages

yum install mysql-server httpd php php-mbstring gd php-gd php-mysql

Get Elgg

wget http://elgg.org/getelgg.php?forward=elgg1.5.tar.gz

untar it

tar xvfz elgg1.5.tar.gz

put in /var/www/html

mv elgg1.5 /var/www/html

Change the permissions

chown -R apache.apache /var/www/html/elgg1.5/

Create the data folder

/var/www/data
chmod 777 /var/www/data

Create the database

mysql -u root
create database elgg;
exit

Goto /etc/httpd/conf/httpd.conf and edit it.

Find   <Directory “/var/www/html”> and then change

AllowOverride None

to

AllowOverride All

Goto http://yourserver/elgg1.5/ and install the ap.

Source of instructions – http://docs.elgg.org/wiki/Installation

Categories: Centos 5.2, Elgg Tags: ,

How to Install a Puppet Master and Client Server on Centos 5.2

February 21st, 2009 No comments

Puppet is an open-source next-generation server automation tool. It is composed of a declarative language for expressing system configuration, a client and server for distributing it, and a library for realizing the configuration.

Setup the EPEL repos for Centos – choose the correct package depending on  your installation.

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm

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

Install puppet-server

yum install puppet-server

The 1.8.5 branch of Ruby shipped will RHEL5 can exhibit memory leaks. So install ruby 1.8.6++ (I did not on this server as it was  test not a production server).

Install the help docs

yum install ruby-rdoc

Create a manifest file at /etc/puppet/manifests/default.pp

vi /etc/puppet/manifests/default.pp

put this in it

# Create “/tmp/testfile” if it doesn’t exist.

class test_class {

    file { “/tmp/testfile”:

       ensure => present,

       mode   => 644,

       owner  => root,

       group  => root

    }

}

# tell puppet on which client to run the class

node pclient {

    include test_class

}

Start the puppet server

service puppetmaster start

Enable start on boot

chkconfig puppetmaster on

Now to install the Puppet Client on another server

Setup the EPEL repos for Centos – choose the correct package depending on  your installation.

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm

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

Install puppet

yum install puppet

Setup puppet client to generate its own certificate request to the server

/etc/init.d/puppet once -v

Sign the certificate request on the puppet master server.  Use puppetca –list to see if any are available to sign.

puppetca –sign puppet01

Puppet01 must be the fully qualified domain name (FQDN) of you client server.

Run this on the client server again to retrieve the certificate

/etc/init.d/puppet once -v

Make the puppet start with the system

chkconfig puppet on

Make sure it is working on the client server.

puppet –test

You should see a dialog that creates the file /tmp/testfile

Install Zenoss 2.3.2 Stack Installer on Centos 5.2

February 19th, 2009 No comments

This is on a fresh install of Centos 5.2 64 bit.  Base install with no additional packages.  SELinux is disabled.

Download zenoss the full stack install (this is for 64bit)

mkdir ~/src

cd ~/src

wget http://nchc.dl.sourceforge.net/sourceforge/zenoss/zenoss-stack-2.3.2-linux-x64.bin

Change the permissions

chmod +x ./zenoss*.bin

Run the install

./zenoss*.bin

By default, the package is installed in the /usr/local/zenoss directory.  Enter a password for the root user of mysql.

Open ports on iptables

vi /etc/sysconfig/iptables

Add the following

#zenoss rules

-A RH-Firewall-1-INPUT -p tcp -m tcp –dport 8080 -j ACCEPT

-A RH-Firewall-1-INPUT -p udp -m udp –dport 514 -j ACCEPT

-A RH-Firewall-1-INPUT -p udp -m udp –dport 162 -j ACCEPT

#zenoss rules

Restart iptables.

service iptables restart

Login webadmin

http://<zenoss computer>:8080/

user – admin

password – zenoss

If you need to restart zenoss, use

 

service zenoss-stack restart








Categories: Centos 5.2, Zenoss Tags: