I am going to show you how to install a virtual samba/LDAP server from scratch. When everything is up and running we'll back it up to a secondary server.
LDAP stands for Lightweight Directory Access Protocol, and is basically a way of searching through and modifying x.500-based directory services running over TCP/IP. An LDAP directory is a tree of data entries. which is hierarchical in nature and is called a Directory Information Tree, or DIT. Entries consist of attributes, which have types and values.
LDAP can be used for anything that requires lots of access requests to a mostly read, attribute based backend, such as address books, lists of email addresses and mail server configurations.
I've found that virtual machines are best for this kind of project, because they can be easily deleted and reinstalled, which is something I've had to do a lot over the past month while I've been working on this. If I'd been using a physical computer having to reinstall the operating system every time the server gave up on me I probably would have given up on this whole project a long time ago! I really struggled to find a walk through that took me from setting up the LDAP server all the way to backing it up and installing Samba, and I found no matter what I did I couldn't make replication work using the guide on the Ubuntu website. So I came up with my own solution. But we'll get to that later on.
This will be split into four sections, installing the virtual machine, preparing and setting up LDAP, setting up Samba, and backing up the servers.
This section covers installing the virtual machine itself. I am doing this using the vSphere Web Client, but it can also be done in the same way using the desktop client.
Start by naming your virtual machine and choosing the location that it will be stored in.

Next choose where the virtual machine will be stored. This will be where your machine gets it memory and RAM from so make sure you choose a host with plenty of space.

Then choose which ESXi version you want to use. Its always best to accept the default for this one as it will be the newest version.

Now choose your operating system. We are using Ubuntu 12.04

Now you need to decide how much RAM and disk space you are going to give your client machine, and how many CPU cores you want it to have. We are giving our machine 4GB of RAM and 150GB of disk space, and a single core.
Here we are also selecting to mount an ISO file in the virtual machine's disk drive in order to be able to install the operating system. This can also be done using the disk drive of the host machine, if one is available. When you have selected your disk drive, tick the box that says connect.

Finally, check over the selections you've made. If there is anything you want to change you can click the back button and find what you want to change, otherwise click the finish button.

Now select to power on the machine and launch the console.

When you open the console, you will be prompted for the language you would like to use, and then with an installation options screen. Select to install Ubuntu.

You will be asked for the regions language again, and the keyboard layout (English UK, English US etc.) You will be able to choose whether you want the operating system to detect the language, or select it from a list. We are choosing to select from a list


Then you will be prompted to enter the host name again.

Now you will be prompted for user information. Enter the users name, and then pick a username for the account, by default Ubuntu will want to use the users name as the user name for logging into the account. Then you need to set a password.



You will be asked whether or not you want your home directory to be encrypted. The default selection for this is no.
Then you need to confirm your time zone.

Next you will need to select how you would like your disks to be formatted. We are accepting the default option of using the entire disk for LVM. Then you need to select which disk you want to partition, and how much disk space you would like to use for the partition. You will then need to write the current partition to disk.



You will then need to decide how much disk space will be used for the partition. The default option is all of the space.

You will then be asked to write all of these changes disk.

The operating system will now continue with the installation.
You will then be prompted about your HTTP proxy. This is left empty by default.

The operating system will now continue with the installation.
You will be asked to configure automatic updates. The default selection is no automatic updates.

Next you will be asked what additional feature you would like to install. Select the features you would like your server to have. You will need to install OpenSSH in order to SSH into the machine, Samba in order for users to have Samba access (which is vital to the server we are building) and LAMP in order to have MySQL, Perl, Python, PHP and the Linux kernel on your system. You can select any additional features you feel you may need.

You will prompted for the MySQL user password if you have selected to install the LAMP server.

Next select whether you would like to install the GRUB boot loader.

Congratulations! You have now installed your virtual machine! You now need to reboot the machine.

If there is anything you guys feel I have missed, anything you wanna add or anything you would like to know, drop it in the comments section!
Now onto Part 2!
<3
No comments:
Post a Comment