VMware in FC5
To get VMware running:
- Install the linux vmware rpm
- Download http://ftp.cvut.cz/vmware/vmware-any-any-update98.tar.gz
- Untar it and cd into the created directory
- Execurte: ’./runme.pl’ as root
This information was found here.
Setting up a rails app with lighttpd on FC5
Just a quick tutorial to get your typo blog running.
Install Ruby:
- yum install ruby
- yum install ruby-libs
- yum install ruby-devel
- yum install ruby-docs
- yum install ruby-irb
- yum install ruby-mysql
- yum install ruby-rdoc
- yum install ruby-ri
Download and install rubygems
- wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
- tar -zxvf rubygems-0.8.11.tgz
- cd rubygems-0.8.11
- ruby setup.rb
Install rails:
- gem install -r rails -y
Install lighttpd:
- yum install lighttpd
- yum install lighttpd-fastcgi
Download and install fastCGI:
- wget http://www.fastcgi.com/dist/fcgi-2.4.1-SNAP-0311112127.tar.gz
- tar -zxvf fcgi-2.4.1-SNAP-0311112127.tar.gz
- cd fcgi-2.4.1-SNAP-0311112127
- ./configure
- make
- make install
Install the ruby binding for fastCGI:
- gem install fcgi
Create the lighttpd config file:
- /etc/lighttpd/lighttpd.conf:
server.modules = ("mod_rewrite", "mod_accesslog", "mod_fastcgi")
server.document-root = "/srv/www/lighttpd/"
server.port = 80
server.username = "lighttpd"
server.groupname = "lighttpd"
server.pid-file = "/var/run/lighttpd.pid"
accesslog.filename = "/var/log/lighttpd/access_log"
server.errorlog = "/var/log/lighttpd/error_log"
server.indexfiles = ( "index.html" )
mimetype.assign = (
".css" => "text/css",
".gif" => "image/gif",
".html" => "text/html",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".js" => "text/javascript",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
)
$HTTP["host"] == "www.rlb3.com" {
server.document-root = var.data + "/blog/public"
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = ( ".fcgi" =>
( "localhost" =>
( "min-procs" => 5,
"max-procs" => 5,
"socket" => "/tmp/www.fcgi.socket",
"bin-path" => var.data + "/blog/public/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "production" )
)
)
)
}
Start lighttpd:
- service lighttpd start
This article does not cover setting up the rails app itself. I assume you know how to setup your favorite database with rails.
Posted in Linux, Ruby, Web | no comments |
Building fastCGI on FC4
This howto we will get fastCGI running with a stock FC4 apache2.
If you don’t have it on you system run as root:
yum install httpd httpd-develNext you’ll need download these two files:
http://www.fastcgi.com/dist/fcgi-2.4.1-SNAP-0311112127.tar.gz http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
tar -zxvf fcgi-2.4.1-SNAP-0311112127.tar.gz cd fcgi-2.4.2 ./configure make make installOnce you’ve done that. Add this to /etc/ld.so.conf
/usr/local/libThen run:
ldconfigNow you are read to install mod_fastcgi.
tar -zxvf mod_fastcgi-2.4.2.tar.gz
cd mod_fastcgi-2.4.2
apxs -n mod_fastcgi -i -a -c \
mod_fastcgi.c fcgi_buf.c \
fcgi_config.c fcgi_pm.c fcgi_protocol.c fcgi_util.c
This installs the .so file but puts the wrong module name in /etc/httpd/conf/httpd.conf
LoadModule mod_fastcgi_module modules/mod_fastcgi.so to: LoadModule fastcgi_module modules/mod_fastcgi.so
Now you are ready to install any fcgi ready program.
