HOWTO
HOWTO: Home made NAS server with Ubuntu 8.04.1
[HOWTO] Using Ubuntu 8.04.1 to build a NAS Server
There are using NAS for home users in the market, such as Synology, Qnap, LinkStation and etc. they are not in good performance and not cheap in price. however, they are good in less power consumption. it is because I owned not only one brand of such products at home now.
There are many NAS products on the market, such as Synology, Qnap, and LinkStation. They have poor performance and are not cheap. However, I do well in terms of low energy consumption, so I have more than one brand of such products in my house.
Recently, I bought a VIA PC-1 PC2500E motherboard, which has VIA C7-D 1.5 GHz CPU on board. It is cheap in price and use less power too. The maximum amount of RAM is 2 GB.
Recently I bought a VIA PC-1 PC2500E board with a VIA C7-D 1.5 GHz CPU. Cheap and energy-saving. Up to 2 GB memory can be installed.
Testing it with Ubuntu 8.04.1 Desktop version for a while, I am very satisfied with the performance of the CPU, although it is not quite fast indeed. I decided to build a home made NAS server with remote BitTorrent function.
I tested Ubuntu 8.04.1 Desktop for a while. Although it was not fast enough, I was quite satisfied with the CPU performance. I decided to assemble the NAS server at home with the remote BT function.
Hardware
Hardware
Motherboard-VIA PC-1 PC2500E with VIA C7-D 1.5 GHz CPU
RAM-2X1 GB DDR2 667 MHz (maximum)
Hard drive-300 GB Seagate SATA (The motherboard treats it as ATA drive)
Router-Planet WRT-401E (wired) (optional)
Software
Software
Operating system-Ubuntu 8.04.1 Server Edition
File server-Samba
FTP server-vsFTPd
Remote access-OpenSSH
Web Server-Apache, PHP and MySQL
Remote BitTorrent-torw.flux (front-end) and BitTornado (back-end)
Security software-Fail2Ban
The performance of the Samba is quite good and it can stream the video clips. You can remote control the server with OpenSSH and also can remote the BitTorrent anywhere.
Samba has good performance and supports video streams. You can use OpenSSH to remotely control the server and BT.
I do not choose the GUI interface for server maintenance as it is not required after the server has been set up. I use command line mode indeed. http://ubuntuone.cn
I did not select a GUI for server maintenance, because the server is useless after installation. I use the command line.
The server needs some fine tune for better performance and I will tell you how. The installation of the softwares is in Part II.
I will introduce the location where the server needs to be optimized to improve performance later. The second part is software installation.
HOWTO: Home made NAS server with Ubuntu 8.04.1-Part II
[HOWTO] Using Ubuntu 8.04.1 to build a NAS server-Part II
Here comes the software installation. the first thing is to install the operating system-Ubuntu 8.04.1 Server Edition. the installation is quite straight forward and you shoshould choose LAMP, OpenSSH and Samba (Print server is optional) during the installation. use a more complicate but easy to remember password as the user password and MySQL password. I use same password for them. please write it down and you will need it later and forever.
Here is the installation of software. First, install the operating system Ubuntu 8.04.1 Server Edition. During installation, select LAMP, OpenSSH and Samba (optional for the Print Service ). Set complex and easy-to-remember passwords for operating system users and MySQL users. I used the same password. Please write it down and use it later.
Once installed, you can install vsFTPd and Fail2Ban. BitTorrent feature will be discuss later.
Next, install vsFTPd and Fail2Ban. BT will be added later.
Sudo apt-get update
Sudo apt-get upgrade
Sudo apt-get install vsftpd fail2ban
Samba
The Samba is already installed and you are required to configure it to make it work. I will make the Samba working in this way: Every user has it owned home directory and every user can access to a public directory for sharing document and files.
Samba has been installed. You need to complete the configuration to make it work. The Samba rules I designed are as follows: each user has its own private directory, and each user can access the public directory of shared files.
Sudo nano/etc/samba/smb. conf
To add the following lines to the [global] section:
In the [global] segment, add the following lines:
# If you need to access Big5 filename, it is required; otherwise it is optional.
# Dos charset = cp950
Dos charset = UTF-8
# Dos charset = cp936
To add the following lines to the [global] section also:
In the [global] segment, add the following lines:
Hosts allow = 127.0.0.1 192.168.0.0/24 192.168.10.0/24
Hosts deny = 0.0.0.0/0
At Authentication part, uncomment the "# security = user" to read as "security = user"
In the authentication section, remove the comment "# security = user" and change it to "security = user ".
Go to [homes] section and add the following lines to it:
In the [homes] section, add the following lines:
[Homes]
Comment = Home Directories
Path =/home/% S
Browseable = yes
Read only = no
Create mask = 0664
Directory mask = 0664
Valid users = % S
Add the following lines to the end of the file:
Add the following lines to the end of the file:
[Public]
Comment = Share to all
Path =/home/public
Browseable = yes
Read only = no
Create mask = 0664
Directory mask = 0664
Valid users = samiux, john, mary
Admin users = samiux
To reload the configuration of your Samba server:
Restart the Samba server.
Sudo/etc/init. d/samba reload
Where "admin users = samiux" may be different from you.
In the "admin users = samiux" section, your own settings should be different.
Then made a "public" directory at/home:
In/home, create the "public" directory:
Sudo mkdir/home/public
Chgrp users/home/public
Chmod 0777-R/home/public