TECH INSIGHT
FOR THE
CURIOUS MIND

ping the universe, send your echo,
In the terminal of life, be the sudo.
exit the fear, reboot the cheer,
In the shell of existence,
hold your dreams near..

Join Newsletter

Firewall and iptables

Open port 80 Open flle /etc/sysconfig/iptables: # vi /etc/sysconfig/iptables Append rule as follows: -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT Save and close the file. Restart iptables: # /etc/init.d/iptables restart Open port 110 Append rule as follows: -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport … Read more

How to Install Magento on CentoOS 6

Here is my simple way to install magento on CentOS 6 1. wget magento 2. edit /etc/httpd/conf/httpd.conf 3. install extra packages and extensions that might you need.    a. php extensions mcrypt —->  epel.mirror.freedomvoice.com/6/i386/php-mcrypt-5.3.3-1.el6.i686.rpm    b. php extensions libmcrypt-devel——> http://epel.mirror.freedomvoice.com/6/i386/libmcrypt-devel-2.5.8-9.el6.i686.rpm    c. php extensions libmcrypt—> http://epel.mirror.freedomvoice.com/6/i386/libmcrypt-2.5.8-9.el6.i686.rpm

Installation of Apache Server

How to install Apache Server on CentOS, RedHat, Linux Install Apache HTTP Server yum install httpd Note: This is typically installed with CentOS by default How to configure Apache Server on CentOS, RedHat, Linux Set the apache service to start on boot chkconfig –levels 235 httpd on Enable name-based virtual hosting on port 80 Open the httpd configuration … Read more

Installing SAMBA

yum install sambayum install samba-client cd /etc/samba vi /etc/samba/lmhostsvi /etc/samba/smb.confvi /etc/samba/smbusers useradd [username]smbpasswd -a [username] chown [username] [dirname] To check if you got any error  : smbparm service samba restart

SSL Certificate in CentOS WebServer

Yum Install mod_ssl openssl # Generate private keyopenssl genrsa -out ca.key 1024 # Generate CSRopenssl req -new -key ca.key -out your_name.csr # Generate Self Signed Keyopenssl x509 -req -days 365 -in your_name.csr -signkey your_name.key -out your_name.crt # Copy the files to the correct locationscp ca.crt /etc/pki/tls/certs/your_name.crtcp ca.key /etc/pki/tls/private/your_name.keycp ca.csr /etc/pki/tls/private/your_name.csr vi /etc/httpd/conf.d/ssl.conf change path forSSLCertificateKeyFile … Read more

OSSEC Email Notification Configuration

edit file /var/ossec/etc/ossec.conf. change <ossec_config> <global> <email_notification>yes</email_notification> <email_to>[email protected]</email_to> <smtp_server>mx.example.com..</smtp_server> <email_from>[email protected]</email_from> Set the Alter Level <ossec_config> <alerts> <email_alert_level>10</email_alert_level> Restart the Service /var/ossec/bin/ossec-control restart

Basic Linux Commands

for move file —>  mv noldfile newfile to make new directory > mkdir dirname to put file into a new directory > mv textfile dirname/ to change file name > rm filename to view the text file …>>>>> less filename to add new user >>> useradd to del user >>> userdel username less command to … Read more

How to make crontab job

field allowed values —– ————– Minute 0-59 hour 0-23 day of month 1-31 month 1-12 (or names, see below) day of week 0-7 (0 or 7 is Sun, or use names) ———————————————- Minute – Hour – Day of Month – Month – Day of Week * * * * * Command goes here —————————————— How … Read more

VI Editor Search and Replace

:s/foo/bar/g Change each ‘foo’ to ‘bar’ in the current line. :%s/foo/bar/g Change each ‘foo’ to ‘bar’ in all lines. :5,12s/foo/bar/g Change each ‘foo’ to ‘bar’ for all lines from line 5 to line 12 inclusive. :’a,’bs/foo/bar/g Change each ‘foo’ to ‘bar’ for all lines from mark a to mark b inclusive. :.,$s/foo/bar/g Change each ‘foo’ … Read more