Skip to content

Category Archives: Linux

AOL rejecting or blocking emails

Recently, we faced a problem where emails generated from our application were not showing up in AOL inbox(es). We have recently switched to a new machine & I suspected that for new machine mx-records are not set correctly from where I am trying to send the email. We didn’t wanted to change our mx-records as [...]

  • Share/Bookmark

Wget came to my rescue

I was trying to download some 150-200 zip files from a http URL by finding each file & clicking on it to download.  I soon realized how boring it is using standard download support in browsers. This is something I am supposed to do periodically I know that there are some browser extensions available that [...]

  • Share/Bookmark

OpenSolaris: Problem Installing eventmachine gem

set this var before gem install command [code]export CXX=g++[/code]

  • Share/Bookmark

Setup:: Rubyworks & rMagick

I tried this before mod_rails launched. Pushing my command log for reference. This setup uses rubyworks, details can be found here http://studios.thoughtworks.com/rubyworks I tried this on a redhat machine. The setup seems to be working perfectly fine. clear 2 ruby 3 yum install ruby 4 wget http://rubyworks.rubyforge.org/RubyWorks.i386.repo 5 sudo cp RubyWorks.i386.repo /etc/yum.repos.d/ 6 uname -A [...]

  • Share/Bookmark

/bin/rm: Argument list too long tmp/sessions/ruby_sess.*

Well this happens when there are too many files to process: Best way in this case is to do batch processing: Sample command: find . -name ‘ruby_sess.*’ -print0 | xargs -0 rm

  • Share/Bookmark

Setting up a Linux Proxy server using Fedora core 5

Assumption: – eth0 is the external interface (Connected to internet) – eth1 is the internal interface (local network) (Fixed IP) Edit /etc/sysctl.conf to enable ip forwarding permanently. net.ipv4.ip_forward = 1 Edit /etc/sysconfig/iptables-config and make following changes: IPTABLES_MODULES=”ip_conntrack_netbios_ns ip_conntrack ip_conntrack_ftp ip_conntrack_irc iptable_nat ip_nat_ftp ip_nat_irc” IPTABLES_SAVE_ON_STOP=”yes” IPTABLES_SAVE_ON_RESTART=”yes” # To clear out any existing rules and set default [...]

  • Share/Bookmark

RPM fast track

RPM packages have a file of names like foo-1.0-2.i386.rpm, which include the package name (foo), version (1.0), release (2), and architecture (i386).  To display package information before installing the program, use the command: # rpm -qpi foo-2.3-8.i386.rpm  To install a RPM package, use the command: # rpm -ivh foo-1.0-2.i386.rpm  To upgrade a [...]

  • Share/Bookmark

Tight up single-user login mode

Linux has a special command (linux single) also known as ‘single-user mode’, which can be entered at the boot prompt during startup of the system. The single-user mode is generally used for system maintenance. You can boot Linux in single-user mode by typing at the LILO boot prompt the following command: LILO: linux single This [...]

  • Share/Bookmark

Tight Up NFS

Configure the /etc/exports file with the most restrictive access possible. This means not using wildcards, not allowing root write access, and mounting read-only wherever possible.  Edit the exports file (vi /etc/exports) and add: As an example: /dir/to/export host1.mydomain.com(ro,root_squash) /dir/to/export host2.mydomain.com(ro,root_squash) Where /dir/to/export is the directory you want to export, host1.mydomain.com is the machine allowed [...]

  • Share/Bookmark

Tightup /etc/fstab

- Mounting boot partition read only, increases security of kernel. This how you do it in /etc/fstab LABEL=/boot /boot ext2 defaults,ro 1 2 And reload changes # mount /boot -oremount And yes, make it writable when you are planning kernel upgrade. Otherwise new kernel wont be able to enter Other security options in the fstab [...]

  • Share/Bookmark