Posts Tagged ‘How To’

 

How to Install LAMP, Webmin & ConfigServer Security & Firewall on a CentOS 6.0 GoGrid Cloud Server

Thursday, July 19th, 2012 by

Let me preface this post by saying, I am NOT a Linux guru. In fact, I consider myself to be a newbie when it comes to the intricacies of Linux. I probably know enough to be dangerous, at least dangerous to the server. So, I’m writing this post with the following disclaimer: Don’t ask me for any details on the “why” or how to do what I’m outlining below differently. But since I figured that lots of you are like me, I wanted to share.

Since I’m a Linux newbie, you’ll probably understand why I wanted to write this post though. I’m not a command line junkie—GUIs are much more my thing. But when it comes to running a server that is speedy and high performance with low overhead (e.g., doing away with GUIs), you’re probably looking at various Linux distros. What I wanted to do was set up a basic Linux system running a LAMP (Linux, Apache, MySQL, and PHP) stack that also had a web-interface and some added security controls.

The great thing about doing this type of experimentation in the cloud is that I can create essentially a Dev & Test environment where I can spin up a server in minutes, install software, configure it, and test everything out. Then if it doesn’t work the way I want it to, I can tear it down and start again from scratch. The cloud lets you do this quickly, easily, and inexpensively.

In this tutorial, you can basically have the entire configuration up and running in the GoGrid cloud in less than an hour and only spend about $0.25 to test this out (assumes a 2 GB server running for 1 hour at $0.12/GB RAM/hr.)

Here’s what we’re using:

  • CentOS 6.0 (64-bit) – with 2 GB RAM
  • Webmin – web-based interface for sysadmins for UNIX that lets users set up user accounts, Apache, DNS, file sharing, and a whole lot more
  • ConfigServer Firewall & Security (CFS) – a Stateful Packet Inspection (SPI) firewall, login/intrusion detection, and security application for Linux servers

(more…) «How to Install LAMP, Webmin & ConfigServer Security & Firewall on a CentOS 6.0 GoGrid Cloud Server»

Speeding Things Up in the Cloud with NGINX

Monday, March 26th, 2012 by

clip_image001 clip_image002 clip_image004

It’s been no secret to us in the high-performance, web server in-crowd that NGINX (pronounced “engine-x”) has been taking the webhosting world by storm for the last several years; *sites like WordPress, Facebook, Hulu, Github, SourceForge and more have been offloading some or many functions onto NGINX. I had originally been exposed to NGINX whilst researching for a higher-performance web server that was 64-bit friendlier than Apache, and that was did not use single threads. Apache has an enormous memory footprint on 64-bit systems and is a single-threaded application.

NGINX is a very flexible HTTP server that can also serve as a reverse proxy, load balancer, caching server, and an IMAP/POP3 proxy. Unlike Apache, however, the configuration is a little bit more involved and can be a big change for Apache loyalists.

In this is example, NGINX will be configured as a full webserver with PHP support. My goal when conjuring this project was to make a pre-configured Community GSI on the GoGrid Exchange with as little modification as possible to ensure a “pure” environment. If you’re anything like me, you might tremble at the thought of even using a typical, pre-configured server with a LAMP stack; I personally like setting things up from scratch, but there’ve been plenty of situations where I would’ve preferred a pre-configured solution. Hopefully I can capture the essence of my intentions.

One thing I should note before I get started is that NGINX does not have a module for PHP the way Apache does; PHP must be run using the FastCGI methodology. Much like the way you would pass requests to a Java container or reverse proxy, so must we for PHP.

The first thing I should mention is that I’m using the EPEL and IUS repositories to for the latest versions of NGINX and PHP-FPM. IUS is the official repository for RHEL/CentOS as referenced by PHP.net. Using these 2 repositories will not alter any existing packages on your system.

(more…) «Speeding Things Up in the Cloud with NGINX»

How To Optimize Your Database Backups and Text File Compression with pbzip2 and pigz

Thursday, February 9th, 2012 by

Recently, GoGrid was examining performance enhancements on several internal processes; among these enhancements was switching from standard gzip to “pigz”. Since I had never heard of this “pigz”, I was intrigued by this supposed “parallel” implementation of gzip; meaning it uses all available CPU’s/cores unlike gzip. This prompted me to ask, “I wonder if there is a parallel implementation of bzip2 as well”, and there began my endeavor.

pigz and pbzip2 are multi-threaded (SMP) implementations of their respective idol file compressors. They are both actively maintained and are fully compatible with all current bzip2 and gzip archives.

If you’re like me, you might’ve stayed away from using gzip or bzip2 due to the single-threaded aspect. If I try to compress a, let’s say, 2GB file, the system becomes rather sluggish; the reason being is that the “compression tool of choice” uses almost all of 1 core of today’s multi-core, multi-CPU systems and creates an uneven load between the cores, causing the CPU to operate very inefficiently.

In this example I have a .tar file with several databases in it, which totals 1.3GB. The system in question is a GoGrid dedicated server with 8 cores. The server’s load is around 1 and is a production database server.

Using bzip2, the file took approximately 6 minutes and 30 seconds to compress. Yikes!

bzip2

(more…) «How To Optimize Your Database Backups and Text File Compression with pbzip2 and pigz»

Riverbed Stingray 8.1 Now in the GoGrid Cloud!

Tuesday, February 7th, 2012 by

As of today, GoGrid has released multiple images of the leading software load balancer, Riverbed Stingray! The following images are available on the GoGrid Partner Exchange in both San Francisco and Amsterdam:

  • Riverbed 7.4 Simple Load Balancer 10 Mbps
  • Riverbed 8.1 Load Balancer 10 Mbps
  • Riverbed 8.1 Load Balancer 200 Mbps
  • Riverbed 8.1 Load Balancer 200 Mbps WAF

How to Configure Static Routes to Traverse Traffic on CloudLink

Wednesday, February 1st, 2012 by

CloudLink is infrastructure so it can enable many use cases. However, you will be unable to use it until you configure your servers to use static routes. The rest of this post will describe how to create a static route from one server in US-West-1 to servers in US-East-1. This assumes that you have not already assigned a private IP to the West server. This guide assumes that you have a basic knowledge of Linux and/or Windows and with the basic principles of networking.

Find your Private IPs

wpid3499-media_1316553859879.png
First, you will need to find your private IPs. You can find your private IP block by going to the GoGrid portal, selecting the List tab and then Network. Under Type: Private you will see your private IP blocks. In this example, this is a listing of private IP blocks for US-West-1. US-East-1 has a DIFFERENT private IP block. The gateway is +1 from the first number in your private IP block (10.109.32.1) in the example above.

(more…) «How to Configure Static Routes to Traverse Traffic on CloudLink»