Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Set Up A Fileserver For Small/Medium Enterprises With SME Server 7.1


This tutorial shows how to set up a fileserver for small and medium enterprises with SME Server 7.1. SME Server is an open-source Linux server distribution (released under the GPL) based on CentOS that can turn a computer into a gateway, firewall, fileserver, printserver, mailserver (including webmail), etc. In this article we will focus on the fileserver aspect of SME Server.

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

The system on which I will install SME Server in this tutorial will have the IP address 192.168.0.100 (hostname: server1.example.com). I already have a gateway with a firewall and a DHCP server on it (IP address: 192.168.0.1), therefore I don’t configure the SME Server as a gateway, and I also disable DHCP on the SME Server.

I think this is a common setup as most businesses and also home networks own a hardware router nowadays that comes with a firewall and a DHCP server.

My SME Server has two identical hard disks (same size). That way the SME Server installer will automatically configure a RAID1 array out of these two disks. Please note that if you use more than one hard disk, all hard disks must be identical in size!

If you use only one hard disk, the installler will set it up as one half of a RAID1 array. With two hard drives, it will configure a RAID1 array, with three to five hard disks it will configure a RAID5 array, and if you use six or more hard disks, the installer will set up a RAID6 array.

 

2 Installation Of The Base System

Please download the SME Server iso image from http://www.smeserver.org and burn it onto a CD. Then boot from that CD. At the boot prompt type

sme

or, if you have a i586 system,

smei586

1

The media test can take a while, so I skip it (however, you are free to run it nevertheless):

2

Choose your language:

3

Then select your keyboard layout:

4

Please make sure there’s no important data on the hard disk(s) as all hard disks will be formatted:

5

Select your time zone:

6

The hard disk(s) will be formatted (a /boot and a / partition):

7

The install image is transferred to the hard disk(s):

8

and the installation begins. This can take a few minutes:

9

10

After the installation remove the SME Server CD from the system and hit Reboot:

11

3 Initial Configuration

The basic system is now installed. After the reboot you must answer a few questions so that the installer can proceed with the initial system configuration.

First, specify a password for the SME Server administrator (username: admin). This will also be the root password:

12

Confirm that password:

13

It’s possible that the system thinks that your password is too weak. If you want to proceed with that password, hit No:

14

Enter the domain name for your server, e.g. example.com:

15

Then specify the system name (e.g. server1). The system name and the domain name make up the host name (server1.example.com in this example):

16

Next set the IP address of your SME Server, e.g. 192.168.0.100:

17

Specify the subnet mask, e.g. 255.255.255.0:

18

Next we must select the operation mode. As our SME Server will not act as a gateway and firewall (remember, we have a hardware router), we choose Server-only here:

19

Afterwards specify the IP address of your gateway (e.g. 192.168.0.1):

20

Then switch off the DHCP server on the SME Server (we have a DHCP server on our hardware router):

21

Don’t specify any DNS servers:

22

Hit Yes to activate all your selections:

23

Your changes are being activated:

24

Your SME Server is now ready for use!

4 The Server Console

After the completed installation, you can now log in on the shell with the username admin and the admin password. Afterwards, you will see the server console:

25

It gives you the opportunity to change settings, view status reports, reboot the system, etc. Most of the time you don’t need it as you can do almost everything from the SME Server web interface (which I will cover next). However, we can test now if the SME Server has internet access:

26

27

28

After the successful internet connection test you can select 8. Exit from the server console:

29

5 Update The System

Next go to https://192.168.0.100/server-manager/ with a browser and log in as admin:

30

You should now see the SME Server web interface. If you like you can now browse the menu to get used to it:

31

It’s a good idea to check for updates before we are going to use the system.Therefore, go to Software installer and click on Install available updates:

32

Select the updates you want to install (if there are updates available), then click on Install selected updates:

33

Yum will download and install the updates. This can take a few minutes:

35

Afterwards, click on Reconfigure. If a reboot is required, the system will tell you so:

36

37

In my case I had to click on Reconfigure twice before the system actually started to reboot:

38

6 Create Users And Groups

Let’s assume we have multiple departments in our enterprise, and for each department we want to create a share of its own on our SME Server fileserver. Therfore we create a group for each department (e.g. a group called sales), and for each employee we create a system user and add that system user to the group (department) that he works in.

To create a user, go to Users and click on Add user account:

40

Fill in a user name (e.g. joe) and the details of the user (name, company, etc.). Then click on Add:

41

The user has been created, but you will see a red Reset password because we haven’t specified a password for joe yet. Therefore, click on Reset password:

42

On the next page, you can specify a password for joe (the system expects capital and lowercase letters, numbers, and an underscore in the password, otherwise you will get an error):

43

Now that we’ve specified a password, the red Reset password has gone, and the setup of our user joe is finished.

44

Now let’s set up our user group sales. Go to Groups and click on Add group:

45

Enter the group name (sales), a brief description (e.g. Sales Dpt.) and specify the group members (e.g. joe):

46

Afterwards, you should find the sales group in the list of available groups:

47

7 Create A File Share

On SME Server, file shares are called i-bays (information bays), and each i-bay consists out of three folders: cgi-bin, files, and html. Into the files folder you put all files/documents that you want to share with others – these files will be accessible over Samba (e.g. in the windows Explorer). Files/documents that you put into the html folder will be accessible over Samba and over http, i.e. you can access them in your browser. For example, you could place HTML documentations into that folder to instruct members of your department, etc. Into the cgi-bin folder you can place CGI scripts that can be executed by the web server, but we will not cover this here.

On each SME Server there is always one default i-bay, called Primary. This one cannot be removed or modified.

To create an i-bay for our sales group, go to Information bays and click on Add i-bay:

48

 

Then fill in the name of the share (this must be different from the group name, so you cannot name it sales, but sales_share is ok) and select the group (sales).

48a

Then select who can read from and write to that share via Samba. If only members of the Sales department should be able to write to and read from that share, then Write = group, Read = group is the right choice. If the Sales department should only be able to read, but not write, you would select Write = admin, Read = group. And if the Sales department should be able to write and everybody should have read access, then Write = group, Read = everyone is the correct choice.

49

Next specify how the files in the html folder should be accessed. If it contains confidential information, you should probably select Local network (password required):

50

After we have created the sales_share i-bay, we must assign a password to that share, so we click on the red Reset password:

51

52

8 Test The File Share

Now that we’ve created our first file share, we can test it on a Windows client. Go to Start -> Run and fill in \\192.168.0.100:

55

You will be prompted for a username and password. Fill in joe and joe‘s password:

56

After the successful login, you should see joe‘s home directory, the Primary i-bay, and the sales_share i-bay:

57

Enter the sales_share folder. You should find the cgi-bin, files, and html folders there:

58

To test if we can access the html folder in a browser, open a browser and enter https://192.168.0.100/<name of i-bay>/, so in our case that would be https://192.168.0.100/sales_share/. You will be prompted for a user name and password (because we specified that the html folder requires a login from the local network when we created the i-bay). The user name would be the name of the i-bay, e.g. sales_share, along with the password we specified for that i-bay:

59

You should see the contents of the standard index.html file that is in the html folder. You can replace that file with any contents you like.

60

9 User Passwords

You might have wondered that up to now, only admin has access to the SME Server web interface, so if a user wants a changed password, the admin would have to log in and change it. Fortunately, this can be done by the users themselves. All they have to do is go to https://192.168.0.100/user-password/ in a browser:

61

10 FTP

You might have noticed that FTP access was mentioned when we set up the i-bay. Normally you don’t need FTP access, but if you do: To enable FTP access to your i-bays, go to Remote access and activate FTP access. This will make the FTP server start:

62

Afterwards, open an FTP client such as SmartFTP, WS_FTP, gFTP, etc. and log in to 192.168.0.100 with your username (e.g. joe) and password:

63

You will get to the user’s home directory first:

64

If you go up two directories, you will be at the ibays level, from where you can change into the sales_share directory:

65

  • SME Server: http://www.smeserver.org
  • SME Server Sourceforge Project Page: http://smeserver.sourceforge.net
  • SME Server Documentation: http://smeserver.sourceforge.net/sme7/docs?v=18vb

 

 

Comments

comments