Archive

Posts Tagged ‘Centos’

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 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 Java JRE on Centos 5.2

February 17th, 2009 No comments

Download the rpm for JRE from Sun, at the time of writing this – https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jre-6u12-oth-JPR@CDS-CDS_Developer

I use tunnelier sftp function to transfer this over to the centos machine.

Change the permissions

chmod 755 jre-6u12-linux-x64-rpm.bin

Install it

rpm -Uvh –nodeps jre-6u12-linux-amd64.rpm

I used –nodeps because I got this error and when googling found advice that suggested this was the way forward. 

error: Failed dependencies:

        java-gcj-compat is needed by (installed) antlr-2.7.6-4jpp.2.x86_64

        java-gcj-compat >= 1.0.64 is needed by (installed) gjdoc-0.7.7-12.el5.x86_64

        java-1.4.2-gcj-compat = 0:1.4.2.0-40jpp.115 is needed by (installed) java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115.i386

        java-1.4.2-gcj-compat = 0:1.4.2.0-40jpp.115 is needed by (installed) java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115.x86_64

        /usr/bin/rebuild-gcj-db is needed by (installed) eclipse-ecj-3.2.1-19.el5.centos.x86_64

Set some environment variables in /etc/profile

vi /etc/profile

The following has to be entered before the unset pathmunge statement.

JAVA=”"

export JAVA=”sun”

export JPATH=”/usr/java/jre1.6.0_12″

export JAVA_HOME=”$JPATH”

export CLASSPATH=”$JPATH/bin”

pathmunge $JPATH/bin before

Log out to refresh your environment and java -version should now reflect the new java package.



Categories: Centos 5.2 Tags: ,

A Good Centos System Administration Book

February 3rd, 2009 No comments

I have been a big fan of the unleashed guides every since I purchased Mac OS X Tiger Unleashed. I loved this book as it was both great for beginners but had some reallly good advanced sections that allowed me to learn some great stuff on mac os x.

So, naturally, when I was looking for a guide to Centos, I purchased another unleashed book. As you probably know, Red Hat Enterprise Linux (RHEL) and Centos are basically the same product, minus the proprietary Redhat pieces and non GPL pieces that are not legally available for free. CentOS takes the GPL portions and repackages them as CentOS. This logically led me to Red Hat Enterprise Linux 5 Administration Unleashed. I found this to be a decent book that is great starting point for using Centos, though not as advanced as I would have liked.





Anyone have any suggestions for an advanced system admin book for Centos?