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
or, if you have a i586 system,
The media test can take a while, so I skip it (however, you are free to run it nevertheless):
Choose your language:
Then select your keyboard layout:
Please make sure there’s no important data on the hard disk(s) as all hard disks will be formatted:
Select your time zone:
The hard disk(s) will be formatted (a /boot and a / partition):
The install image is transferred to the hard disk(s):
and the installation begins. This can take a few minutes:
After the installation remove the SME Server CD from the system and hit Reboot:
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:
Confirm that password:
It’s possible that the system thinks that your password is too weak. If you want to proceed with that password, hit No:
Enter the domain name for your server, e.g. example.com:
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):
Next set the IP address of your SME Server, e.g. 192.168.0.100:
Specify the subnet mask, e.g. 255.255.255.0:
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:
Afterwards specify the IP address of your gateway (e.g. 192.168.0.1):
Then switch off the DHCP server on the SME Server (we have a DHCP server on our hardware router):
Don’t specify any DNS servers:
Hit Yes to activate all your selections:
Your changes are being activated:
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:
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:
After the successful internet connection test you can select 8. Exit from the server console:
5 Update The System
Next go to https://192.168.0.100/server-manager/ with a browser and log in as admin:
You should now see the SME Server web interface. If you like you can now browse the menu to get used to it:
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:
Select the updates you want to install (if there are updates available), then click on Install selected updates:
Yum will download and install the updates. This can take a few minutes:
Afterwards, click on Reconfigure. If a reboot is required, the system will tell you so:
In my case I had to click on Reconfigure twice before the system actually started to reboot:
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:
Fill in a user name (e.g. joe) and the details of the user (name, company, etc.). Then click on Add:
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:
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):
Now that we’ve specified a password, the red Reset password has gone, and the setup of our user joe is finished.
Now let’s set up our user group sales. Go to Groups and click on Add group:
Enter the group name (sales), a brief description (e.g. Sales Dpt.) and specify the group members (e.g. joe):
Afterwards, you should find the sales group in the list of available groups:
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:
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).
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.
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):
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:
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:
You will be prompted for a username and password. Fill in joe and joe‘s password:
After the successful login, you should see joe‘s home directory, the Primary i-bay, and the sales_share i-bay:
Enter the sales_share folder. You should find the cgi-bin, files, and html folders there:
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:
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.
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:
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:
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:
You will get to the user’s home directory first:
If you go up two directories, you will be at the ibays level, from where you can change into the sales_share directory:
- 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