New server

  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

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.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

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
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Is there any way you could strip your DVD drive from your computer and throw it in your server?
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

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.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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

Post 3+ Months Ago

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
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Well I hope you'r able to get it all installed and running.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

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
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

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.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

OMG SpooF you are sooo awesome. I never would have made a wheel group (which my current server in Toronto apparently doesn't have). I did a little reading and it makes sense.

My system actually has two 500 gig harddrives and room for a third.

My bios has raid options, but I don't know if I will activate it or not. I don't have data on how often drives fail, or if I should set it up as a Raid 0 for speed, or Raid 1 for mirroring.

I think I am going to set them up as a Raid 0 in the bios (don't know if I can do this now that I have installed the OS, I may have to reinstall the OS again) for speed, and just get another HD for backups.

I don't have experience on 1) YES DO THE MIRROR THING YOU WILL REGRET IT IF YOU DON'T or the 2) Don't worry about it you will upgrade your server again before you know it.

Thanks again for all that info above SpooF. Simple tips like those save hours of searching other forums/google.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

Having trouble getting PHP to see MySQL. Latest CentOS says that PHP does not include mysql by default.

Tried including extention=mysql.so in php.ini, tried updating all software.

I noticed that the phpinfo() shows that PHP is compiled without mysql. Don't really know how to turn it on. All pages on Google just say add extension=mysql.so but that isn't working.

MySQL is installed, I can run it and make tables etc from command line, just cant get PHP or phpMyAdmin to connect to it:

Code: [ Select ]
'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem'


See how it says not compiled with it? Docs say it is to be loaded as extention, but again, the extension thing isn't working.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

UPDATE: Uninstalled PHP, MYSQL, reinstalled. Seemed to work.

??

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 15 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.