Configure linux Server (samba + multiple hard disks + multiple NICs + http)

Source: Internet
Author: User
Configure the linux Server (samba + multiple hard disks + multiple NICs + http)-Linux Enterprise Application-Linux server application information. For more information, see the following. Server hardware: A 865-inch motherboard, two 3COM NICs, two hard drive accelerator cards, and eight hard drives

Server Configuration Requirements: the operating platform is the redhat9.0 workstation that runs windows. On the workstation, you need to access the server through samba and http. The server needs to bind the NIC, and multiple hardware must be shared.

Step: I first mounted three hard disks, one system disk hda, and the other two mounted on the two hard disk acceleration cards with the drive letter hde1hdk1

In LINUX, each mounted disk must be mounted to the system (except hda). That is to say, the hard disk will be automatically mounted each time the system starts.

Attach a hard disk:

You can create a folder in a folder to mount the hard disk.

Mkdir/home/songe

Mkdir/home/songk

The command for mounting a hard disk is

Mount/dev/hde1/home/songe

Mount/dev/hk1/home/songk

If you want to go up permanently, edit the rc. local file and write the two commands into it.

Vi/etc/rc. d/rc. local

Configure samba

Edit smb. conf

Vi/etc/samba/smb. conf

After the entry, it is mainly modified

Workgroup = WORKGROUP (the workstation will also be added to this working group)

Server string = myserver

Netbios name = myserver

Log file =/var/log' samba/% m. log

Ma log size = 50

Security = user

Username map =/etc/samba/smbusers

Guest OK = yes

Guest account = blueice

Dns proxy = no

[Songe]

Path =/home/songe

Public = yes

Only guest = yes

Writable = yes

Printable = no

To share other songk files, you need to add the same language as the above content.

[Songk]

Path =/home/songk

Public = yes

Only guest = yes

Writable = yes

Printable = no

The command to restart the smb server is

/Sbin/service smb restart

If you can access the files shared by the server but cannot write them under the workstation, check whether there is no write restriction on the attributes of your shared files. Run the following command to modify the corresponding read/write permissions:

Chmod a = rwx/home/songe-R

Configure HTTP

I configured http in a very simple way.

Go to the html directory,

Cd/var/www/html

Create a quick connection

Ln/home/songe-s

Ln/home/songk-s

As long as the workstation accesses songk over HTTP, The songk directory under the self-access/var/www/html directory is displayed on the surface. In fact, the system itself will make a conversion, to the/home/songk directory

If there are other directories, perform the same operation.

Configure dual-nic

Install the driver of the dual-nic first. Do not set the IP address of the NIC.

Modprobe bonding

Ifconfig eth0 down

Ifconfig eth1 down (this command is not required if your two NICs are DOWN)

Ifconfig bond0 192.168.0.1 (set the bound IP address of your dual-nic)

Ifenslave bond0 eht0

Ifenslave bond0 eht1

If you have configured a dual-network card, you can PING the network card even though you cannot share the network card through SAB but HTTP. Enter iptables-F to clear the firewall.

If you want to automatically bind the network card at startup, write the dual-nic binding program to rc. local.

Modprobe bonding

Ifconfig eth0 down

Ifconfig bond0 192.168.0.1

Ifenslave bond0 eht0

Ifenslave bond0 eht1

Iptables-F
Related Article

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.