New server

  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 8th, 2010, 12:02 am

So my new server has arrived Now how do I get the OS on it to start installing stuff?

- I have boot options to do a network boot, but how is that done?

- Can I use a USB drive and put the OS on that?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 8th, 2010, 12:02 am

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post March 8th, 2010, 2:27 am

You can extract an ISO and put it on a USB if you like.

http://www.pendrivelinux.com/usb-centos ... a-windows/

Download what ever distribution you like, it does not have to be a 'live' version, just make sure you have a flash drive big enough.
#define NULL (::rand() % 2)
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 9th, 2010, 12:59 am

I downloaded the live CD thing. Made an ISO of CentOS. Plugged it into the server. Server recognized the USB drive, even made it bootable by default and it's ready to rock and roll.

So I have centOS running off the thumbnail drive, and a mouse cursor.

Now what? I guess format and mount drives then install Cent OS on the drives?

Hmm...
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post March 9th, 2010, 2:27 am

If you can install CentOs from the live cd version there should be a icon on the desktop that will allow you to install it. However, I dont think you'll want to use the live CD as it probably doesnt have a "server" install option. The Live CD is probably more of a desktop install. I would suggest trying to use the normal CentOS ISO. Its pretty straight forward to install off of.

You'll only really need the first 2 or so pages. You can follow the rest to install Apache and other services if you like.

http://www.howtoforge.com/perfect-serve ... spconfig-3
#define NULL (::rand() % 2)
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 9th, 2010, 10:27 am

Got it. Downloaded the DVD installation, and put it on my girlfriends' portable usb harddrive (I KNEW she was good for something), and will install it tonight.

All is going to plan. Soon the universe will be mine, mine I say! (insert evil laugh here)
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 10th, 2010, 10:20 am

So I downloaded CentOS, but it's 4.6 gigs DVD and I only have a 4.0 gig thumbnail drive. As I said I would try to put it on my girlfriends 500gig external USB drive, but neither my machine, nor the server will recognize the USB drive, as a USB thumbnail drive suitable for booting. Somehow the BIOS programmers thought that a bootable drive must be a thumbnail drive.

So I will have to get a 8gig thumbnail drive tonight and be done with it.

The saga continues. The universe is within reach.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post March 10th, 2010, 2:13 pm

Is there any way you could strip your DVD drive from your computer and throw it in your server?
#define NULL (::rand() % 2)
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 10th, 2010, 11:41 pm

Ok now I'm getting frustrated.

I got a 8gig USB drive. Of which I installed the DVD ISO of x64 CentOS. It boots up, asks for some options.

...then it says it cant find any media suitable for installation. Even though it just booted from that media (the USB drive).

I then point it to use the USB drive, and it then asks for the ISO image. Of which there is no ISO image, since it is a USB drive with the files on it, just like it should be.

I am getting the feeling that the makers of 5.4, never actually installed 5.4. I know that there is often a problem in software development that those that make software, never use the software.

I will try again tomorrow. Maybe I download the 7 CD images instead of the DVD image.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post March 11th, 2010, 1:22 am

Have you looked to see if you could take a DVD drive from another computer and put it in your server? I dont know what kind of computer you use at home, but if its a desktop you might be able to pull your DVD drive out and put it in your server. It should have a connection for it.
#define NULL (::rand() % 2)
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 11th, 2010, 2:30 am

Tomorrow I will try this. I have tried all USB options. The Bios shows the USB drive, tells me it can emulate it as CDROM, Harddrive or whatever, can boot from it. But after it boots from it, the install refuses to find any files on it.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 11th, 2010, 2:33 am

You know when I installed CentOS 4.0 a while back, it was done in 20 minutes...
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 11th, 2010, 8:32 pm

Ok I tried pretty much everything. CdROM, 8 gig stick, DVD, 1-7 Cd's, everything. Boot as Floppy, Cdrom, Harddrive, all bios settings.

The machine would boot off the USB, but the installer refused to load and install from the USB drive no matter what config.

Finally I found a program that was going to download it, and by accident it aborted and said to point the HTTP request to mirrors.kernel.org/centos/blahblahblah..

So I dumped the USB install, and doing a HTTP install and it seems to be working. It's formatting the drives now and has downloaded the stage2.img file etc.

Still don't know why it didn't load from the USB drive even though the USB drive has the same files and directory structure as the mirror site.

Now that I think about it, I bet I could have uploaded the files to my old server, and pointed that HTTP request to there instead.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post March 11th, 2010, 9:13 pm

Well I hope you'r able to get it all installed and running.
#define NULL (::rand() % 2)
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post March 12th, 2010, 1:03 am

Yay its working. I have a very expensive hair dryer(referring to the sound of the fans), and a flashy cursor.

Next:

- How do I make sure it formatted and mounted the second harddrive?
- How do I set up mysql?
- Phpmyadmin?
- FTP server?
- Mail server
- Named
- How do I set up a dns zone?

How do I set up my first website?
- user
- ftp login
- mail address
- I think I can handle the dns and apache setting for a website.

This will be a learning experience...
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post March 12th, 2010, 8:16 am

I thought you had a single 1TB drive in this server.

What sort of drive configuration do you want?

Before you do to much I would first suggest locking up your server by restricting the root user from login via SSH and by adding a new user to the wheel group.

Log into your server with the root account.

The below steps will add a new user to the machine and add the user to the wheel group (super admin). Replace [username] with anything you want (It will be the user you will login with)

Code: [ Select ]
# adduser [username]
# passwd [username]
# usermod -a -G wheel [username]
  1. # adduser [username]
  2. # passwd [username]
  3. # usermod -a -G wheel [username]


Next we are going to update the 'sudoers' file and make sure that the wheel group has the correct permissions.

Code: [ Select ]
# visudo


Near the bottom you will see something like this:

Code: [ Select ]
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL)    ALL
  1. ## Allows people in group wheel to run all commands
  2. # %wheel ALL=(ALL)    ALL


Remove the gash mark on the second line.

Code: [ Select ]
## Allows people in group wheel to run all commands
%wheel ALL=(ALL)    ALL
  1. ## Allows people in group wheel to run all commands
  2. %wheel ALL=(ALL)    ALL


Next we will edit the SSH config to restrict the root user from being able to login via SSH. (You can still login at the machine, just not remotely.) You can skip this step if you want but there really is no reason to ever login to your root account.

You can also change your SSH port here too if you want. Changing it can help against attacks.

You can use what ever editor you like, I prefer vi.

Code: [ Select ]
# vi /etc/ssh/sshd_config


To restrict the root user find and set:

Code: [ Select ]
PermitRootLogin no


To change the SSH port find and set:

Code: [ Select ]
Port ###


To restrict SSH to only certain users (If more than one separate by comas.):

Code: [ Select ]
AllowUsers [username]


After all that you can can now login to your server with your newly created account. So exicute commands as a super user all you have to do is pre pend your command with sudo You can still su into the root account if you need.

MySQL installation

I would also add the following command:

Code: [ Select ]
#sudo /sbin/chkconfig mysqld on


That will make mysql start after a reboot. That way you dont have to get up at 4 AM in the morning if your server crashes ;)

Apache and PHP

The PHP Install has a few packages added to it compared to a raw php install. You can remove most of them if you want but I think you'll find that you'll want to install them, and with your server there really isn't any reason not to have them.

PHPmyAdmin

This is pretty simple. I'm going to store the PHPmyAdmin in the /var/www directory. You can choose to store it where ever you like.

Code: [ Select ]
# wget http://voxel.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.0/phpMyAdmin-3.3.0-all-languages.tar.gz
# tar xvf phpMyAdmin-3.3.0-all-languages.tar.gz -C /var/www
# mv /var/www/phpMyAdmin-3.3.0-all-languages /var/www/pma
  1. # wget http://voxel.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.0/phpMyAdmin-3.3.0-all-languages.tar.gz
  2. # tar xvf phpMyAdmin-3.3.0-all-languages.tar.gz -C /var/www
  3. # mv /var/www/phpMyAdmin-3.3.0-all-languages /var/www/pma


Then in my httpd.conf (/etc/httpd/conf/httpd.conf) Its also good practice to backup the original config file.

Code: [ Select ]
# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak


Code: [ Select ]
# vi /etc/httpd/conf/httpd.conf


I add the following

Code: [ Select ]
<IfModule mod_alias.c>
    Alias /pma /var/www/pma
</IfModule>
  1. <IfModule mod_alias.c>
  2.     Alias /pma /var/www/pma
  3. </IfModule>


You can also create any file in /etc/httpd/conf.d and it will automatically be included into your configuration.

Now PHPmyAdmin can be access via http://domain.com/pma.

You can do it other ways but I find this to be the best.
#define NULL (::rand() % 2)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 12th, 2010, 8:16 am

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 30 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.