Solutionist's Blog

Tech | Health | Life | Travel

Install SNMP Centos / RHEL

nstalling SNMP daemon and tools: As root yum -y install net-snmp.i686 yum -y install net-snmp-utils Once these are installed start the snmp daemon: /etc/init.d/snmpd start chkconfig snmpd on   This is just the basic install but testing it : snmpwalk -v 1 -c public -O e 127.0.0.1 For production servers it is advisable to at least […]

how-do-i-find-out-what-shell-im-using

ps -p $$ So what is $ argument passed to -p option? Remember $ returns the PID (process identification number) of the current process, and the current process is your shell. So running a ps on that number displays a process status listing of your shell. In that listing you will find the name of […]

mdadm raid array lost after reboot

mdadm is a pain, since it doesn’t record the raid settings automatically, after you set everything up, you have to remember to save the mdadm.conf file. What a pain. Anyway, I forgot to do that, and on reboot, it hung my machine saying /dev/md0 was hosed. So here is how I recovered it. originally, my […]

convert-epoch-to-human-readable-date-and-vice-versa

What is epoch time? The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). Literally speaking the epoch is Unix time 0 (midnight 1/1/1970), but ‘epoch’ is often used as a synonym for ‘Unix time’. Many Unix systems […]

php-tips-insert-href-link-in-a-php-code

If the link needs to be inside of the PHP you have two options. Option one is to end the PHP and then reopen it. Here is an example: <?php —– My PHP Code—- ?> <a href=”https://twitter.com/angela_bradley”>My Twitter</a> <?php —– My PHP Code—- ?> The other option is to print or echo the HTML code […]

ls-command-list-one-file-per-line

When I am busy with bash scripts , often need the filename only   with ls  command you can populate file names only in different line and you can take the first one with head   ls  -1    # 1 is the number not the letter l and get the first one by ls […]

html-tip-using-quotes-in-form-input-tags

In (X)HTML, attribute values should be enclosed by double or single quotes. But a common source of errors and confusion arises when those values themselves contain double or single quotes. This is especially common for form input fields, where the values might contain data obtained from a database or supplied previously by the user. Yes, […]

preventing-brute-force-attacks-using-iptables-recent-matching

Software requirements Linux kernel and iptables with ‘recent’ patch. (It seems that this patch has entered the mainline some time ago. ‘Recent’ matching e.g. is known to be included with kernels 2.4.31 and 2.6.8 ofDebian Sarge 4.0.) Implementation We begin with empty tables… iptables -F and add all the chains that we will use: iptables -N ssh iptables -N blacklist […]

how to turn off Auto-correct in iphone /ipad

Turn Off Autocorrect in iPhone Autocorrect is a great iPhone feature if you text and/or email a lot. The ability to quickly type and have the smartphone complete words for you or correct grammatical mistakes helps write efficiently and quickly. Although autocorrect feature is great, it still doesn’t understand some local words and might get […]

Secured By miniOrange