`
catrose
  • 浏览: 6736 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论

Ubuntu 8.04 Rails Server Using Passenger

阅读更多
Ubuntu 8.04 Rails Server Using Passenger
May 6th, 2008
Introduction
So before my monstrous OpenSolaris 2008.05 post on setting up a Ruby on Rails server I decided to write a guide on setting up a Ubuntu 8.04 server guide for all you Slicehost users! I decided to write this guide because of the new optimized kernel that was added to Ubuntu Server 8.04 for virtualized environments. I also wanted a complete guide that would be a solid reference and now just have bits and pieces for upcoming sysadmins will get lost when reading.

For simplicity I will start with a black machine and build upon that. Use the comments section for specific questions or starting points. I will try to do my best at answering any and all questions.

Requirements
This section will go over the simple requirements of the entire setup.

Hardware
Ubuntu 8.04 Server - This could be anything below:

Slicehost
VMware
Bare Metal Install
Software
Apache 2.2.8
MySQL/PostgreSQL/SQLite3
Git
Ruby
Rubygems
Rails
Capistrano
RSpec
Passenger
Installation of Software
First thing before we start installing anything on this machine we must update the server. This is very simple with Ubuntu, it is two simple commands and you are all set. You only need to reboot the machine if a kernel was installed.


sudo apt-get update
sudo apt-get dist-upgrade
Now that the machine is updated we must install some essential tools in order to build software on this server. Once we are done with the setup it would be a good idea to remove these tools to increase security on our server.


sudo apt-get install build-essential
Now we are all set with the preparation of the server and we can start installing the software we need to get going.

Web Server
For the web server I chose to use Apache 2 because of the new Passenger gem or (mod_rails). This gem is great because of the simplicity to deploy new applications.


sudo apt-get install apache2 apache2-threaded-dev
Database Server
The database server that should be used is completely up to your preference. My recommendation is PostgreSQL. PostgreSQL is a very robust and fast database server that is rock solid. It does use a lot of resources so for Slicehost it may not be the best choice. A major player for a slim and fast database for Slicehost should be SQLite3. It is a wonderful database and should be thrown out so quickly because of its lack of a client/server architecture.

For this tutorial I will install MySQL because of its popularity with the Rails community.


sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
When prompted enter a root password, make this complex and write it down.

Version Control
Git is the most sexy version control system every created. I will never look back to subversion again. Now that capistraon and redmine both support git I have no reason to even thing about those awful three letters.

To install git is yet another apt-get command away. Run the following command in the terminal of your new server.


sudo apt-get install git-core curl gitweb
gitweb is an optional web frontend for your applications. I do not use it because I use GitNub a RubyCocoa application for the Mac.

Once that finishes git is completely installed and ready to go.

Ruby
Installing Ruby on Ubuntu 8.04 is quite simple. Just another apt-get and you are all set... almost. Since the inception of Ruby 1.9.0 distributions have been naming the current stable release of ruby "ruby1.8" That being said we will make a couple symlinks.

Ruby 1.8.6
To install all the tools you will want on this server run the following command:


sudo apt-get install ruby rdoc ri irb libopenssl-ruby1.8 ruby1.8-dev
Rubygems
I refuse to install Rubygems with apt-get. This is such a terrible idea in my opinion. There is no reason to install rubygems with a package manager because it can update itself. I will go over how to update rubygems later in this howto.


cd /usr/local/src/
sudo wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
sudo tar -xzf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb
Optional: Once you are done with install just run the next three commands to make using gems and Rubygems just as before.


sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Recommended Gems
Here is a list of recommended gems that should be installed once rubygems is installed. At the very least you must install rails and passenger.


sudo gem install rails capistrano rspec passenger mysql rdoc

上海基方太阳能
Part Two
Next week I will go over how to connect all the pieces together and get a sexy Ruby on Rails server running smoothly. I will go over configuring git on your local computer as well as setting up passenger and capistrano to function with all of the above sexy applications we just installed.
分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

    ubuntu 8.04 安装g++

    Ubuntu 8.04 安装 G++ 详解 在 Ubuntu 8.04 系统中安装 G++ 编译器是非常必要的,特别是在配置 okl4 环境时。下面将详细介绍如何在 Ubuntu 8.04 中安装 G++。 首先,需要安装 build-essential 软件包,该软件包包...

    Ubuntu 8.04 Server版 安装图解

    Ubuntu 8.04 Server版安装图解 很完整

    ubuntu8.04使用手册

    ubuntu8.04使用手册,ubuntu8.04使用手册ubuntu8.04使用手册,ubuntu8.04使用手册,ubuntu8.04使用手册,

    ubuntu8.04默认的源

    ubuntu8.04默认的源ubuntu8.04默认的源ubuntu8.04默认的源ubuntu8.04默认的源ubuntu8.04默认的源ubuntu8.04默认的源ubuntu8.04默认的源ubuntu8.04默认的源

    详解:Vmware虚拟机下Ubuntu8.04安装.pdf

    Vmware虚拟机下Ubuntu 8.04安装 Vmware虚拟机下Ubuntu 8.04安装可以分为两个部分:Vmware虚拟环境的安装和Ubuntu系统的安装。在Vmware虚拟环境的安装中,我们需要首先安装Vmware Workstation,然后创建一个新的...

    VirtualBox中安装Ubuntu 8.04 Server

    ### VirtualBox中安装Ubuntu 8.04 Server 在虚拟化技术越来越被广泛使用的今天,通过虚拟机软件如VirtualBox来模拟不同的操作系统环境已经成为一种非常常见的做法。本篇内容将详细介绍如何在VirtualBox中安装Ubuntu...

    Ubuntu8.04安装教程

    Ubuntu 8.04,代号“Hardy Heron”(苍鹭),是Ubuntu Linux操作系统的一个重要版本,发布于2008年。这个版本带来了许多改进和新特性,为用户提供了更稳定、安全和易用的操作环境。下面将详细介绍Ubuntu 8.04的安装...

    ubuntu8.04速成手册1.0.pdf

    《Ubuntu 8.04 速成手册1.0》是一本专为初学者设计的指南,旨在帮助读者快速掌握Ubuntu 8.04(Hardy Heron)这一经典Linux发行版的使用技巧。Ubuntu 8.04是Ubuntu系列的一个重要版本,发布于2008年,它的稳定性和...

    Ubuntu8.04安装配置大全

    ### Ubuntu 8.04 安装与配置详解 #### 一、系统初始化 系统初始化是确保Ubuntu系统正常运行的基础步骤。此阶段涉及到的操作主要包括硬盘分区、安装过程中的选择(如语言、时区等),以及安装后的基础设置,如更新...

    ubuntu8.04速成手册1.0.rar ubuntu8.04 ubuntu8安装与配置

    《Ubuntu 8.04速成手册1.0》是一份专为初学者设计的指南,旨在帮助用户快速掌握Ubuntu 8.04的操作系统安装、配置和日常使用技巧。Ubuntu 8.04,代号“Hardy Heron”,是Ubuntu Linux发行版的一个重要版本,发布于...

    ubuntu8.04速成手册

    《Ubuntu 8.04 速成手册》是一本针对初学者和中级用户的指南,旨在帮助读者快速掌握Ubuntu 8.04(Hardy Heron)操作系统的基本操作和高级技巧。Ubuntu是基于Debian的开源Linux发行版,以其用户友好、稳定性和安全性...

    用 Wubi 安装 Ubuntu 8.04

    ### 使用Wubi安装Ubuntu 8.04:详解与步骤 #### 一、Wubi简介与特点 **Wubi**,全称为Windows-based Ubuntu Installer,是专为Windows用户设计的一款Ubuntu安装工具。它最大的特点在于简化了Linux系统的安装流程,...

    同事安装ubuntu8.04和windows

    标题中的“同事安装Ubuntu 8.04和Windows”指的是在一个计算机系统中同时安装Ubuntu 8.04(一个基于Linux的开源操作系统)和Windows(微软的商业操作系统)的双系统配置。这样的设置允许用户根据需求在两个操作系统...

    ubuntu8.04手册05

    ubuntu 8.04使用手册

    如何在ubuntu8.04中安装中文输入法

    ### 如何在ubuntu8.04中安装中文输入法 #### 概述 本文将详细介绍如何在Ubuntu 8.04系统中安装并配置中文输入法。对于初次接触Ubuntu的用户来说,这是一个非常实用的指南。Ubuntu 8.04(Hardy Heron)是一款非常...

    79905-Ubuntu 8.04 GDM-LIST.tar.gz

    【标题】"79905-Ubuntu 8.04 GDM-LIST.tar.gz"揭示了这个压缩包文件是专门为Ubuntu 8.04操作系统设计的一个图形桌面管理器(GDM)主题集合。GDM,全称Gnome Display Manager,是GNOME桌面环境下的默认登录管理器,...

Global site tag (gtag.js) - Google Analytics