Thursday, August 27, 2015

[NAS Server]: How To Install FreeNAS 9.3

How To Install FreeNAS 9.3

  

Introduction

FreeNAS is a Network Attached Storage operating system. It is freeBSD based and support CIFS, NFS, iSCSI, FTP, RSYN along with RAID support. It is a web based, open source and one of the well known central data storage management tool.

Features

Replication

It supports ZFS File systems. ZFS snapshots can be used to create remote backup, or additional snapshot of the same file system can be created incremental. In case of any local disk failure any ZFS snapshot can be sent to the new ZFS file system to recover data.

Data Security

RAID-Z is a part of RAID in ZFS file system. ZFS file system make sure data integrity throughout. Every file system is verified with checksums from top to bottom.

Data Encryption

FreeNAS has a unique feature of data encryption with ZFS file system, which is not available with another Ope Source NAS projects, even a full-volume data encryption is also available. Encrypted  volume is readable to FreeNAS only which possess the master key for that particular volume. Optionally pass-phrase can also be used by the user to put an extra layer of security.

File Sharing

You can share data with FreeNAS like a pro. It supports every major operating system with SMB, CIFS (MS Windows), NFS (Unix/Linux), AFP (Apple) along with FTP or iSCSI data sharing methods. Additionally it also supports VMware VAAI, MS ODX, MS Server 2008 and 2012 R2 based Clustering.

Web based Management

Every aspect of FreeNAS can be managed with available Web Based Management system. Everything can be managed with web admin panel including volume creation, user based permission setting or updating software. ssh is also available with FreeNAS.

Plugins

A lots of third party plugins are also available with FreeNAS to enhance utility of FreeNAS, user can use various applications as per their need.
Some of the available plugins are:
  • Bacula – for Network based backup.
  • Couchpotato – automatic torrent downloader.
  • Crashplan – Backup data to remote server or computers.
  • Owncloud – Manage your personal cloud.

Installation

Requirements

  • A x64 bit processor based Hardware
  • 4 GB RAM
  • Minimum 1 TB Storage

Step 1

Download FreeNAS from this link. Burn ISO image to DVD or make a Bootable usb.
Power on your system and start installation process, Select option 1 and press enter.

unxmen_(002)

Step 2

Select Storage device and press ok.
unxmen_(003)

Step 3

Press ‘Yes’ to confirm installation process.

unxmen_(004)

Step 4

Provide Admin password and retype password and press ok.
unxmen_(005)

Step 5

After installation process is over, system will ask to reboot, press ok and remove boot media.
unxmen_(007)

Step 6

Select Normal boot and press enter.
unxmen_(009)

Step 7

After boot process is over a menu will be listed which include all of the management tool, note the ip address listed below which we will use to manage our FreeNAS.
unxmen_(013)

Step 8

Open Browser in remote system and navigate to http://IP-address/.
Login as ‘root’ user and password which was configured in installation process.
Now, FreeNAS management wizard will appear where number of options are available to manage your backup.
unxmen_(012)
Using the FreeNAS management console, you can setup and configure your storage systems easily.
For more details, I recommend you to refer the official documentation page.
Good luck!
Reference link:

[Mail & Collaboration Suite] Citadel – A Free, Open Source, Email And Collaboration Suite

Citadel – A Free, Open Source, Email And Collaboration Suite

About Citadel

Citadel is a free, open source Collaboration suite that can be used to setup and manage Email server, Calendars, address books, Instant messenger, mailing lists and much more. It is written mostly using “C” language and is a highly integrated Groupware Platform with a AJAX-powered “Web 2.0” interface, but also providing SMTP, IMAP, POP3, and GroupDAV access to its content.
Citadel offers versatile email services with very low administration needed. It provides its own implementations of these server protocols:
  • IMAP
  • POP3
  • SMTP
  • ManageSieve
  • XMPP
  • Citadel
It works well on most Linux operating systems, Solaris, and *BSD systems.

Prominent Features

Citadel has lot of useful features. Here, I list some important features.
  • Email
  • Calendar/scheduling
  • Address books
  • Bulletin boards (forums)
  • Mailing list server
  • Instant messaging
  • Wiki and blog engines
  • Multiple domain support
  • A powerful web interface
  • RSS aggregation
  • and more…

Installation

1. Install required prerequisites

Log on to your system as root user and install the following prerequisites.
In DEB based systems:
apt-get update
apt-get upgrade
apt-get install build-essential curl g++ gettext shared-mime-info libssl-dev
In RPM based systems:
yum update
yum groupinstall "Development Tools"
The following additional packages are also recommended:
yum install gettext shared-mime-info openssl-devel
If you want to use system icons such as the GNOME File Icons in WebCit, install:
yum install gnome-icon-theme
Then, create proper symlinks as shown below in RPM based systems such as RHEL, CentOS.
cd /usr/local/webcit/static
ln -s /usr/share/icons/gnome/24x24/mimetypes icons
In Arch Linux:
pacman -S curl expat libical libsieve perl-berkeleydb

2. Install Citadel using Easy install script

After installing the required prerequisites, run the following command to install Citadel.
wget -q -O - http://easyinstall.citadel.org/install | sh
Press Enter to start:
Welcome to Citadel Easy Install
Running on: Linux Debian jessie/sid ( 3.19.0-15-generic x86_64)
We will perform the following actions:

Installation:
* Download/install supporting libraries (if needed)
* Download/install Citadel (if needed)
* Download/install WebCit (if needed)

Configuration:
* Configure Citadel
* Configure WebCit

Perform the above installation steps now? ## Press Enter ##
Accept License terms:
[...]

Do you accept the terms of this license?
If you do not accept the General Public License, Easy Install will exit.
Enter Y or Yes to accept: Y ## Type Y and Press Enter key ##
Be mindful that it will take lot of time, because this command will compile a lot of code.
Please enter the name of the Citadel user account that should be granted administrative privileges once created.
root@server: -home-sk_001
Enter a password for the system administrator.
root@server: -home-sk_002
Citadel needs to run under its own user ID. This would typically be called “citadel”, but if you are running Citadel as a public site, you might also call it “bbs” or “guest”. The server will run under this user ID. Please specify that user ID here. You may specify either a user name or a numeric UID.
root@server: -home-sk_003
Please specify the IP address which the server should be listening to. You can name a specific IPv4 or IPv6 address, or you can specify “*” for “any address”, “::” for “any IPv6 address”, or simply “0.0.0.0” for “any IPv4 address”.
If you leave this blank, Citadel will listen on all addresses. This can usually be left to the default unless multiple instances of Citadel are running on the same computer.
root@server: -home-sk_004
Specify the TCP port number on which your server will run. Normally, this will be port 504, which is the official port assigned by the IANA for Citadel servers. You will only need to specify a different port number if you run multiple instances of Citadel on the same computer and there is something else already using port 504.
root@server: -home-sk_005
Please choose the user authentication mode. By default Citadel will use its own internal user accounts database. If you choose Host, Citadel users will have accounts on the host system, authenticated via /etc/passwd or a PAM source.
LDAP chooses an RFC 2307 compliant directory server, the last option chooses the nonstandard MS Active Directory LDAP scheme. Do not change this option unless you are sure it is required, since changing back requires a full reinstall of Citadel.
  • 0 – Self contained authentication
  • 1 – Host system integrated authentication
  • 2 – External LDAP – RFC 2307 compliant directory
  • 3 – External LDAP – nonstandard MS Active Directory
root@server: -home-sk_006
Select Yes and press enter.
root@server: -home-sk_007
Select Yes and press enter to automatically start Webkit (Web console for Citadel) at every reboot.
root@server: -home-sk_008
Select the locale webcit should use. In my case, I selected “en_US”.
root@server: -home-sk_010
Select on which port do you want WebCit to listen for HTTP requests. You can use the standard port (80) if you are not running another web server (such as Apache), otherwise select another port.
I go with defaults, because I don’t have any existing web server.
root@server: -home-sk_011
Select On which port do you want WebCit to listen for HTTPS requests.
root@server: -home-sk_012
Congratulations! Citadel has been installed.
root@server: -home-sk_013
Please note that Citadel will be installed to ”/usr/local/citadel” directory, WebCit will be installed to ”/usr/local/webcit”, and the supporting libraries will be installed to ”/usr/local/ctdlsupport”.
Now, let us go further and configure Citadel for daily usage.

Accessing Citadel Web console

Open your web browser and navigate to http://ip-address:2000/ or http://domain:2000.
The following page should appear. Enter your administrative account name and it’s password which we have created during the installation process. In my case, my administrative account is “sk”, and it’s password is “ubuntu”. I recommend you to set any strong password to tighten your security.
- Citadel Server - Google Chrome_001
This is how my Citadel Dashboard looks.
Lobby - Citadel Server - Google Chrome_002
From here, you can create multiple domains if you want, create users, create blog posts and so on.
First, let us create some domains and users.

Creating new domains

To create a domain, click on the Administration button on the bottom of the left column menu.
Lobby - Citadel Server - Google Chrome_002
In the next window, click “Domain names and Internet mail configuration” link in the Global Configuration section.
Lobby - Citadel Server - Google Chrome_003
In the Local host aliases and Directory domains sections, enter your domain name without prefix www and click Add button.. For example, in my case I entered unixmen.local.
Lobby - Citadel Server - Google Chrome_006
You can add as many domains as you want.
Next, we need to create some users.

Creating new users

Go back to Administration page and click on the link that says “Add, change, delete user accounts” in the User account management section.
Enter your desired username and click Create button.
Lobby - Citadel Server - Google Chrome_008
In the next window, set password for the newly created user account. Also, make sure the Permission to send internet mail option is checked. Click the Save changes button.
Lobby - Citadel Server - Google Chrome_009
Similarly, you can create as many users as you want.
Now, let us check whether the newly created user is able to send and receive mail.

Composing a Test mail

Click on Mail button in the left column box of Citadel dashboard. Click Writemail to compose a mail.
Mail - Citadel Server - Google Chrome_010
Enter the recipient’s mail id (Ex. senthil@server.unixmen.local) and compose your message and finally click Send message.
Mail - Citadel Server - Google Chrome_011
Now, log off from the current user and log in again as a new user. In my case, my newly created user is “senthil”.
Go to the Mail section and check for the new mail.
Mail - Citadel Server - Google Chrome_012
As you see in the above screenshot, I got a new mail. To read the mail, just click on it.
Mail - Citadel Server - Google Chrome_013
Congratulations! Our mail server is working!!

Citadel screenshots

Here is some sample screenshots that will give a basic ideas of it’s various features.
Citadel Calendar:
Calendar - Citadel Server - Google Chrome_014
Citadel Contacts:
Contacts - Citadel Server - Google Chrome_015
Citadel Notes:
Notes - Citadel Server - Google Chrome_016
Citadel Tasks:
Tasks - Citadel Server - Google Chrome_017
Citadel Chat room:
Tasks - Citadel Server - Google Chrome_018
For more usage details, I recommend you to refer the official documentation page.
Also, refer Citadel FAQ/Knowledge base page for any kind of troubleshooting.

Uninstalling Citadel

I hope you won’t do it. In case, you don’t like Citadel, you can easily uninstall it simply by deleting the following directories.
  • /usr/local/citadel
  • /usr/local/webcit
  • /usr/local/ctdlsupport
Then, remove the entries for “citadel” and “webcit” in your init scripts (/etc/init.d) directory.

Conclusion

As far as I know, Citadel is an impeccable groupware solution and it just works out of the box. It is one of the most easiest suite ever I have tried. Even, a novice user can easily install and configure Citadel in few hours. If you’re looking for a Groupware, Citadel might be suitable solution. Give it a try, you won’t be disappointed.
Cheers!
Reference links:

 

Wednesday, August 26, 2015

[PXE Server ]: Install And Configure PXE Server On Ubuntu 15.04

Install And Configure PXE Server On Ubuntu 15.04


This tutorial describes how to setup a PXE server on Ubuntu 15.04 server and how to configure a PXE client.

Now, let us start to setup and configure PXE server on Ubuntu 15.04. This method should work on previous Ubuntu versions like Ubuntu 14.10, 14.04 etc.

Scenario

My test box(pxe server) details are given below:
  • Operating System: Ubuntu 15.04 server.
  • IP Address: 192.168.1.101/24.

Install PXE Server

First, you should Install and configure DHCP server on your PXE server.

Install DHCP Server in Ubuntu

Let us see how to install and configure DHCP server in Ubuntu 15.04 64 bit server.
To install DHCP server on Ubuntu 15.04, enter the following command:
sudo apt-get install isc-dhcp-server

2.1 Configuration

DHCP server configuration is not that difficult. First, we have to assign on what interfaces should the DHCP server (dhcpd) serve DHCP requests. In my case, I have only one Interface on my system (eth0), so I assigned eth0.
To do that, edit file /etc/default/isc-dhcp-server,
sudo vi /etc/default/isc-dhcp-server
Assign the network interface:
[...]
INTERFACES="eth0"
Save and close the file.
Now, edit dhcpd.conf file,
sudo vi /etc/dhcp/dhcpd.conf
Make the changes as shown below.
Set the domain name and domain-name servers:
[...]

# option definitions common to all supported networks...
 option domain-name "unixmen.local";
 option domain-name-servers server.unixmen.local;

[...]
If this DHCP server is the official DHCP server for the local network, you should uncomment the following line:
[...]
authoritative;
[...]
Define the sunbet, range of ip addresses, domain and domain name servers like below:
[...]
# A slightly different configuration for an internal subnet.
 subnet 192.168.1.0 netmask 255.255.255.0 {
 range 192.168.1.20 192.168.1.30;
 option domain-name-servers server.unixmen.local;
 option domain-name "unixmen.local";
 option routers 192.168.1.1;
 option broadcast-address 192.168.1.255;
 default-lease-time 600;
 max-lease-time 7200;
 }
[...]
If you want to assign a fixed IP address to your client, you should enter it’s MAC id and the IP address in the following directive. For example, I want to assign a fixed IP address 192.168.1.15 to my Ubuntu client, therefore I modified the following directive as shown below.
[...]
host ubuntu-client {
 hardware ethernet 00:22:64:4f:e9:3a;
 fixed-address 192.168.1.15;
 }
[...]
After making all the changes you want, save and close the file. Be mindful that if you have unused entries on the dhcpd.conf file, comment all of them. Otherwise, you’ll get issues while starting dhcp service.
Now, restart dhcp service:
In Ubuntu 15.04:
sudo systemctl restart isc-dhcp-server
In Ubuntu 14.04 and older systems:
sudo service isc-dhcp-server restart
Likewise, you can start/stop dhcp service as shown below:
In Ubuntu 15.04 systems:
sudo systemctl start isc-dhcp-server
sudo systemctl stop isc-dhcp-server
In Ubuntu 14.04 and older systems:
sudo service isc-dhcp-server start
sudo service isc-dhcp-server stop

3. Configure DHCP Clients

Now, go to the client configuration network settings and change the IP settings to Automatic (DHCP).
Here is my Lubuntu 14.04 settings:
Editing Wired connection 1_001
Restart the network or reboot the client system to get IP address automatically from the DHCp server.
Now, you should see the IP address has been automatically assigned to the clients from the DHCP server.
Run the following command from the client system Terminal:
sudo ifconfig
 
 

DHCP Server will surely be providing IP to clients..

 
 

Now, install the following necessary packages for setting up PXE environment:
sudo apt-get install apache2 tftpd-hpa inetutils-inetd

Configure PXE Server

Edit file /etc/default/tftpd-hpa,
sudo nano /etc/default/tftpd-hpa
Add the following lines to enable TFTP server.
[...]
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
Then, edit file /etc/inetd.conf,
sudo nano /etc/inetd.conf
Scroll down to the end, and modify or add the following line.
tftp    dgram   udp    wait    root    /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
Save and close the file. If you use IPv6, please change the word udp to udp4.
Restart tftp service:
sudo /etc/init.d/tftpd-hpa restart

Copying Ubuntu Installation files to PXE Server

You can either mount the Ubuntu Installation ISO image and copy them to your PXE server or can directly copy the files from your Installation CD/DVD.
For the testing purpose, Here I am going to deploy Ubuntu 15.04 server OS on my PXE client, so I mounted the ISO image on /mnt directory.
I already have the ISO image on my home directory, so I ran the following command to mount it on /mnt directory.
sudo mount -o loop /home/sk/ubuntu-15.04-server-amd64.iso /mnt/
The Ubuntu 14.04 ISO image has been mounted successfully. Now, go to the /mnt/ directory, and copy the required files from the ISO image to /var/lib/tftpboot/ directory.
cd /mnt/
sudo cp -fr install/netboot/* /var/lib/tftpboot/
Create a directory called ubuntu in the apache root document folder.
sudo mkdir /var/www/html/ubuntu
Note: On Ubuntu 14.10 and previous versions, the apache root document folder is /var/www/.
Copy all the files from the Ubuntu ISO.
sudo cp -fr /mnt/* /var/www/html/ubuntu/
Now, edit file /var/lib/tftpboot/pxelinux.cfg/default,
sudo nano /var/lib/tftpboot/pxelinux.cfg/default
Add the following contents at the end. Make sure you’ve replaced the IP address with your own.
[...]
label linux
        kernel ubuntu-installer/amd64/linux
        append ks=http://192.168.1.101/ks.cfg vga=normal initrd=ubuntu-installer/amd64/initrd.gz
ramdisk_size=16432 root=/dev/rd/0 rw  --
For 32bit PXE clients:
[...]
label linux
        kernel ubuntu-installer/i386/linux
        append ks=http://192.168.1.101/ks.cfg vga=normal initrd=ubuntu-installer/i386/initrd.gz
ramdisk_size=16432 root=/dev/rd/0 rw  --
Replace 192.168.1.101 with your own PXE server’s IP address.
Save and close the file.

Configure DHCP Server

Now, we have to configure the DHCP server to work with PXE server.
Edit file /etc/dhcp/dhcpd.conf,
sudo nano /etc/dhcp/dhcpd.conf
Add the following lines at the end:
allow booting;
allow bootp;
option option-128 code 128 = string;
option option-129 code 129 = text;
next-server 192.168.1.101;
filename "pxelinux.0";
Save and close the file.
Now, We have come to the end of the PXE server configuration. Restart DHCP server.
sudo service isc-dhcp-server restart
Congratulations! We have completed the PXE server configuration.

PXE Client Configuration

The client may be any system that has network boot enabled option (PXE boot). You can enable this option in your Bios settings.
Due to lack of resources, I have created a Virtual Machine client on my Oracle VirtualBox.
Open up the Oracle VirtualBox. Click on the New button in the menu bar.
Oracle VM VirtualBox Manager_001
Enter the Virtual machine name.
Create Virtual Machine_002
Enter the RAM size to the Virtual machine.
Create Virtual Machine_003
Select “Create a virtual hard drive now” option and click Create.
Create Virtual Machine_004
Select the Virtual hard drive file type. If you don’t know to what to select, leave the default option and click Next.
Create Virtual Hard Disk_005
Select whether the new virtual hard drive file should grow as it is used or if it should be created as fixed size.
Create Virtual Hard Disk_006
Enter the Virtual hard drive size.
Create Virtual Hard Disk_007
That’s it. Our Virtual Client machine has been created. Now, we should make the client to boot from the network. To do that, go to the Vitual machine Settings option.
Oracle VM VirtualBox Manager_008
Select the System tab on the left, and Choose Network from the boot order option, and un-check all the other options on the right side.
Ubuntu 15.04 PXE client - Settings_009
Then, go to the Network tab and select “Bridged Adapter” from the “Attached to” drop down box.
Ubuntu 15.04 PXE client - Settings_010
Once you done all the above steps, click OK to save the changes. That’s it. Now power on the Virtual client system. You should see the following screen.
Ubuntu 15.04 PXE client [Running] - Oracle VM VirtualBox_011
That’s it. The rest of the installation is same as the way we do in local installation. Start installing Ubuntu on your client using the PXE server.
Ubuntu 15.04 PXE client [Running] - Oracle VM VirtualBox_012
Good luck!
Reference: