Kurinchi Blogger Scribbles …


Dec 15
2011

Method 1:

$ mail -s “Subject: Test email from linux server” info@test.com

Press the “Return” key

Enter the body part of the email

Press ctrl + D

Enter a CC email if you would like (e.g. info2@test.com)

Press ctrl + D again

Then check the mail box to see if the mail has arrived.


Read more »


Dec 12
2011

Reverse DNS and Junk Email

Last updated: December 16th, 2011

Many email servers depend on Reverse DNS in order to identify if the mail is legit or spam. For the Reverse DNS to work correctly, two points need to be addressed
a) Look for IP address of the mail server should return its name. PTR record should be set for this
b) Reverse look on the name should return back the IP address

For example,

$ dig -x 217.83.122.34

;; ANSWER SECTION:

34.122.83.217.in-addr.arpa. 66372 IN PTR mail.example.com.

$ dig mail.example.com

;; ANSWER SECTION:

mail.example.com. 900 IN A 217.83.122.34

Check the IP address that is getting resolved matches the name that is getting returned back.


Nov 15
2011

Linux: How to upgrade PHP from 5.1 to 5.2 in CentOS5?

Last updated: November 15th, 2011

First Check PHP version that is currently installed

$ php -version

Check Linux Version

$ cat /etc/*-release (or redhat-release)

Create a repo file with the content given below. As you can note, we are looking for package upgrade related to php only.

Read more »


Nov 14
2011

Part 5: Steps to take after submitting to search engines (from the web)

Maintenance check

All Web sites should be thoroughly tested using a site maintenance tool in order to catch errors in operation before customers are brought to the site. HTML errors can hinder a search engine spider’s ability to index a site, it can also keep a search engine from reading a page or cause it to be viewed in a manner different from how it was intended. NetMechanic’s HTML Toolbox or another site maintenance tool, must be used by the Webmaster, to avoid potential visitor disasters due to site errors.
Read more »


Oct 15
2011

Linux: How to list or allow access to ports ?

Last updated: November 15th, 2011

SELinux is a feature that may be turned on certain servers and it can restrict access to certain ports. In order to gain access and make the ports work, you need to open those ports.

To see if SELinux is set, type

$ sestatus

To list all port, try the semanage command

$ semanage port -l

To check for a specific port that is opened

$ semanage port -l | grep 8085

To allow access to a specific port

$ semanage port -a -t http_port_t -p tcp 8085


Sep 18
2011

The above error message most likely occurs when users change password in one environment (via command line or phpmyadmin) and do not see the changes reflect in other OR if they have forgotten the password that is being set for the environment in question.

Following command should help you set/change MySQL password

$ mysql -u root -p

Read more »


Aug 19
2011

SEO: Steps to take before submitting

Last updated: March 14th, 2012

Part 4: Steps to take before submitting (from the web)

Fine tune the TITLE tag to increase traffic to the site

Improving the TITLE tag is one technique that applies to just about all the search engines. The appearance of key words within the page title is one of the biggest factors determining a Web site’s score in many engines. Changing title of the web pages to include some site keywords which works well with each of the pages can greatly increase the chance of the page getting noticed by the search engines and can increase the page rank of the site as well.
Read more »


Aug 10
2011

MySQL: How to stop, start or restart mysql?

Last updated: August 10th, 2011

In linux, following commands are used to start/stop/restart mysql

$/etc/init.d/mysqld start
$/etc/init.d/mysqld restart
$/etc/init.d/mysqld stop

In windows, mysql runs as a service.
C:> net stop mysql
C:> net start mysql


Jul 20
2011

Linux: Case sensitive MySQL table names

Last updated: August 10th, 2011

When transitioning MySQL database from Windows to Linux, users often encounter issues related to case-sensitiveness. Windows is case-insensitive and Linux is case-sensitive.

In such scenarios when a database call is made after the application migration happens, users often run into errors which can send them in circles between the migration servers.

Solution to this problem is to add a single line of text under my.cnf (MySQL configuration file) under [mysqld]
Read more »


Jun 25
2011

$ /etc/init.d/apache2 restart

After configuring Apache server settings on the name server, you may encounter a message “[warn] NameVirtualHost 192.168.1.3:80 has no VirtualHosts

The issue may be due to more than one entry of NameVirtualHost lines in the configuration settings. You can find this out by

$ grep NameVirtual * -R
site1:NameVirtualHost *:80
site2:NameVirtualHost *:80

Linux Solution: Remove one of the occurance of the NameVirtualHost and the warning message that you receive will vanish.



Valid HTML 4.01 Strict  Valid HTML 4.01 Strict