Pages

Monday, October 18, 2010

Java in Firefox and VMWare Scroll Wheel

Install java in firefox to use webex (don't forget to install flash as well)
http://www.java.com/en/download/help/linux_install.xml
google: java install firefox linux
(I couldn't get this to work on ubuntu 10 x86_64.. works find on the Ubuntu 8 32 bit just fine)

Even better: http://www.ubuntugeek.com/how-install-sun-java-runtime-environment-jre-in-ubuntu-10-04-lucid-lynx.html

Get the scroll wheel to work
edit /etc/X11/xorg.conf
in Section "InputDevice" add Option "Protocol" "imps/2"
then restart x (reboot or ctrl-alt-backspace)

Sunday, October 10, 2010

Installing Redmine on Ubuntu 10.04 amd64

Apache with mod_passenger is already installed with the generic Ubuntu install.

sudo apt-get install libapache2-mod-passenger

Make sure that mysql is installed and running
sudo apt-get install mysql-client mysql server

I choose to not set my mysql root password.  A curses form came up three times asking my to confirm my root password, but it finished normally and respected my request of no password.

Install redmine
sudo apt-get install redmine redmine-mysql

Curses form 1 - configure dbconfig-common
YES

Curses form 2 - database type
MYSQL

Curses form 3 - password for db's admin user
{in my case no password}

Curses form 4 and 5 - db password for redmine/instances/default + confirmation
{in my case redmine-password}

Create symlink to web root
sudo ln -s /usr/share/redmine/public/ /var/www/redmine

sudo vi /etc/apache2/sites-available/redmine
<Directory /var/www/redmine>
    RailsBaseURI /redmine
    PassengerResolveSymlinksInDocumentRoot on
</Directory>

sudo a2ensite redmine

sudo service apache2 restart

sudo chmod +r /etc/redmine/default/session.yml /etc/redmine/default/database.yml

Visit http://localhost/redmine

The default account:password is admin:admin.

Adapted from: http://www.redmine.org/wiki/1/HowTo_Install_Redmine_in_Ubuntu

Saturday, October 9, 2010

Simple sed commands

APPEND MATCHED LINE: Add a line following the line matching the regular expression
sed '/regex/a line inserted following regex' file

regex - is any regular expression
a - the append command (can be followed by a space, a \ or directly adjacent to the line)
line inserted following regex - this is the literal text (can include \n if inserting multiple lines)
file - the file to operate on

APPEND FILE: Append lines to the end of a file
sed '$a line of appended text' file

$a - append to the end of file command
line of appended text - this is the literal text (can include \n if inserting multiple lines)
file - the file to operate on

SUBSTITUTE: Substitute text
sed 's/find/replace/g' file

SUBSTITUTE: Substitute advanced
sed 's/\(.*\)\(but.*is\)\(.*\)/\2 : \1\2\3/g' mysql

Escape the parenthesis
\1 \2 \3 are the matches