FreeBSD user Kiki Schirr shows us how to set up FreeBSD on your Rackspace server uising nginx.

A gif-recipe for the easiest way I can imagine to host your own site


Ingredients:

  • Rackspace hosting (I’m using Cloud)
  • A domain (I’m using kikischirr.com)

Step One: Create the Server

Click “Create server” and type in your domain (kikischirr.com). Don’t forget the top-level domain (the .com)! If you do, your website will be slower.

Step Two: Choose Your Operating System (FreeBSD)

If FreeBSD doesn’t show up as one of the options, you might be on “Show Most Popular Images Only”

Rackspace ‘hides’ FreeBSD by default, so you might have to toggle off the option “Show Most Popular Images Only” before you can choose “Linux”?“FreeBSD”?“10”

(Note: FreeBSD 10.1 is not currently available on Rackspace-tut, tut.)

You’ll notice there’s a blue vertical scroll, I simply set mine to the cheapest level, but if you want additional performance, it’s easy to change.

Then hit “Create Server” at the bottom of the page!

BAM

It’s created, and it will give you a password—don’t lose it! You’ll need it later!

Step Three: Open Terminal

To open Terminal, hit command-space, or use the Search function and type in “Terminal.”

Step Four: “ssh root@yourIP”

I’ve connected with my IP by accessing the root directory using the command “ssh root@…”

Type it in, but where the ellipses are, enter your IP, which can be found on your Rackspace page. It’s four numbers (IPv4) separated by periods. Don’t use the complicated one.

After you hit “enter” it will ask if you want to continue, type “yes” and enter.

Then it will ask for your password from Step Two. Your cursor won’t move, but type in the password and click enter, so you can continue.

Step Five: Updating FreeBSD

Type in “freebsd-update” and hit enter.

Then, “freebsd-update fetch” and hit enter.

You’ll notice that 10.0 is reaching ‘end of life,’ and has a warning to update. Don’t worry about it for now, it’s just because 10.1 is already out. You can update it later with command “freebsd-update upgrade -r 10.1” when Rackspace supports it better.

Last, type in “freebsd-update install” and hit enter.

Step Six: Updating pkg

Just to make sure everything is up to date, type in “pkg update” and hit enter.

Step Seven: Installing nginx

Type in “pkg install nginx” and hit enter.

It will ask you before using any storage space so type “y” and hit enter whenever it does—in this case, twice.

Step Eight: nano /etc/rc.conf

In this example, I hadn’t yet installed nano when I tried this command, so start by “pkg install nano” and enter. There are other editor choices besides nano, but I’ve had good luck with it.

Once again, the system will ask before using any space, so type in “y” and hit enter if it asks.

Then, you can type in “nano /etc/rc.conf” and enter.

This will bring you to a different-looking menu, with command options at the bottom of the screen.

Step Nine: Enable nginx

Scroll to the bottom of the code on the page and type in “nginx_enable=“YES” ” (in this example, the quotations around YES should be typed.)

DO NOT HIT ENTER

Instead hit Control X for exit. It will ask you if you want to save, type “y” and hit enter.

Step Ten: Start nginx

Type in “service nginx start” and hit enter.

You’re done! Here’s how to test it:

In your browser, type in the IPv4 number (your IP address). It should direct you to the nginx default landing page, which looks pretty basic, as in the above example.

If you see that, you’ve done everything correctly!

Original post: https://medium.com/@KikiSchirr/installing-freebsd-on-rackspace-servers-using-nginx-ed14a250aa9c