MAL - Memória Auxiliar do Lutieri

sexta-feira, agosto 28, 2009

Config OpenLDAP with different Berkley lib


export CPPFLAGS="-I/opt/BD4.7/include/"
export LDFLAGS="-L/opt/BD4.7/lib/"
export LD_LIBRARY_PATH="/opt/BD4.7/lib/"
./configure --prefix=/opt/openldap --disable-ipv6 --enable-crypt


If you have a current version of Berkley DB installed on your system make sure you remove the old db libraries files. Usually in /usr/lib/libdb*

Also add /opt/BD4.7/lib to /etc/ld.so.conf and rerun ldconfig

Marcadores:

LDAP Recovery

/usr/sbin/slapd_db_recover -v -h /var/lib/ldap


or

Maybe for old versions?!

db_recover -v -h /var/lib/ldap

Marcadores: ,

terça-feira, agosto 25, 2009

Redirect http

No apache:

RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://secure.example.com/ [R]


ou


RewriteEngine On
RewriteRule ^/$ /lalala [R]



Em html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Your Page Title</title>
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
<BODY>
Optional page text here.
</BODY>
</HTML>


Em PHP:

<html>
<?php
header('Location: http://www.example.com/');
?>

Marcadores: ,

quinta-feira, agosto 13, 2009

Boot linux installation process from USB flashdrive

There is a lot of solutions ou thtere for installing a linux distro into a pendrive, flashdrive, whatever...

I'd like to boot a machine via usb and install a distro to the harddrive. First, I tried copy the ISO image to the flashdrive using dd, like that:

dd if=./centos.iso of=/dev/sdb1, where sdb1 it's the first partition in the flashdrive.

Although the files were copied sucessfully to the flashdrive, it was not bootable.

Googling I finally found an app called UnetBootIn that is designated to copy an ISO file to the pendrive and make it bootable.

So, I decided to use UnetBootIn to copy the whole dvd image to the flashdrive. This time I got lucky I was able to boot via pendrive, BUT, the installation process requires the ISO image. My options were Local CDROM, HTTP server, FTP Server or Hard Drive. Selecting Hard Drive allowed me to select the flashdrive partition. However, the installation process didn't accept that.

The final solution was create two partitions in the flashdrive. A really small one like 15Mb and another one filling all the rest. Both formatted as fat32.

I downloaded the centOs netinstall iso(really small, 8Mb). Then, I used the UnetBootIn to copy this netinstall image to the small partition. And the second, and biggest, partition contains the CentOS DVD ISO.

Now, I was able to boot using the pendrive and when comes the time I need to select where the ISO is, I select Hard Drive and the second partition in the flashdrive.

Voilá!!

Marcadores:



Chat with Lutieri G. B.

Subscribe in a reader