Disclaimer:

First I have to  start by saying this is mostly my fault. (mt) MediaTemple has been good to me. They even emailed me to tell me that they where going to migrate my server to newer hardware. I should have taken the time to do it myself, but I am lazy. They also sent me an email telling me I had to do nothing. Luckily, support is very understanding and they lent me a free (VE) for 30 days to configure and migrate my configuration myself.

 

The Nitty Gritty

 After (mt) MediaTemple migrated my server I found all the web roots for the domains I managed changed. Blogs and php files would not load able to load properly. I also discovered that Apache was installed and Nginx was not started, although installed. I did try stopping Apache but there were still so many things going wrong I decided to start fresh. Plus it would give me a chance to upgrade my LEMP Stack to a more current version. I had two failed tries, the caveat being you had to load the stack in order. Installing Mysql before Nginx causes apt-get to install Apache. Before starting I had to secure my server by changing the /tmp directory and updating my root password. You should consider securing your server further.

I choose to break this up into two post because it would have been very long. Not to mention I took a nap in between.

Here were my steps:

    1. Install an OS. I chose Ubuntu 11.04 Natty Narwhal.
      1. I ran into an issue were I received an error updating
        1. perl: warning: Please check that your locale settings ubuntu
          1. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = “en_US.UTF-8″, LC_ALL = “en_US.UTF-8″, LANG = “en_US.UTF-8″ are supported and installed on your system. perl: warning: Falling back to the standard locale (“C”). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory
      2. I had to install the English base language pack
        1. apt-get install language-pack-en-base
        2. export LANGUAGE=en_US.UTF-8
      3. Then I had to change to the version of English I was using.
        1. export LANGUAGE=en_US.UTF-8
          export LANG=en_US.UTF-8
          export LC_ALL=en_US.UTF-8
          locale-gen en_US.UTF-8
          dpkg-reconfigure locales
    2. Install Nginx
      1.  apt-get install nginx
    3. Install PHP
      1. You can just install the php5-fpm package, but I am going to do some other stuff later, so I installed more packages.
        1. apt-get install php5-fpm php5-cli php5-common php5-curl php5-gd \
            php5-mcrypt php5-mysql php5-pgsql php5-sqlite php5-tidy php5-xmlrpc \
            php5-xsl php5-intl php5-imagick php5-xdebug php-apc php-pear
        2. Default is fine for now, but my default config caused my server to spawn 50 processes and consume 80% of my memory. I had to tweak it but that will be a different Blog post.
    4. Install MYSQL
      1. apt-get install mysql-server mysql-client
      2. You are required to setup a root password. Choose something Strong.
    5. I then created all my users for managing the multiple domains I have hosted.
      1. adduser myuser
        1. I gave them all the same passwords
        2. Then set sudo privileges
          1. visudo
            1. # User privilege specification
              root      ALL=(ALL) ALL
              users     ALL=(ALL) ALL

I then took a nap because I still had to rsync all the Data from my old/newly migrated server. Like I said I failed the first couple times, Nginx wouldn’t bind one time and PHP wouldn’t load another. The server has to be reset to default, that takes time. Then the OS takes time to reinstall. Factor in having to accomplish this after I got off work that evening, I was pretty exhausted. I also have to mention that it took almost all day for the new (VE) Server to be provisioned when support said it would only take 15 minutes. Please check in for Part 2.