Posts Tagged ‘CentOS’

Lighttpd + mod_magnet on CentOS (64 bit)

Tuesday, August 18th, 2009

After about an hour of tinkering around on google and in the terminal here is what you need to do:

wget http://www.lua.org/ftp/lua-5.1.2.tar.gz
tar xfz lua-5.1.2.tar.gz
cd lua-5.1.2
nano src/Makefile

Replace:

 CFLAGS= -O2 -Wall $(MYCFLAGS) 

With:

 CFLAGS= -O2 -Wall -fPIC $(MYCFLAGS) 
make linux install

wget http://luaforge.net/frs/download.php/2384/md5-1.0.2.tar.gz
tar xfz md5-1.0.2.tar.gz
cd md5-1.0.2
make
make install
cd ..
wget http://luaforge.net/frs/download.php/1678/luazlib-0.0.1.rar

wget wget http://www.rarlab.com/rar/unrar-3.7.7-centos.gz
gunzip unrar-3.7.7-centos.gz
chmod +x unrar-3.7.7-centos
./unrar-3.7.7-centos x luazlib-0.0.1.rar
cd luazlib-0.0.1
make
make install

export LUA_CFLAGS="-I/usr/local/include"
export LUA_LIBS="-L/usr/local/lib -llua"

cd LIGHTTPD_DIRECTORY
./configure -with-lua
make
make install

All done!

Thanks to:
http://gadelkareem.com/2007/09/17/dynamic-content-caching-using-lighty-mod_magnet-lua/ && http://www.verlihub-project.org/doku.phpid=howto_install_lua_library_on_64_bit

Interesting Loopback Device issue on CentOS

Monday, August 3rd, 2009

Was playing around with using the loopback devices to mount some OS images on CentOS and following the losetup followed by a mount command would indeed mount the image, but umount wouldn’t unmount it and would leave it stagnant, leaving me with this error:

ioctl: LOOP_CLR_FD: Device or resource busy

Interestingly enough though the lomount command

lomount -diskimage OS.img -partition 1  /MOUNTFOLDER

and then using umount to unmount the mountfolder would unmount the loopback device properly and free it for re-use.

Hope this helps someone!

CentOS w/out Yum

Friday, September 5th, 2008

Took me about 20 minutes to figure out why this wasn’t working when installing yum:

After you follow the instructions at http://wiki.centos.org/TipsAndTricks/BrokenVserver
You get to the part where your trying to install rpm-python. This doesn’t work quite as you’d hoped.Â

Error:

# rpm -Uvh rpm-python-4.4.2-48.el5.i386.rpm

warning: rpm-python-4.4.2-48.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897

error: Failed dependencies:

        rpm = 4.4.2-48.el5 is needed by rpm-python-4.4.2-48.el5.i386

So clear all the other RPM’s you installed, download these three from the repository (varies if your using 64 bit or i386)

rpm-4.4.2-48.el5.i386.rpm    rpm-python-4.4.2-48.el5.i386.rpm

rpm-libs-4.4.2-48.el5.i386.rpm Â

Make sure all these are present then run:

rpm -Uvh *.rpm

 This will install the libs and the RPM update at the same time so the error isn’t thrown.

© 2008 Josh Rendek.