Divi WordPress Theme

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Kevin

Pages: [1] 2
Domain Registration / Point GoDaddy domain to Amazon EC2 server
« on: February 10, 2017, 03:42:59 PM »

I have few domains registered with Godaddy registrar. I have recently purchase Amazon EC2 service from Amazon. How can I point my Godaddy domains to my Amazon EC2 instance?

I am new to Amazon EC2 cloud.


How Tos / Rkhunter installation Guide
« on: November 26, 2008, 10:48:47 AM »
Rkhunter is a very useful tool that is used to check for trojans, rootkits, and other security problems. It is highly recommended to install it on your Linux base server. Below is the guide line to install it:

[1] Download Rkhunter from the below link:
Code: [Select]
[2] Untar the installation file using the below command:
Code: [Select]
tar -zxvf downloaded_file_name
[3] Go to Rkhunter using the below command:
Code: [Select]
cd rkhunter-version_numberJust type ls and you will get the name of rkhunter  directory.

[4] Install it using the following command:
Code: [Select]
Now you can run it manually using the below command:
Code: [Select]
/usr/local/bin/rkhunter -c
You can setup in daily cron to run it automatically. To add it in daily cron follow the below steps:

Code: [Select]
pico /etc/cron.daily/rkhunter.sh
Now add the following line:
Code: [Select]
(/usr/local/bin/rkhunter -c --cronjob 2>&1 | mail -s "Rkhunter Report" [email protected].com)

rkhunter.sh file should have execute permission. You can do it using

Code: [Select]
chmod +x /etc/cron.daily/rkhunter.sh


How Tos / E-mail Alert on Root SSH Login
« on: November 26, 2008, 10:35:22 AM »
It is essential that you have been notified whenever someone login to your server. On the server, you can set an email alert when someone login to your server as root.

[1] Login to your server as a root user.

[2] Type the below command:
Code: [Select]
pico /root/.bashrc
[3] Scroll down to the end of the file and add the following line:

echo 'Root Shell Access on your [ServerName] on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" <a href="mailto:[email protected]">[email protected]</a>

[4] Save the file and exit from SSH. Now login to your server and check whether you are receiving the email alert or not.



Linux / Newbie Linux Server Administration Guide
« on: November 26, 2008, 10:28:25 AM »

Let us start a thread to describe some commonly used Linux commands to manage the server. Probably this will help to the newbie who have less knowledge.

[1] To check the running processes:
Code: [Select]
Description: This command will display the current running processes on the server. This will help to monitor the current running processes. For more options of this command go through the manual of this command.

Code: [Select]
man top
[2] To list the files and folders:
Code: [Select]
This is command will list the files and folders which are in current directory. For more options of this command go through the manual of this command.

Code: [Select]
man ls
[3] To check running process by particular user:
Code: [Select]
By adding some parameters to this command you can grep the processes owned by particular user:

Code: [Select]
ps auxf | grep username


How Tos / Disable Direct Root Login and SSH protocol 2 in cPanel/WHM
« on: November 25, 2008, 10:01:30 AM »
It is a good idea to disable root login via SSH. It reduces the security risk. It is also recommended to use SSH protocol 2 and disable SSH protocol 1. SSH protocol 2 is more secure than SSH protocol 1. Following are the steps to disable direct root login and to disable SSH protocol 1:

[1] Login as a 'root' to your server.
[2] Open /etc/ssh/sshd_config file.
pico -w /etc/ssh/sshd_config

[3] Find the below text within file:
Protocol 2, 1
[4] Uncomment the above line and change it as follow:
Protocol 2
[5] Now, search the below text:
PermitRootLogin yes
[6] Uncomment the above line and set as follow:
PermitRootLogin no
[7] Save the file and restart SSH service using the below command:
/etc/rc.d/init.d/sshd restart

Now, no one will be able to login as root directly. They have to use su - to get the root access. You will need to add your user to wheel group in cPanel otherwise you will not be able to use su command.



How Tos / How to redirect using META Tags
« on: November 04, 2008, 02:44:45 AM »

Sometime you may need to redirect your html or htm (static pages to another URL). You can do this using the META tag redirection. you just need to add the following code in your code to redirect the page:

Code: [Select]
<META http-equiv="refresh" content="1;



How Tos / crontab permissions are wrong - Please set to 4755
« on: October 29, 2008, 11:01:50 AM »
One of the common error in cPanel after installation is:

/usr/bin/crontab permissions are wrong. Please set to 4755

An easy fix for this error is:

- Login to your server via SSH and shoot out the following command:
- chmod 4755 /usr/bin/crontab

Please note that you will require root access to the server to change the permissions of crontab.


Hosting Software and Control Panels / Install PHPMailer on Windows
« on: October 12, 2008, 01:32:27 AM »
It is simple process to install PHPMailer on Windows server. You just need to upload PHPMailer class file inside the 'includes' folder of your PHP installation. Generally the include folder in locate inside your PHP installation directory (c:\php\includes). Make sure you have added this include path in your php.ini files.

That's it.  :)


Other Web Hosting Stuff / Windows or Linux Hosting ??
« on: October 05, 2008, 10:36:51 PM »

Which hosting platform are you using for your web site?

For me it's Linux.


General Chat / Microsoft ads in Google Adsense
« on: October 02, 2008, 10:53:41 AM »
Have you ever seen Microsoft's own ads in Google Adsense? I have seen Windows servers 2008 ads in Adsense. Seems Microsoft is also using Google Adsense for advertisement.


How Tos / Disable manually update Awstats from cPanel
« on: September 28, 2008, 08:45:19 PM »
Many host allow to update the Awstats of the domain from 'Update Now' link on Awstats page. However, it consumes some additional server resources if you are updating the stats of some high traffic web site. This option should be disabled in shared hosting server. If you are unsure on how to disable it then the below steps will help you:

[1] Login to your WHM.
[2] Go to Tweak Settings.
[3] Uncheck the option "Allow users to update Awstats from cPanel" and save it.



How Tos / Disable PHP mail function on cPanel server
« on: September 28, 2008, 02:49:29 PM »
There is a function available in PHP to send a mail via PHP script. The function is mail(). However, it is advisable to disable PHP mail() function on the shared hosting server to prevent spamming from the server and allow only SMTP authentication to send the emails via PHP script. You can disable PHP mail() function from WHM. You will just need to follow the below steps for that:

[1] Login to your WHM.
[2] Go to Tweak Settings.
[3] Select the option "Prevent the user "nobody" from sending out mail to remote addresses (PHP and CGI scripts generally run as nobody if you are not using PHPSuexec and Suexec respectively.)" and save it.



How Tos / Disable BoxTrapper Spam Trap for cPanel server
« on: September 28, 2008, 02:37:17 PM »
There is a feature called BoxTrapper Spam Trap in cPanel. If you have enabled this option for your domain then whenever anyone sends email they will need to reply the automated mail generated by BoxTrapper Spam Trapper and then you will receive the email to your account. However, it is advisable not to enable this option. You can disable this option server wide by following the below steps:

[1] Login to your WHM.
[2] Go to Tweak Settings.
[3] Uncheck BoxTrapper Spam Trap option and save it.



How Tos / Disable SpamAssassin for entire cPanel server
« on: September 28, 2008, 02:31:51 PM »
You can disable SpamAssassin for your entire server by following the below steps:

[1] Login to your WHM.
[2] Go to Tweak Settings.
[3] Uncheck SpamAssassin Spam Filter option and save it.

If you are not using SpamAssassin in your server, you can also disable SpamAssassin service. To disable it:

[1] In WHM -> Go to Service Manager.
[2] Uncheck Enabled and Monitor option for spamd.



Linux / How to check and monitor memory usage on Linux
« on: September 28, 2008, 11:37:57 AM »
To monitor the memory usage on the server is essential in order to make your server stable. If your server goes out of memory then you may need to reboot the server to come back your server online again. There are few commands available to monitor the memory usage on the server:

This command gives you the information about processes, memory, paging, block IO,  traps, and CPU activity. For all the options refer the manual of this command (man vmstats).

free -m
It displays the amount of free and used memory in the system.  For all the options, refer the manual of this command (man free).

cat /proc/meminfo
This file contains the information of current memory status (Free memory, used memory etc.).



Google / Google Chrome for Windows - Google's own Browser
« on: September 28, 2008, 11:07:21 AM »

Google has launched their own browser Google Chrome. They has used minimal design and many inbuilt features to make the web faster, safer, and easier.

For more details, http://www.google.com/chrome


Hosting Software and Control Panels / Insert / Create MySQL database in HELM
« on: September 21, 2008, 11:31:52 PM »
To crate a MySQL database in HELM is an easy job. You just need to follow the below steps to create it:

[1] Login to you HELM control panel.
[2] Click on Domains.
[3] On very next page, click on your domain name.
[4] Now go to Database Manager and click on Add New button.
[5] Select the option MySQL and enter the desired database name that you want to create; save it.

The above steps are for HELM 3 version. If you are not able to see MySQL database then there is no MySQL resource allocated to your package.


Site and Server Administration / What is KVM - KVM over IP
« on: September 07, 2008, 08:10:22 PM »
What is KVM? KVM is an abbreviation for Keyboard, Video Display Unit, Mouse. A KVM switch is a hardware device that allows users to control multiple computers from a single keyboard, monitor and mouse. There are two types of KVM devices available. They are Local Remote and KVM over IP.

Local Remote KVM device allows users to control computers 1000 feet away from users console.

KVM over IP is to allow users to control the computers remotely by using the TCP/IP Internet infrastructure.
There are many providers available for KVM and based on the product the functunality may be changed.


How Tos / How to install PostGIS on Linux
« on: August 30, 2008, 01:04:24 AM »
Before you proceed to install PostGIS, make sure you have PROJ4, GEOS 3.0 and PL/pgSQL prodedural language installed on your server. Now download the latest version of PostGIS from their web site and follow the below steps:

tar xvfz postgis-1.3.1.tar.gz                             //File name may change according to version
cd postgis-1.3.1
make install
createlang plpgsql yourtestdatabase
psql -d yourtestdatabase -f lwpostgis.sql
psql -d yourtestdatabase -f spatial_ref_sys.sql



How Tos / adding / create mysql database in cPanel/whm
« on: August 21, 2008, 06:57:25 PM »
How to create MySQL database from cPanel/EHM:

- Login to the cPanel of your domain.
- Click on 'MySQL® Databases'.
- Enter the database name in New Database field and click on 'Create Database' button.


Apache / 404 redirection using .htaccess
« on: August 21, 2008, 06:49:08 PM »
You can set 404 redirection using .htaccess file. You just need to add the following link in your .htaccess file:

ErrorDocument 404 /404.html

Replace 404.html with actual file name where you would like to redirect when page can not be found.


PHP / PHP MySQL Example - PHP MySQL sample connection Tutorial
« on: August 19, 2008, 01:02:41 AM »
If you are facing trouble to connect to your MySQL database you can use the following code to check the database connection:
Code: [Select]
'localhost';   // Your MySQL server host
$dbuser 'dbuser';         // MySQL database user
$dbpass 'password'// Password for MySQL database User

$conn mysql_connect($dbhost$dbuser$dbpass) or 
die (
'Error connecting to mysql');
$dbname 'database_name';



How Tos / How to check user account for particular process in Apache
« on: August 15, 2008, 12:54:37 AM »

If phpsusex is not enabled on the server then it is bit difficult to identify which user high resource because you will get 'nobody' as process owner. If a particular httpd process is using high resource then you can check it which account is belonging to this process using the following command:

grep $(lsof -p PID | grep cwd | awk '{print $9}' | awk -F '/' '{ print $3 }') /etc/userdomains

Replace PID with actual process ID. This should work on cPanel server. I am not sure if it works with other control panel.


How Tos / Verify cPanel/WHM license
« on: August 12, 2008, 10:08:27 AM »
Sometime, you might get the error regarding cPanel license. You can verify whether your server is licensed or not from cPanel site. You can verify it from the following URL:


Additionally you can use following command to reverify your license:


You will need to login to your server via SSH to run above command.


Apache / 301 redirection via .htaccess-mod_rewrite Apache redirection
« on: August 10, 2008, 04:33:46 PM »
If you do not want to set 301 redirection (permanent redirection) using PHP or ASP code then you can set it using mod_rewrite rule. Please note that you will require Apache web server to set this redirection. Following is the code that you will need to write in your .htaccess file to set the permanent redirection:

Code: [Select]
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourdomain.com [nc]
rewriterule ^(.*)$ http://www.yourdomain.com/$1 [r=301,nc]

Add above code in your .htaccess file and place it in the root folder of our web site.


ASP / 301 Redirect using ASP - Permanent Redirect HTTP 301
« on: August 10, 2008, 04:11:03 PM »
You can set 301 redirection (Permanent Redirection) using the below ASP code. It helps to search engines to redirect to the new web site:

Code: [Select]
<%@ Language=VBScript %>
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.new-web-site-location.com/"

PHP / 302 Redirect using PHP - temporary redirections
« on: August 10, 2008, 04:06:37 PM »
Sometime, you may need to redirect your site to some other location. In such event, you may set 302 redirection (also called temporary redirection) using PHP code. Following is the sample 302 redirection using PHP:

Code: [Select]
("Location: http://www.your-web-site.com/temp-location/index.html");


PHP / 301 Redirect using PHP - Permanent Redirect HTTP 301
« on: August 10, 2008, 04:00:43 PM »
You can set 301 redirection (Permanent Redirection) using the below PHP code. It helps to search engines to redirect to the new web site:

Code: [Select]
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.location-to-new-web-site.com" );

General Chat / Beijing 2008 Olympic Games Started
« on: August 10, 2008, 01:48:36 PM »
Beijing 2008 Olympic Games has been started on 08-08-08 at 08-08 time.

China is leading with 4 Gold medals.

For latest medals update, http://results.beijing2008.cn/WRM/ENG/I ... 0000.shtml


Search Engine optimization and Link Exchange / Search engine submission
« on: August 03, 2008, 02:43:56 AM »

Do we really need to submit the sites to major search engines or they come automatically?


Pages: [1] 2