Wiki Forum Sign up! Explore Home

Not signed in (Sign In)

LiveSearch

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.2 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorludolphn
    • CommentTimeJan 21st 2010 edited
     permalink
    Hi have updated the following notes. Hope it helps:


    Installed Ubuntu 9.10 AMD64 Server on VMWare Player 3.0 using Easy Install

    Username: cit
    Password: cit

    Added "/etc/apt/apt.conf.d/00proxy" to use a local mirror

    Acquire::http { Proxy "http://za.archive.ubuntu.com"; };

    Installed the following packages

    sudo aptitude update
    sudo aptitude install openssh-server openssl apache2 apache2-threaded-dev mysql-server libmysqlclient15-dev imagemagick libmagick9-dev ruby-full rubygems rails build-essential linux-headers-$(uname -r) git-core libxslt-dev libxslt1.1
    I'm not 100% if we need all this packages

    MySQL root password

    Username: root
    Password: cit

    Install ClockingIT

    cd /home/cit
    git clone git://github.com/ari/clockingit.git

    Install Needed Ruby Gems

    cd /home/cit/clockingit/
    sudo gem update
    sudo gem install rails mysql
    sudo rake gems:install
    This process takes really long

    Setup MySQL Clocking IT user

    echo "CREATE USER 'cit'@'localhost' IDENTIFIED BY 'cit';" | mysql -u root -p mysql

    Create the database and user for ClockingIT

    echo "CREATE DATABASE cit DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON cit.* TO 'cit'@'localhost' IDENTIFIED BY 'cit'; FLUSH PRIVILEGES;" | mysql -u root -p

    Setup Clocking IT

    cd /home/cit/clockingit/
    ruby setup.rb
    default options for eveything except make sure to load the DB schema when asked

    Install mod_rails for Apache2

    sudo gem install passenger
    sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module
    sudo nano /etc/apache2/mods-available/passenger.load

    LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
    PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.9
    PassengerRuby /usr/bin/ruby1.8

    ^O to save ^X to quit nano

    sudo a2enmod
    passenger

    /etc/init.d/apache2 restart

    Configure Apache2

    sudo nano /etc/apache2/sites-available/cit

    <VirtualHost *:80>
    RailsEnv production
    PassengerHighPerformance on
    DocumentRoot /home/cit/clockingit/public
    </VirtualHost>

    ^O to save ^X to quit nano

    sudo a2ensite
    cit
    sudo a2dissite
    default
    sudo /etc/init.d/apache2 reload

    Configure Push Server to Start Automatically
    sudo nano /etc/init.d/cit

    #!/bin/bash
    ### BEGIN INIT INFO
    # Provides: ClockingIT
    # Required-Start: $network
    # Required-Stop: $network
    # Default-Start: 2 3 5
    # Description: ClockingIT
    ### END INIT INFO

    CITDIR=/home/cit/clockingit
    # Define LSB log_* functions.
    # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
    . /lib/lsb/init-functions

    case "$1" in
    'start')
    log_daemon_msg "Starting ClockingIT Services"
    cd $CITDIR
    nohup script/push_server &
    log_end_msg 0
    ;;
    'stop')
    log_daemon_msg "Stopping ClockingIT Services"
    cd $CITDIR
    killall ruby
    log_end_msg 0
    ;;
    *)
    echo "Usage: $0 { start | stop }"
    ;;
    esac
    exit 0

    ^O to save ^X to quit nano

    sudo chmod +x /etc/init.d/cit
    sudo update-rc.d -f cit stop 10 0 1 6 . start 90 2 3 4 5 .
    sudo /etc/init.d/cit start

    You're done!

    • CommentAuthorari
    • CommentTimeJan 22nd 2010
     permalink
    Thanks very much for this!

    Could you ask that you look at adding this as a wiki page on the github site. Then the advantage is that this can be edited and enhanced over time by you and others.



    I'd say you could get away with:

    sudo aptitude install apache2 mysql-client mysql-server imagemagick libmagick9-dev ruby-full rubygems git-core

    everything else should be automatically installed. Also, prefer ruby1.9 instead of 1.8 in which case rubygems is automatically installed. 1.9 is much faster.



    Cheers
    Ari
  1.  permalink
    good job, thank you.
  2.  permalink
    how to modify database.yml?
    • CommentAuthorari
    • CommentTimeJan 25th 2010
     permalink
    With a text editor?
    • CommentAuthorRequiem
    • CommentTimeFeb 27th 2010
     permalink
    Can you upload your virtual machine?
  3.  permalink
    Ari, can u help me?

    just make step-by-step and got this error

    Installing ri documentation for rails-3.0.0...
    ERROR: While executing gem ... (Errno::ENOENT)
    No such file or directory - lib
    root@ubuntu:/usr/local/www/jobsworth#

    im ignored this erro and try access my clockingit (http://localhost)

    Errno::EACCES in Activities#list

    Showing app/views/activities/list.html.erb where line #2 raised:

    Permission denied - /usr/local/www/clockingit/public/javascripts/prototype-all.js

    (...)

    u know the solution? this file dont exists on folder javascripts...

    just to try the git checkout and git pull, but, the same problem...