SlackwareEyooLinux server configuration instructions

Source: Internet
Author: User
Article Title: Server Load balancer instructions for configuring Server Load balancer instances in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

(1) driver Loading

Driver loading, mainly the NIC Driver. First, find the NIC:

Lspci | grep net

If not found, first check whether the NIC is plugged in. Check the loaded driver again:

Pciprobe

When this command is run, several drivers are available for loading. To view the driver information, such as pcnet32, run the following command:

Modinfo-F description pcnet32

Based on the above commands, you can find out the driver you need, and finally load, such as loading pcnet32:

Modprobe pcnet32

You can also perform the following operations on the array card driver:

Lspci | grep RAID // view the array card device

Pciprobe // find the driver. Suppose sata_promise is found.

Modinfo-F description sata_promise // view driver information

Modprobe sata_promise // load the driver

(2) Network Configuration

This module mainly configures the nic ip address. eyoolinux uses the slackware release, and its Nic configuration file is different from RedHat. The NIC configuration file of eyoolinux is in the/etc/rc. d/rc. inet1.conf file.

Vi/etc/rc. d/rc. inet1.conf

You can configure the NIC.

In theory, slackware supports multiple NICs. In the configuration file, the configurations of each NIC are distinguished in arrays.

For example, IPADDR [0] = "192.168.1.252" indicates the IP address of eth0.

IPADDR [1] = "192.168.1.253" indicates the IP address of eth1, and so on.

The same is true for subnet mask and HDCP. You can configure other Nic information in the form of array 0.

After configuring the NIC, remember to restart it:

/Etc/rc. d/rc. inet1 restart // the configuration file rc. inet1 is rc. inet1.conf.

(3) samba Configuration

The configuration file/etc/samba/smb. conf only describes how to add samba users:

For example, to add a user max

First, add the System user max

Useradd max

Add samba users

Smbpasswd-a max

Then add max to the valid users line in/etc/samba/smb. conf.

Finally, restart samba.

/Etc/rc. d/rc. samba restart

(4) array card configuration

This mainly applies to the configuration of soft arrays. For hard arrays, there are very few real hard arrays on the market (see the forum post Serial ATA (SATA)-Support for linux ), this is not an introduction. Linux soft array is more stable and efficient than pseudo array ^_^.

Step 1: Create

Mdadm-C/dev/md0-l0-n2/dev/sd [AB] 1

Echo "DEVICE/dev/sd [AB] 1">/etc/md0.conf

Mdadm -- detail -- scan>/etc/md0.conf

This command creates the array md0 (-C/dev/md0), the array level is RAID0 (-l0, that is, -- level = 0), and the number of disk partitions is 2 (-n2, that is, raid-devices = 2), which is followed by the relevant disk partition.

Step 2: format/dev/md0

Mke2fs-j/dev/md0 (or mkfs. ext3)

Step 3: Mount

Mount/dev/md0/game

Finally, write the fstab file to enable automatic mounting upon startup.

This step is not complete yet, because the array will be deactivated after shutdown, and it needs to be activated before mounting the array. How to activate it?

Mdadm-A/dev/md0/dev/sd [AB] 1 can be activated.

Or:

Mdadm-A/dev/md0-c/etc/md0.conf

(-C/etc/md0.conf: Specifies a configuration file, which is the/etc/md0.conf written by the echo statement when the first step is to create the array card)

Now you know how to enable the array card. You only need to activate the array before mounting the fstab table to enable automatic mounting upon startup. How can I activate the array before the fstab table is mounted to the system? You can go to/etc/rc. d/rc. S (RedHat is/etc/rc. d/rc. the beginning of sysinit (/etc/rc. d/rc. S 9th ~ About 10 rows) Add the following if statement:

If [-f/etc/md0.conf]; then

Mdadm-A/dev/md0-c/etc/md0.conf

Fi

This is what we do in our eyoolinux. If there are multiple arrays, you can also use the following statement:

For mdx in/etc/md ?. Conf

Do

Mdnum = 'echo $ {mdx} | cut-c6-8'

Mdadm-A/dev/$ {mdnum}-c $ mdx

Done

If you are in trouble, copy the statement directly.

In this way, the array is mounted at startup.

(5) ntfs mounting

In eyoolinux, the related commands are ntfsmount.

For example: ntfsmount/dev/sda1/mnt

(6) Dual Network Card quota

To create a bond device, follow these three simple steps:

A. First, make sure that the corresponding driver has been loaded:

Localhost @ root ~ # Modprobe bonding

Or modprobe <3c59x | eepro100 | pcnet32 | tulip | ......>

B. assign an IP address to the same bond device.

Localhost @ root ~ # Ifconfig bond0 netmask <子网掩码> Broadcast <广播地址>

For example, ifconfig bond0 192.168.1.242 netmask 255.255.255.0 broadcast 172.31.3.254

C. Finally, add all the physical Nic interfaces to the bond device.

Localhost @ root ~ # Ifenslave bond0 [{-f | -- force} bond0 eth0 [eth1 [eth2]…]

For example, ifenslave bond0 eth0 eth1 depends on eth0 eth1 two Nic devices. -- Force indicates that the quota is enforced.

After creating a bond device, you can use it like a general Nic device.

For example, start bond0: # ifconfig bond0 up

Disable bond0: # ifconfig bond0 down

Add an interface without stopping bond0: # ifenslave {-d | -- detach} bond0 eth0 [eth1 [eth2]…]

-- Detach indicates the meaning of "additional"

Change the active slave device: # ifenslave {-c | -- change-active} bond0 eth0

-- Change-acitve indicates "change active slave device"

Show the main interface (bond0) Information: # ifenslave bond0

Show the interface information: # ifenslave {-a | -- all-interfaces}

-- All-interfaces indicates "all interfaces"

(7) solutions to faults with linux Network slogans

In some cases, it is clear that there is only one network card on the machine, but the network card number displayed in ifconfig is eth2 (or other non-eth0 format), but eth0 is gone. This may cause various problems when setting IP addresses. Here is a solution.

When the NIC number is abnormal, go to the/etc/udev/rules. d directory, delete the network-related files, and restart the machine. As follows (in slackware 12.0 ):

Localhost @ root ~ # Cd/etc/udev/rules. d // enter/etc/udev/rules. d

Localhost @ root ~ # Rm 75-network-deices.rules // Delete network-Related Files

Localhost @ root ~ # Reboot // This is not required

(8) adding text to hard drive mounting

For example, to mount/dev/sda1 to the/mnt directory, enter

Mount-o iocharset = utf8/dev/sda1/mnt/

The Chinese characters are displayed normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.