Page 1 of 1

Setting up a server in Virtualbox

Posted: 21 Oct 2011, 13:21
by viking60
I have this Toshiba equium lap with a broken display (Well, I am a Berserk :-D ) It has ArchLinux as an OS and it serves to test network setup. In mandriva I have had this trouble updating Virtualbox (and the old one works fine for all the OS'es I have installed there including Windows Xp).
I have never been able to give the outside world access to my VB installations in Mandriva so I decided to install VB 4.1.4 OSEr74291 on my Arch box.......
Image
Now the Toshiba does not have a lot of power so we can rule out heavy duty stuff like Windows etc. I also ruled out OpenSuse. So What OS to put in there as a server*? :think:

I had heard a lot about the Ubuntu server so that was my first choice:
Downloaded the Iso and hooked it up on the VB CD-rom and under Network I picked
Bridged Adapter and eth0.
Under Advanced I picke the adapter type PCnet-PCI II (Am79C970A)
and set promiscuous mode to Allow All.
I made sure that the cable connected box was marked too.

And started the install.
Ubuntu server has an Intuitive text based install and I set it to prepare the entire HD. Lots of warnings (makes sense) later, Ubuntu server was on its way and I picked a LAMP server and a file server. Nice and easy!
Ubuntu was taking care of me and had bundled the server alternatives in an easy to understand way - so far so good....
Grub install and reboot...
And Ubuntu complained that something was wrong (missing /boot or something) after giving the all automatic setup impression that sucked so I deleted Ubuntu.
I can see the Ubuntu fans jumping in their chairs now screaming: yes but you only have to..... And I am sure they are right. The thing is: I don't like you only have to's, especially not from "Just working" distros.
So I went for my next alternative:
ClearOS
It is Centos based so it should be solid.
And this distro really just works a few questions where I picked LAMP and File server (samba) and that was pretty much it.
It was finished very fast so I rebooted and there it was.
Now this setup does not take any Linux knowledge - at all - and it is the easiest one out there for sure!
So I got ready to log in and then I discovered that the setup actually did not ask me for a root password, and not for a userID either for that matter :f
I had to go their website and I only had to log in and register etc etc.
So I deleted it!
Don't get me wrong this is the server I would recommend for an administrator in a small business that is used to Windows. He would be able to set it up and talk to Windows in Minutes (60 minutes). And it would be better than the Windows alternatives.
It is just not for me, so I went on to the ClearOS mothership:
Centos
Set up the disk. Partitioning the entire enchilada and answer every prompt picking the raisins I would like to have in a server. No problem and Centos did the job.
Everything went through and it toke some time but finally I arrived at the reboot. I shut off the VM and "removed" the CD and fired it up again.
And Centos complained about me having the wrong kernel so I should download the right one :f
Guess what i did?

I deleted it and went on to the next big server thing Image
I did not feel like downloading the tons and tons of software and burn it to a load of DVD's so I picked the nice and small Net-Install CD. Not only is it small it will also provide me with the most up to date software and no extra bloat.
So I fired it up and picked the GUI install - I didn't know that Debian had that so I had to try it. Again I let Debian handle the entire disk and I mostly accepted the suggestions.
Picke the LAMP server (Linux Apache MySql PHP) and File server + openssh. That should enable me to log in to the virtual server from another computer, because I am getting tired of this VB window now. Debian even asked me to set a password for Mysql root (Not related to Linux root) - good work! That tells me that it is configuring the LAMP internals.
Debian started to prepare and prepare and prepare..... Installing VB aditions and analyzing every corner of my Box. Finally it was time to reboot......
Et Voila! There it was my VB Server :love Well actually it is not - before you can access it from the outside world so I went to another box and pinged berserk (what else?) and there it was. I will now move on to configure samba,install phpmyadmin, webmin and Ioncube encryption on that server. If I can get all that to work there then I have truly found the server for me +1
Hmm Webmin is not in the repos so I had to enter /etc/apt/sources.list and add the webmin repos like this:

Code: Select all

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Then I had to set the key:

Code: Select all

cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc

after a apt-get update I could install webmin.
Image
This is how it looks from a remote PC. Moving on to PHP myadmin...

Re: Setting up a server in Virtualbox

Posted: 21 Oct 2011, 15:32
by viking60
Phpmyadmin is a net software to populate the Mysql database. It is easy on most distros to install it but then you have to get it to "talk" to Mysql. So I simply installed it with

Code: Select all

sudo apt-get phpmyadmin
. and went to a browser and typed http://berserk/phpmyadmin. I got to the login picture and there the trouble usually begins. Remember I was asked about the Mysql password during installation?
Well I typed root as user and the MySql password given during installation. And it popped right in there! :dance1 This thing really is a server! I downloaded the Mysql database from this forum and wanted to upload it to my Berserk server with phpmyadmin.
That was not possible simply because PHP has a default upload limit of 2 mb. So I had to increase that limit in /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini

And I changed from:

Code: Select all

upload_max_filesize = 2M

to

Code: Select all

upload_max_filesize = 12M

I restarted the apache server:

Code: Select all

sudo /etc/init.d/apache2 restart
but that was unnecessary really because I could have done that in Webmin where it is much easier. and reloaded phpmyadmin. And uploaded the bjoernvold.com forum database without a problem.
PhpMyadmin - checked!

Ioncube -encryption
This is a specialized encryption software and has a non standard installation in Debian. But I followed the instructions and it went perfectly fine on the first attempt.
Checked!

Samba:
As always I am struggling with the Samba settings. but berserk is announcing itself to the workgroup. When it comes to sharing I have trouble accessing as usual - if I let all thoughts of security go I manage. But this is nothing special for Debian I suck at configuring samba in any distro. Anyway who needs it I use Linux and SSH :mrgreen:
So we can call
Samba checked!

And there ladies and gentlemen we have a surprising conclusion:
A guy that "never" has used debian based distros, preferes Debian over Centos Opensuse and Ubuntu-server. :wrf Hey don't blame me! I am as surprised as you are :-D
Time to remove Gnome from that Debian server now. I don't need a DE on a server. And I bet that server will run "forever".
ImageImage

ImageImage

Re: Setting up a server in Virtualbox

Posted: 21 Oct 2011, 15:48
by rolf
Good report. :B

That speaks well of Debian. Most of that server stuff is pretty alien to me and throwing VirtualBox into the mix, well...
Image


but, it's good to see stuff working, for future adventures, possibly. :greetings

Re: Setting up a server in Virtualbox

Posted: 21 Oct 2011, 22:16
by viking60
Yes it is brilliant, here I have two servers on the same box: One on the Lap and one in Virtualbox, And backing up the VB-server is easy - just a file. I will try to make it public later on.
Server on a VM is really secure It is not possible to screw up much because it is boxed.

Re: Setting up a server in Virtualbox

Posted: 22 Oct 2011, 10:40
by viking60
I altered the remote announce parameter to fit my network IP range and now I am doing the Samba to perfection: :dancer