install zentyal server - flexraid wiki knowledge base

37
GUIDE FOR Zentyal Server is a small business server based on Ubuntu’s LTS server version 10.04 and the ebox platform. It also has the LXDE desktop installed with Firefox web browser and PCMAN File manager. There are some things that cannot be easily manipulated with Zentyal. Certain configuration files such as the samba configuration file and others cannot be directly edited, as they are overwritten at boot by a master configuration file. These files can be modified at boot by placing scripts in designated files, but that is beyond my comprehension at this point. This setup was done on a Virtualbox machine with one disk for the operating system and three attached virtual hard drives. INSTALL ZENTYAL SERVER Input full User Name. For this I am using a test user.

Upload: others

Post on 12-Sep-2021

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

GUIDE FOR Zentyal Server is a small business server based on Ubuntu’s LTS server version

10.04 and the ebox platform. It also has the LXDE desktop installed with Firefox web browser

and PCMAN File manager. There are some things that cannot be easily manipulated with

Zentyal. Certain configuration files such as the samba configuration file and others cannot be

directly edited, as they are overwritten at boot by a master configuration file. These files can be

modified at boot by placing scripts in designated files, but that is beyond my comprehension at

this point.

This setup was done on a Virtualbox machine with one disk for the operating system and three

attached virtual hard drives.

INSTALL ZENTYAL SERVER

Input full User Name. For this I am using a test user.

Page 2: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Accept or input a username for the account. I have used testuser as the user account name.

Choose a password for the user account.

Page 3: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

After a reboot, Zentyal will start with the web interface ready for login.

Login to the web interface in order to finish the configuration. Scroll down until the Office Icon

shows. I am only installing the Office portion which includes the file sharing portion of the

server.

Page 4: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click on the Office Icon in order to select it. The ring around the Icon will turn green when

selected. Click the Install button.

The installation will begin and you should see the screen below

Page 5: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Next, the installation will prompt you to set up the network interfaces.

Page 6: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

I have selected standalone server, as my home router handles all DHCP assignments and I only

have one server.

Next, save changes.

Page 7: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

There were components installed during the Office setup that I won’t need, so I removed them.

Click on Software management and then Zentyal Components. Click the Delete Tab

I selected the following for removal:

VPN Service

Zentyal Cloud Client

Groupware (Zarafa)

Web Server

Mail Service

Page 8: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

After these modules were removed, I performed a system update. Click on Software

Management and then System Updates. Scroll to the bottom and check the Update all Packages

box. Then click the Upgrade Button.

The upgrade will begin.

Page 9: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

If you are wanting to test your configuration in VirtualBox prior to putting it into production, it is

a good idea to install the Virtual Box Guest additions. This will allow the screen to stretch inside

the Virtualbox window. Without this, it will be difficult to configure Flexraid because part of the

web interface will be cut off and inaccessible. To install the guest additions, follow these steps:

1. Install dkms: From the user console type - sudo apt-get install dkms

2. Attach Vbox Guest additions to the Virtual CD Drive

3. From the PCMan File manager, Open the Guest additions as root

4. Right click and execute runasroot.sh I think or autorun.sh

I tend to like graphical interfaces for performing certain tasks. For this reason I installed

synaptic and from synaptic, installed gparted.

To install synaptic package manager, type: sudo apt-get install synaptic

I then installed gparted partition manager using synaptic.

PARTITION DISKS

Open the Administrator Console from the Desktop

Page 10: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

In console Type: sudo fdisk –l

This will give a list of Disks attached to the system.

sda contains the system and swap partitions

sdb is the first disk which will be used as a dru

sdc is the second disk that will be used as a dru

sdd is the third disk which will be used for parity

Page 11: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Open gparted and create a primary partition on each of the disks sdb, sdc,sdd. I created these

with an ext4 file system. It is not necessary at this point to provide a volume label or mount

point, as this will be done in the following steps.

Page 12: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Next, Open the PCMan File Manager

At the bottom left, click on the folder icon. This will provide a directory tree. Navigate to media

and click once on this folder in the directory tree. In the top menu, click on tools, and then open

this folder as root. This will allow you to create folders and change permissions for those

folders. The second screen shows the media folder opened in superuser mode.

Page 13: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Right click in the empty space to bring up the context menu and create folders in /media for the

three disks. I used Disk1, Disk2 and Parity.

Page 14: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

I edited the permissions for these folders and changed the username to my username, changed

the group to fuse, and gave full permissions to all. This may not be necessary, but i didn't want

any problems writing to the folders from flexraid. Right Click on each folder, select properties

and then the permissions tab.

Close the media folder superuser window. Navigate in the directory tree to etc and open this

folder as root. Scroll down and find the file called fstab. Right click on the file and select open

with leafpad.

This is the original fstab

Add the following lines to the end of fstab

/dev/sdb /media/Disk1 ext4 defaults 0 2

/dev/sdc /media/Disk2 ext4 defaults 0 2

/dev/sdd /media/Parity ext4 defaults 0 2

Save the fstab file and exit leafpad.

While the folder etc is still in superuser mode, find the file fuse.conf and open it with leafpad.

Edit the last line to remove the # symbol.

Page 15: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Next add the user to the fuse group.

Open the user terminal and type: sudo adduser testuser fuse

INSTALL FLEXRAID

Everything up to this point was to prepare for the flexraid installation. REBOOT before

continuing. This should insure that the disks are mounted in the /media folder.

Open firefox web browser, navigate to the openegg site and download the latest FlexRAID

version. In this case I am using Version 2.0 release 12 revision 2. The file should be saved to

/home/testuser/Downloads.

Open a user console.

Change to the download directory: cd /home/testuser/Downloads

To list the files type: ls

Make the file executable:

Type: sudo chmod +x FlexRAID-2.0-Preview12r2-Setup.bin

Run the setup file: ./FlexRAID-2.0-Preview12r2-Setup.bin

Accept the EULA

Enter path for installation folder. I used /home/testuser/.flexraid. Putting the period in front of

the flexraid folder will make it hidden.

Page 16: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

FlexRaid will then install. The prompt at the end indicates success.

Open the PCman file manager. Create some test folders and files under /media/Disk1 and

/media/Disk2. These are required in order to create a snapshot raid.

Open the user console and start flexraid by typing:

./FlexRAID &

The resulting screen

Give FlexRAID a minute to make sure it is started and then navigate to the installation folder in

PCman file manager. Navigate to /home/testuser. In the menu, select view and then select show

hidden files. The flexraid installation folder should then show up as .flexraid under the testuser

folder. Open the .flexraid folder and right click on FlexRAID.html and select open with firefox

web browser.

This will open the web interface as http://localhost:8080. The web interface could be accessed

from another machine on the network by typing in http://ipaddress:8080 as well. Finally you

should see the FlexRAID web interface.

CREATE SNAPSHOT RAID

Click on Add New Configuration

Name the Configuration (Snap-1 in this case)

Make sure Snapshot is selected.

Page 17: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Put in the number of DRUs (2) and PPUs (1)

Select the RAID Engine. (T1+ in this case)

Input a description if wanted.

Click the Create button and Snap-1 should show up on the left side of the page.

Page 18: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click on Snap-1

Expand the directory tree on the left so that contents of media folder show

Page 19: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click and Drag Disk1 folder under DRU1 on right side of panel

/media/Disk1 should now be assigned to DRU1

Page 20: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Expand DRU2 on right side of panel. Click and Drag Disk2 folder under DRU2 on right side of

panel.

Expand PPU1 on right side of panel. Drag Parity folder under PPU1 on right side of panel.

Page 21: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click on Runtime properties, adjust as necessary. Click Save, popup should indicate success.

Click on command execution center. Click create button.

Page 22: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base
Page 23: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

After Completion, go to /media/Parity. The parity files should show up in the directory.

Page 24: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

STORAGE POOL

First we need to set up a folder to which the pooled folders will reside. This folder will be

shared on my network to all computers.

Click on Zentyal Administration and Log in. When the Administration page has loaded, scroll

down and click on File Sharing. You will see the page below.

Since I am only wanting simple file and printer sharing, I am allowing access to all computers on

my home network and therefore have no need for the Personal Domain Controller (PDC) or

Quota Limits. I have disabled both of these options.

Uncheck PDC

Disable Quota Limits unless you want these.

Change Domain Name to match your network

Page 25: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click Change button

Click red save changes button at top right

Page 26: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click save again

Get back to the file sharing page and click on shares tab

Click on Add new

Page 27: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Fillout the blanks. Creating a directory under Zentyal will create a share located in

/home/samba/shares/. When using a Directory under Zentyal, the only characters allowed are

alphanumeric and underscores. Alternatively, you can choose to use an existing file system

directory. I enabled guest access for my share. Using the firewall, you can later restrict access

via IP address.

Click Add

Click Save Changes

Click on Red Save Changes Button at top right

Click save again

Page 28: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

In PCMAN, open /home/samba/shares with root privileges

Page 29: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Right Click on Test Storage Folder and select properties and then permissions.

Change user to testuser and group to fuse.

Check all the boxes for read write execute privileges

Click OK.

Page 30: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Now go back to the FlexRaid web user interface. Click on add new.

Provide a name (SPOOL-1) and select the Storage Pool button. Add a description if wanted.

Click Create. The storage pool should appear on the page.

Page 31: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click on the Storage pool just created. Under Unique Volumes, enter /media/Disk1 and

/media/Disk2

Under advanced properties, I changed the reserve to 1GB from 10 because i am using small

virtual test disks. In a production environment, this would not be necessary.

Change the Grant access to others to true

Click save

Page 32: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Expand the Storage Pool Merge Configuration

I am using the Auto-Folder Priority configuration

For the Mount Point enter : /home/samba/shares/Test_Storage

Click Save

Click Preview to see if the setup is mounting correctly. The folders from Disk1 and Disk2

should be listed under the /home/samba/shares/Test_Storage Directory.

Page 33: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Click Publish/(Restart) Button. Click Save

The file manager should now show that the folders for Disk1 and Disk2 listed under

/home/samba/shares/Test_Storage.

Page 34: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Go to start and click settings

Go to Storage Pool Tab. I set the Autostart delay at 15000 ms for my setup. Without this value

being set, the storage pool would not start automatically with Flexraid. Click Save.

Page 35: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

RUN FLEXRAID at BOOT

Open the User Console. Type

sudo leafpad /etc/init.d/flexraid

to create a file in /etc/init.d called flexraid

Type in the script below:

#! /bin/sh

# by wyld

### BEGIN INIT INFO

# Provides: FlexRAID application instance

# Required-Start: $all

# Required-Stop: $all

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: starts FlexRAID app

# Description: starts instance of FlexRAID app using start-stop-daemon

### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/testuser/.flexraid

sleep 10

############### EDIT ME ##################

# daemon

DAEMON=/home/testuser/.flexraid/FlexRAID

DAEDIR=/home/testuser/.flexraid/

NAME="flexraid"

DESC="FlexRAID backend and webui"

USER="testuser"

LOGDIR=/var/log

RUNDIR=/var/run

ARGS=""

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in

start)

echo "Starting $DESC: "

start-stop-daemon --start --oknodo --background --chdir $DAEDIR --exec $DAEMON

echo "[ $NAME ]"

;;

stop)

echo "Stopping $DESC: "

start-stop-daemon --stop --oknodo --exec $DAEMON

echo "[ $NAME ]"

;;

restart)

echo "Restarting $DESC: "

Page 36: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

start-stop-daemon --stop --oknodo --exec $DAEMON

sleep 15

start-stop-daemon --start --oknodo --background --chdir $DAEDIR --exec $DAEMON

echo "[ $NAME ]"

;;

*)

N=/etc/init.d/$NAME

echo "Usage: $N {start|stop|restart}" >&2

exit 1

;;

esac

exit 0

Page 37: INSTALL ZENTYAL SERVER - FlexRAID Wiki Knowledge Base

Make the file executable by typing in user console: sudo chmod a+x /etc/init.d/flexraid

Execute the following command in the console: sudo update-rc.d flexraid defaults

REMOTE ACCESS

Zentyal Web Interface can be accessed from https://ipaddress:443

FlexRAID Web Interface can be accessed from http://ipaddress:8080

For local machine access, replace ipaddress with localhost.