Archive for September 29, 2010

Linux firewall closing and opening

1) After the restart to take effect
Open: chkconfig iptables on
shut down: chkconfig iptables off

2) With immediate effect,After the restart failure
Open: service iptables start
shut down: service iptables stop

It should be noted that for other services under Linux can be performed using the above command to open and close operations。

When you turn the firewall,Make the following settings,Open the relevant port,
Modify / etc / sysconfig / iptables file,Add the following:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT

Comments

How to add a new hard disk to linux

On the server to take a good hard drive,Boot linux,Log in as root。

For example, I added a new SCSI hard disk,It needs to be divided into three zones:

#fdisk /dev/sdb

进入fdisk模式:

Command (m for help):p  //查看新硬盘的分区

Command (m for help):n  //创建新分区


可以用m命令来看fdisk命令的内部命令;n command to create a new partition;d command to delete an existing partition;p command to display partition list;t command to change the partition type ID number;l command displays a list partition ID numbers;a command to specify the boot partition;w command to modify the partition table will save it to play a role。 


Command action

   e   extended   //输入e为创建扩展分区

   p   primary partition (1-4)   //Enter p to create a primary partition,这里我们选择p


Partion number(1-4):1  //The first extended partition,按你需求可以最多分4个主分区

First Cylinder(1-1014,default 1):  1  //第一个主分区起始的磁盘块数

Last cylindet or +siza or +sizeM or +sizeK: +1024MB  //可以是以MB为单位的数字或者以


磁盘块数,Here we enter + 1024MB partition size expressed as 1G。

So we have created a partition,If you want to create more partitions can be created according to the above steps to continue。

After the partition is created with the Save w。

Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.

Syncing disks.

This partition End,We would also like to format

#mkfs -t ext3 -c / dev / sdb1 // If you have multiple partitions,Modify the zoning so sdb2

After the format we need to mount the partition,

#mkdir www // Create / www directory,我们将把新的分区挂到www下

#mount /dev/sdb1 /www  //将/dev/sdb1挂载到/www

# df  //用df命令进行查看

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/sda2              3771316   1388956   2190788  39% /

/dev / sda1               101089      9463     86407  10% /boot

none                     62988         0     62988   0% /dev/shm

/dev/sdb1               485906      8239    452580   2% /see www //,这就是我们刚


才新挂载的分区

Here we are nearing completion of,But if we are to end this case,We have to restart the server after each

Manually mount,This is very troublesome,We need to modify / etc / fstab file to automatically mount。

#vi / etc / fstab

At the end of the file add the following to fill:

/dev/sdb1               /www                    ext3    defaults        1 2

If more than one partition can be modified sdb1 and / www,After modification save,Restart server。

This work we add a new hard disk is over。

Comments (1)

one、Built in WHM、edit、Delete host program

Overview (Overview)

You can create your own custom hosting plan with Packages,It is also a very critical WebHost Manager function。These Packages constitute the core of your business web hosting services,And your pricing structure also needs careful consideration。In this step,,WebHost Manager allows you to customize settings for a number of parameters,Disk space and bandwidth capacity to sub-domains and MySQL database number,And to define whether to allow CGI and Shell Access and set the default cPanel theme which provide。

Click on the main interface of the WebHost ManagerPackagesPackages to enter the menu。

Read the rest of this entry »

Comments

Web Host Manager Tutorial Overview

The main purpose of this tutorial is to enable new users are familiar with WebHost Manager Interface (WebHost Manager interface);And describes how to use WebHost Manager required to manage your virtual host server to meet。

This tutorial is divided into the following small tutorial:

Read the rest of this entry »

Comments