{"id":1158,"date":"2012-03-01T16:00:57","date_gmt":"2012-03-01T21:00:57","guid":{"rendered":"http:\/\/mossiso.com\/?p=1158"},"modified":"2013-02-01T12:45:19","modified_gmt":"2013-02-01T17:45:19","slug":"setting-up-a-hosting-environment-part-1-the-servers","status":"publish","type":"post","link":"https:\/\/mossiso.com\/2012\/03\/01\/setting-up-a-hosting-environment-part-1-the-servers\/","title":{"rendered":"Setting up a Hosting Environment: Part 1 – The servers"},"content":{"rendered":"

I’ve spent a lot of time at work setting up a few servers to be our new production environment. Much of it was accomplished by reading the documentation over and over again. Not much out there on the Net, so I’m hoping this series of posts benefits someone else out there.<\/p>\n

First of all, I’ll cover what set up I would like to achieve and why.<\/p>\n

Hardware<\/h4>\n

I’m using two Sun SunFire X2100 M2 connected to a StorageTek 2530 with 4.5TB of drive space. The servers attach to the storage array via SCSI cables for quick data transfer speeds. The array also has the ability to handle iSCSI connections. This will give me a decent base set up, with room to grow.<\/p>\n

Set up<\/h4>\n

I’ll put the two servers in a cluster and make the services available over the cluster. They will share the storage using GFS2. In the future, I’ll add a couple of load balancer\/proxy machines to farm out the Web traffic, and add a couple more SunFire X2100 M2’s to take that load. One of the main reasons to set up a new configuration with new servers is to provide a clean environment for the many WordPress and Omeka installations we host. We’ve had to hang on to some legacy services to support some older projects, so this will allow us to keep up to date. It will also allow me to set up Apache and PHP to run as a server user, locked down to it’s own directory. That way each of the 100+ sites won’t be able to access any other site’s content. I picked CentOS as the OS because it has cluster and GFS2 options of RedHat, but without the cost.<\/p>\n

\"\"<\/a><\/p>\n

Sun X2100 M2 OS Install steps<\/h2>\n
    \n
  1. Boot up with CentOS 6.x Minimal Install CD for x86_64<\/li>\n
  2. Select the option to \u2018Install or upgrade an existing system\u2019, then hit the Enter key<\/li>\n
  3. Skip the media test.<\/li>\n
  4. You are now in graphic install mode.<\/li>\n
  5. Hit Enter for \u2018OK\u2019 for \u2019English as the language.<\/li>\n
  6. Hit Enter for \u2018OK\u2019 to US keyboard.<\/li>\n
  7. Select the option to do a \u201cSpecialized Storage Devices\u201d install<\/li>\n
  8. Enter the computer name \u2018bill.com\u2019 or \u2018ted.com\u2019, etc<\/li>\n
  9. Click the button to \u2018Configure Network\u2019.\n
      \n
    1. Eth2 seems to be the one associated with port 0 on the servers, so select that one and then \u2018Add\u2019<\/li>\n
    2. Select \u2018Connect Automatically\u2019.<\/li>\n
    3. Click the \u2018IPv4 Settings\u2019 tab.<\/li>\n
    4. Choose \u2018Manual\u2019 for the \u2018Method\u2019.<\/li>\n
    5. Enter the following for the info in \u2018Addresses\u2019.\n
        \n
      1. Address: 192.168.1.1<\/li>\n
      2. Netmask: 255.255.255.0<\/li>\n
      3. Gateway: 192.168.1.1<\/li>\n<\/ol>\n<\/li>\n
      4. For \u2018DNS servers\u2019, enter 192.168.1.100<\/li>\n
      5. Then \u2018Apply\u2019<\/li>\n<\/ol>\n<\/li>\n
      6. Select \u2018Next\u2019 to keep the defaults for time zone and system clock.<\/li>\n
      7. Enter a root password<\/li>\n
      8. DRIVE PARTITION SETUP<\/strong>\n
          \n
        1. On the \u2018Basic Devices\u2019 tab, select the local drive and on the \u2018Multipath Devices\u2019 tab, select the storage array, and click \u2018Next\u2019.<\/li>\n
        2. Select the \u2018Fresh Installation\u2019 option for a fresh install, or \u2018Upgrade an Existing Installation\u2019 to upgrade. Hit \u2018Next\u2019.<\/li>\n
        3. Select \u2018Create custom layout.\u2019 and \u2018Next\u2019<\/li>\n
        4. Delete all of the current LVM and other partitions.<\/li>\n
        5. Select the free remaining drive for the local drive (should be \/dev\/sda). Click \u2018Create\u2019<\/li>\n
        6. BOOT PARTITION<\/strong>\n
            \n
          1. Select \u2018Standard Partition\u2019 and click \u2018Create\u2019<\/li>\n
          2. Set the Mount Point as \/boot<\/code>, the File System Type as \u2018ext4\u2019 and the Size (MB) as 500, then click \u2018OK\u2019<\/li>\n<\/ol>\n<\/li>\n
          3. Select the free space and click \u2018Create\u2019<\/li>\n
          4. LVM PARTITION<\/strong>(NOTE: The sizes are different based on the size of the hard drives.)\n
              \n
            1. Select \u2018LVM Physical Volume\u2019 and click \u2018Create\u2019<\/li>\n
            2. Select \u2018Fill to maximum allowable size\u2019 and click \u2018OK\u2019<\/li>\n
            3. Select the new LVM partition and click \u2018Create\u2019<\/li>\n
            4. Select \u2018LVM Volume Group\u2019 and click \u2018Create\u2019<\/li>\n
            5. Set the \u2018Volume Group Name\u2019 as \u2018Local\u2019\u00a0 then click the \u2018Add\u2019 button<\/li>\n
            6. Set the \u2018File System Type\u2019 as swap, the \u2018Logical Volume Name\u2019 as \u2018swap\u2019 and the \u2018Size(MB)\u2019 as \u201812288\u2019, then click \u2018OK\u2019.<\/li>\n
            7. Click the \u2018Add\u2019 button again. Set the \u2018Mount Point\u2019 to \u2018\/\u2019, the \u2018File System Type\u2019 to ext4, the \u2018Logical Volume Name\u2019 to \u2018root\u2019, and the \u2018Size(MB)\u2019 to \u201851200\u2019. Then click \u2018OK\u2019.<\/li>\n
            8. Click the \u2018Add\u2019 button again. Set the \u2018Mount Point\u2019 to \u2018\/home\u2019, the \u2018File System Type\u2019 to ext4, the \u2018Logical Volume Name\u2019 to \u2018home\u2019, and the \u2018Size(MB)\u2019 to \u2018500\u2019. Then click \u2018OK\u2019.<\/li>\n
            9. Click the \u2018Add\u2019 button again. Set the \u2018Mount Point\u2019 to \u2018\/var\u2019, the \u2018File System Type\u2019 to ext4, the \u2018Logical Volume Name\u2019 to \u2018var\u2019, and the \u2018Size(MB)\u2019 to the remaining space available. Then click \u2018OK\u2019.<\/li>\n
            10. Click \u2018OK\u2019<\/li>\n<\/ol>\n<\/li>\n
            11. Click \u2018Next\u2019 and \u2018Write changes to disk\u2019 to finish the partition creation.<\/li>\n<\/ol>\n<\/li>\n
            12. Leave the boot loader settings as is, and click \u2018Next\u2019<\/li>\n
            13. Select the \u2018Minimal\u2019 option and click \u2018Next\u2019<\/li>\n<\/ol>\n

              One of the most important things to have with servers is some form of remote management. That way you don’t need to trek down to the data center each time the server hangs while testing (and it happens a lot). For Sun systems, that means setting up the ELOM (Embedded Lights Out Manager).<\/p>\n

              Steps to set up the Remote Console (Embedded Lights Out Manager \u2013 ELOM) for SunFire X2100 M2<\/h2>\n

              Set the SP serial port rate to 115200.<\/h3>\n