Fedora – Ramdisk creation

In Fedora, ramdisks are not created by default as is the case with RHEL. So, if you need to get Ramdisks on Fedora, then you can do this:

sudo yum install MAKEDEV

This will create some default Ramdisk’s in the “/dev” directory. Now, if you need to change anything then feel free to go to “/etc/makedev.d” and feel free to change these files.

The Fedora Project logo
The Fedora Project logo (Photo credit: Wikipedia)

 

Enhanced by Zemanta

Allow incoming/outgoing ports on iptables

Schematic for the packet flow paths through Li...
Schematic for the packet flow paths through Linux networking and Xtables (Photo credit: Wikipedia)

Last couple of years, I just used to disable iptables on my system, this time I decided not to disable it and keep it enabled.

So far so good, now comes the tricky part, I have http server enabled on my system and since this is on local network with already firewall and other security in place so I can allow all incoming to my system and similarly I need to enable XDMCP outgoing. So, I can add the rules like this :

iptables -A INPUT -p tcp –dport 22 -j ACCEPT
iptables -A OUTPUT -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT for XDMCP

This works only till I reboot my system and is not persistent. Okay, so I can put this in rc.local file. But why I should do that, there should be more elegnant way. So, I searched and finally found that I can simply put the rules in /etc/sysconfig/iptables as follows:

-A INPUT -p tcp –dport 22 -j ACCEPT
-A OUTPUT -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT for XDMCP
Enhanced by Zemanta

Your own local search engine.

There are times when you would want to have a local search engine capable of indexing even pdf and doc files. So here is a solution.

You can use “Omega” and here are the instructions.

download omega from http:// xapian.org/download

yum install xapian libuuid-devel

And then make and install omega and for this you can follow the instructions.

Federated Search Engine Diagram
Federated Search Engine Diagram (Photo credit: Wikipedia)

Create index using command omindex
and then you can use quest or search.py to search or you can setup the cgi way so that you can use local browser to search.

You can setup cron with following to update the index regularly:

omindex -p --db /var/lib/omega/data/default --url /URL /path/to/index
Enhanced by Zemanta