SOLAIRS11 Configuring the Samba file service process (installation of SOLAIRS11 system, network configuration, installation and configuration of samba)

Source: Internet
Author: User
Tags pkill

DAO

Because of the many documents produced in the project, in order to centralize storage, decide to set up a server to run Samba. Do not know how the original thought, decided to use the UNIX system, the middle from FreeBSD to Solairs is really a toss ah! (otherwise this article will not be ^_^).

In fact, the installation of Windows or Linux is very convenient to configure, the choice of Unix because of its stability, relatively safe. In the beginning is installed in the virtual machine FreeBSD again, thinking that if the virtual machine can be configured to match the real machine should be very simple, but in the virtual machine FreeBSD is used in the minimal installation, and then perform the installation of Samba, that can be called slow ah, a variety of dependencies download compiled installation. Finally, the installation fails because some dependencies cannot be downloaded. I think it is not FreeBSD, instead of installing Solairs.

After writing, I looked back, completely became the stream of consciousness (sorry everyone), but the self-feeling should say, as well as some of their own points of attention have been explained clearly, if you find out what error is not enough please be sure to leave a message or e-mail to inform.

System Installation

First of all, I am a CD-ROM installation, because the USB stick installation is really uncertain ah. The wonderful thing is, when you download the official website provided by the U disk installation version, you have to solairs system through the Usbcopy tool to write a U disk operation (pull away).

after entering the installation interface will let you choose the keyboard layout, enter 27 to select the default American layout, immediately after selecting the language, enter 3 to select default 中文版.

Display operation, select 1 for system installation.

Welcome screen, notice the lower left corner by pressing F2 is equal to the next step. Skip the Welcome screen and choose to enter Discovery Selection, this step is to use local disk.

Enter into the disks, direct F2, do not need to hesitate.

Next choose to use the entire disk (using the Entrie disks), press F2 to continue.

Next fill in the computer identification, and then go to the network settings interface, here I choose automatically, because in the back can also be set again.

Next comes the time settings, language settings, and so on. Set the root password in the user interface, as well as users.

The next interface is to set up an Oracle registered mailbox password to get some official support, which can be skipped directly F2.

Next set up the agent, here does not need to set the direct F2 skip, then is installation summary display before the setup overview, press F2 after the installation process began. Installation to 100% may be a long time to wait, at this time do not mistakenly think that the installation failed, do not press F9.

When the installation is complete, press F8 to restart.

Network configuration

After entering the system, we began to configure the network, first of all to account for my network:

IP Address: 211.68.35.237

Mask: 255.255.255.0

Gateway: 211.68.35.1

dns:211.82.96.1

Address segment: 211.68.35.223~211.68.35.242

Task one: Wirelessly connect the extranet via a laptop

It was done with Ifconfig in Linux or FreeBSD, but two new commands Ipadm and Dladmwere added to the SOLAIRS11 (this is not available here). Detailed usage Oracle's official website has "1", which is explained by my needs. To switch to the root user, type the following command to see which NICs are available.

#ifconfig-A

I have shown here a lo0,net0 two net card. According to the name can know net0 for my physical network card, Lo0 is a loopback network card (do not know this is called right). Run the following command to see the configuration on the net0.

#ipadm show-addr

I have shown here that the NET0/V6,NET0/V4 represents two configurations on the physical NIC Net0, where V4 represents some of the IPv4 configuration, and V6 is a configuration that represents IPv6 (which can be deleted), like V4,V6 can name it when set up. The following command is to remove the V6 configuration on the net0.

Delete-addr net0/v6

Next, in order to install Samba software, we need to be networked to operate. However, I only have a laptop and only wireless connection, but also the wireless needs to be through the Web pop-up page user name password authentication before the Internet. Therefore, in order to solairs the Internet, you must go through my laptop, that is, to connect the notebook and the server via a network cable, and then share the laptop's wireless network to the laptop's wired card. Therefore, the following actions must be performed on the notebook side:

Open the Network Center, click on the wireless network, properties, share, and then make the following settings, remember to click on the " Local connection ", at the same time remember to tap the settings (the lower right corner of the picture in the red box) in the pop-up box to all the box tick.

This allows the wireless network to be shared with the wired network, but the IP address of the laptop's wired network card is forced to be assigned via DHCP (regardless of the IP you set previously), and the server side can only be automatically assigned via DHCP. Enter the following command on the server side to set the IP to be automatically assigned to DHCP.

#ipadm create-addr-t DHCP net0/v4d

Remove other net0/xxx configurations at the same time. If you do not have an accident, you can access the extranet.

Task two: Networked installation of Samba

Run the following command $pkg search Samba, you can see some installation file information about Samba listed on the screen.

Next, switch to root, select the first Samba installation file in the list, enter the command #pkg install Service/network/samba, and start downloading the file as shown and automatically resolve dependencies.

Wait a moment and the system will automatically complete the installation.

Task three: Configure fixed IP, gateway, DNS

Enter the command #ipadm create-addr–t static–a 211.68.35.237/24 net/v4 Set the IP, and delete it before the DHCP configuration that is set for networking needs is net0/v4d.

Enter the command #route –p add default 211.68.35.1 to set the gateway.

Enter the following command (shown in the figure) to set up the DNS service.

This concludes the installation and network configuration. About the network configuration This block can also refer to the Baidu Library document "2".

Samba configuration

Let's introduce the following samba configuration file:

Global Settings (globally set)

This setting affects the overall operating environment of the samba service and is a setting for all shared resources.

Share definitions (Shared settings)

This setting is for individual settings of the shared directory and only works on the current shared resource.

Home Settings (personal home directory settings)

Unified setup of the home directory for each account

Workgroup = Workgroup

Set the workgroup name to which the samba server belongs

NetBIOS name = Samba

Set the name of the Samba server

Server string = Samba Server

Set up a brief description of the Samba server

Hosts allow = 202.193.161. 127.

Set up IP segments that allow access to the Samba server

Username level = 32

Set user name length limit to 32 bits

Password level = 32

Set the password length limit to 32 for

Share definitions (Shared settings)

Path =/home/samba

Specify the full path of the current shared resource

Comment = Samba share

Comment Description

public = No

Whether to share publicly (only if security = share is the only function)

Vaild users = User

Set only users in this list to access shared resources

Invalid users = user

Setting only users in this list cannot access shared resources

browseable = yes

Whether you can browse

Read Only = yes

is read-only

writeable = yes

Whether it can be written

Read list = user, User1, user2

Set the user in this list to read-only

Write list = user, User1

If it is set to read-only, only users in this set list can write actions

Create mask = 0664

Permissions given when creating a file

Directory mask = 0775

Permissions given when setting up a directory

My situation here is the group of six people each one account. This assumes

User group: Samba_admin,proj.

User: U1,u2,u3,u4,u5,u6.

The following is the actual operation, switch to the root account;

Then run the command #groupadd samba_admin to create the Samba_admin group;

Run the command #groupadd PROJ to create the PROJ group;

Run the command #useradd –g samba_admin–g proj–s/usr/bin/false U1 to create the user U1, where the-G user belongs to the group,-G user-attached group. -S is the shell used to set the user's login to the system, this is/usr/bin/false meaning that the U1 account can only be used to access samba and cannot log on to the system. The other five users are also configured as commands.

Then create the directory where the file server holds the file, and use the command #mkdir test_dir to create the Test_dir folder in the OPT directory of the server.

The next step is to modify the Samba configuration file, I see online about the configuration of samba is to download the source code and then compile, I am too troublesome to use the Pkgadd way, so the configuration file smb.conf location will be a little different, I am here in/etc/ There is a smb.confexample file under the Samba folder, type the command #cp smb.confexample smb.conf for backup. Type the command #vim smb.conf To edit the configuration file.

Here are the changes:

Security = usr

Local printers = No

Add the following information in the Share Definitions section (or change the [public] block directly)

[Test]
Comment = This is a test

Path =/opt/test_dir
Public = yes
Create mask = 0644
Directory mask = 0775
writable = yes
browseable = yes
printable = no
Valid users = @PROJ

Change to save, restart Nmbd,smbd,winbindd three services, the command is:

#pkill NMBD//First stop three services

#pkill SMBD

#pkill winbindd

#nmbd –D//Turn on three services

#smbd –D

#winbindd –D

Call out under window to run, enter \\211.68.35.237 return should be able to pop up the landing box. However, the password has not been set for each user and is still inaccessible, so the last step is to set the password. Type the command under Solairs #smbpasswd –a U1 to set the password for the user U1 (the same is true for other users), which can be accessed without an accident.

Reference content

"1" http://www.oracle.com/technetwork/cn/articles/servers-storage-admin/s11-network-config-1632927-zhs.html

"2" http://wenku.baidu.com/link?url= Ia8vj7ebarp83jzju2vo4pjgtiezmp6c4iwf07-qjixgw7mn7651eduvqmlndpeqiehmpwpkqq-stehkfqgc0iotvs7la8wbo8pfizjrwag

SOLAIRS11 Configuring the Samba file service process (installation of SOLAIRS11 system, network configuration, installation and configuration of samba)

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.