• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Web Hosting Resource Kit

Web Hosting, Web Hosting Reviews & Virtualization

  • Contact
  • About Us
  • Privacy Policy

This post may contain affiliate links. If you use these links to buy something we may earn a commission. Thanks.

Archives for April 2006

  • Business Management
  • Editors Column
  • Hosting Customers
  • Interviews & PR
  • Marketing/Advertising
  • Online Marketing/SEO
  • VMWare
  • Web Host Startup
  • Web Hosting
  • Web Hosting Reviews
  • All

How to check the port speed and duplex setting (Linux)?

April 22, 2006 By Christoph Puetz Leave a Comment

How to check the port speed and duplex setting (Linux)?
 
Sometimes it is necessary to verify the port speed and the duplex settings on your Linux server. The following tutorial shows you how.
To verify the port speed and duplex setting on a Linux do the following:
 
Login to your server via SSH and switch to the root user account. Then initiate the following command:
 
root@server [~]# mii-tool
eth0: negotiated 10baseT-FD, link ok
root@Server [~]#
 
The output above shows 10Mbps (10) and Full Duplex (FD). 

Please be aware that this command only shows what the onboard NIC is actually set to run at. The true speed and duplex limits depend on what your server is assigned to at the switch or router level.

Copyright 2006 – Webhostingresourcekit.com

How to check the disk space on a Linux server?

April 21, 2006 By Christoph Puetz Leave a Comment

How to check the disk space on a Linux server?

Keeping an eye on disk space usage is critical for a server to stay healthy. The last thing a system admin wants is a system to run out of disk space. So, how does a Linux System Administrator checks his server for used and available disk space? Use Putty or your favorite SSH client and logon to your server. Switch to the root user once you are logged.

Then execute the following command:

root@server [~]# df

This command will show you the disk space among your partitions in KB size.

Sample Output:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda3             37167560  14344212  20935312  41% /
/dev/hda1               256667     27790    215625  12% /boot
/dev/hdc1             38464340  16535548  19974888  46% /backup
none                    766696         0    766696   0% /dev/shm
/dev/tmpMnt             806288     17416    747912   3% /tmp

If you want to see your server disk space in Gigabyte data change the command as shown in our next example:

root@server [~]# df -h

Sample Output:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              36G   14G   20G  41% /
/dev/hda1             251M   28M  211M  12% /boot
/dev/hdc1              37G   16G   20G  46% /backup
none                  749M     0  749M   0% /dev/shm
/dev/tmpMnt           788M   18M  731M   3% /tmp

I make it a habit to check servers whenever I log into one via SSH. Next to using the "top" command, checking the disk space is one of my high priority items.
 

Deactivating Telnet on a Red Hat Linux server

April 5, 2006 By Christoph Puetz Leave a Comment

Deactivating Telnet on a Red Hat Linux server
 
A system administrator or webmaster should always consider SSH over TELNET when it comes to remotely accessing a server over the Internet. The inherent data encryption features of SSH and the current widespread availability of SSH clients for both Linux and Windows are advantages that Telnet has not to offer.
 
If you do decide to deactivate an active TELNET server on Red Hat Linux, then you need to use the chkconfig command as described in our example below. The following steps assume that you have SSH already installed and configured on your server.
 
Logon to your server via SSH and switch to the root user. Then execute the following command to deactivate Telnet:
 
 chkconfig telnet off
 
Telnet has now been turned off on your server.
© 2006 – Web Hosting Resource Kit

Having SSH respond on more than one port on Red Hat Linux

April 4, 2006 By Christoph Puetz Leave a Comment

Having SSH listen on more than one port on Red Hat Linux

The default port for SSH to listen on is port 22. Sometimes webmasters or system administrators need to have access on either complete different port or to have SSH to listen on two ports at the same time. The following steps explain how this can be done.
 
The file that holds the current SSH port settings can be found at:
 
/etc/ssh/sshd_config
 
Log on to your server via SSH and switch to the root user. Open this file in your favorite text editor and either change/remove the setting for port 22 or add the additional port setting in a new line. Example:
 
Port 22
Port 435
 
Save the file and then restart SSH:
 
service sshd restart
 
Now you need to verify that SSH is listening on the new port:
 
netstat -an | grep 435
 
It is highly recommended to use a port that is not in use by popular applications on the Internet. A random port number should be chosen for better security. If you are running a firewall on your server you will also need to adjust the firewall rules to allow the new port to be accessible from the Internet.

© 2006 – Web Hosting Resource Kit

How add more IP addresses to your cPanel server?

April 3, 2006 By Christoph Puetz Leave a Comment

How add more IP addresses to your cPanel server?
 
Sometimes a server admin or webmaster needs additional IP addresses added to a server. The following procedure describes the necessary steps to add more IP addresses to a cpanel / whm server. Log in to your WHM control panel on your server and navigate to the IP Address section:
 
 
Select the "Add a New IP Address" option. On the next window enter your additional IP address, select the correct subnet mask and submit it.
 
 
Once all IP addresses have been added, you will need to restart the ipaliases service. Log on to your server via SSH and switch to the root user. Then execute the following command:
 
service ipaliases restart
 
This will then bind the new IP addresses to the server, and allow them to be used in WHM/cpanel.

© 2006 Web Hosting Resource Kit

How to block/allow only certain ports in APF?

April 2, 2006 By Christoph Puetz Leave a Comment

How to block/allow only certain ports in APF?
 
If you are using APF as your firewall you most-likely want to block certain ports on your server (or better – only allow traffic to/from the server on specific ports). To make the appropriate changes on your system you will need to SSH into your server and switch to the "root" user. The do the following:
 
Open your APF configuration file:
 
pico /etc/apf/conf.apf
 
Scroll down in the file to where it says something like:
 
Common ingress (inbound) ports
# Common ingress (inbound) TCP ports
IG_TCP_CPORTS="21,22,25,53,80,110,143,443,11000"
 
and
 
Common egress (outbound) ports
# Common egress (outbound) TCP ports
EG_TCP_CPORTS="21,25,80,443,43"
 
Depending on your version of APF the wording can look different, but overall you should be able to identify the appropriate sections. The settings shown above are just samples. Just modify the configuration on your server to meet your requirements. Make sure you do not kick yourself out. Warning: Leave the ports for SSH and possibly your control panel in the configuration file (as a bare minimum). If you do not know which ports to block or which port numbers to remove – DO NOT touch this file. Save the changes. Then restart APF. Test the port access on your server.

Howto: Upgrade Cpanel To Latest Mysql

April 1, 2006 By Christoph Puetz Leave a Comment

Howto: Upgrade Cpanel To Latest Mysql

Sometime the folks from cpanel are behind in updating some software packages. Here is the lazyman’s way of upgrading. It’s all automatic you just need to chmod the file and let it run, once it’s completed just update your root password of mysql.

Step 1

SSH into your box.

Step 2 – Open the file for editing

nano mysql.sh

Step 3 – Copy the following code into your window.

Code:

################################
#    CPANEL MYSQL UPGRADER     #
# SCRIPT COPYRIGHT MYACEN.COM  #
################################

###### UPGRADE PERL-DBI ######

up2date -fp perl-DBI

###### Stop The SQL ######

service mysql stop

###### Stop Chkservd ######

service chkservd stop

####### Create a tmp dir ######

mkdir /usr/local/src/mysqlup

###### Change to tmp dir ######

cd /usr/local/src/mysqlup

###### Download Mysql ######
wget http://mysql.he.net/Downloads/MySQL-4.1/MySQL-server-4.1.18-0.i386.rpm
wget http://mysql.he.net/Downloads/MySQL-4.1/MySQL-bench-4.1.18-0.i386.rpm
wget http://mysql.he.net/Downloads/MySQL-4.1/MySQL-client-4.1.18-0.i386.rpm
wget http://mysql.he.net/Downloads/MySQL-4.1/MySQL-devel-4.1.18-0.i386.rpm
wget http://mysql.he.net/Downloads/MySQL-4.1/MySQL-shared-4.1.18-0.i386.rpm

####### Extract Mysql ######
rpm -Uvh MySQL-*.rpm

####### Restart SQL ######
service mysql start

###### Restrar Chkservd ######
service chkservd start

###### Disable Cpanel Automysql updates ######
touch /etc/mysqlupdisable

####### Clean Unwanted Files ######
rm -rf /usr/local/src/mysqlup     
 

Step 4 – Chmod the file

chmod 755 mysql.sh

Step 5 – Run the file

./mysql.sh

Step 6 – Change root password

Once this has finished change the mysql root password.

We are testing on mysql5 at the moment. We’ve installed this on 30 servers with no problems. This is not supported by us and we recommend you backing up any database’s before trying this (although as I said we have not had any problems)

Author of this article: robert from myacen.com

Primary Sidebar

Categories

  • Business Management
  • Editors Column
  • Hosting Customers
  • Interviews & PR
  • Marketing/Advertising
  • Online Marketing/SEO
  • VMWare
  • Web Host Startup
  • Web Hosting
  • Web Hosting Reviews

Pages

  • About Us
  • Contact
  • Disclosure Policy
  • Privacy Policy
  • Sitemap
  • Terms of Service
  • Welcome to Web Hosting Resource Kit

Copyright Webhostingresourcekit.com© 2021 · Log in