A fresh start with Ubuntu Precise Pangolin 12.04

A fresh install for my laptop, with some Desktop tools and all the rails/ruby stuff I need.

  1. Choose a short name for your computer, it will later show in the prompt.
    Only enter your firstname/alias, it will always show in the toolbar.
    Keyboard layout: English (International AltGr dead keys)
  2. Copy over stuff from old system, decrypt using ecryptfs-recover-private if necessary.
    (Get places.sqlite from firefox folder to recover your history.)
  3. Install RVM + rvm install 1.9.3
    sudo apt-get install build-essential curl libcurl4-openssl-dev zlib1g-dev libssl-dev libreadline6-dev libncursesw5-dev libxml2 libxml2-dev libxslt1-dev libsqlite3-dev -y
    install rvm following instructions in the link...
    
  4. Git sudo apt-get install git
  5. Dropbox install + start syncing
  6. dotfiles
    cd ~ && git clone git://github.com/grosser/dotfiles.git
    ruby dotfiles/install.rb
    
  7. Rubymine to /opt/rubymine

    Command key
    If you like OSx like shortcuts e.g. Cmd+T, choose "meta is mapped to left win" in advanced keyboard layout options and you can use your windows key for them.

    Executable
    /opt/rubymine/bin/rubymine.sh and setup mine as executable then

    alias m="mine . > /dev/null 2>&1 &"
    

    Oracle/Sun-java
    It is no longer in ubuntu repos.

    sudo apt-get purge openjdk*
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer
    
  8. Unity menu key
    Map unity menu from super to Super+z, so you can use it with shortcuts (see below) and with rubymine commands
    sudo apt-get install compizconfig-settings-manager -y
    open compiz application and rebind unity laucher @ "ubuntu unity plugin", dont mess with anything else, I managed to make ubuntu no longer boot into a GUI with just a few clicks
  9. Shortcuts
    Super+D = desktop
    Super+E = open home
    Super+Up = maximize
    Super+Down = minimize
    Super+Q = quit application (Alt+F4)

  10. Chrome sudo apt-get install chromium-browser -y
  11. Ruco commandline editor gem install ruco (atm not working on ruby 1.9.3 / ubuntu 12)
  12. copy important dotfiles + firefox history/forms/... database from .mozilla
  13. dotfiles
  14. Multi-clipboard sudo apt-get install clipit -y
    (set history shortcut: Ctrl+Alt+V)
  15. Skype + add skype to startup
    (video fix in dotfiles --> add add /home/xxxx/dotfiles/bin/video-skype to "Startup Spplications" )

  16. Mysql:
    sudo apt-get install mysql-server mysql-client libmysql-ruby libmysqlclient-dev -y
    I`d recommend no root password
  17. Redis sudo apt-get install redis-server -y
  18. Memcached sudo apt-get install memcached
  19. ImageMagic sudo apt-get install imagemagick -y
  20. Arial/Verdana etc fonts: sudo apt-get install msttcorefonts -y
  21. VirtualBox
  22. Nginx + Passenger
  23. Restrcited codes sudo apt-get install ubuntu-restricted-extras -y
  24. Terminal
    Set Ctrl+Shift+L for clear+reset in terminal, so the history gets removed on keypress
    Set Ctrl+t for new tab
  25. Postgres
    sudo apt-get install postgresql libpq-dev
    gem install pg
    sudo su postgres
    createuser

    use no username / no password in database.yml

  26. Reverse scrolling
    If you often work on macs this can reduce your confusion.
    sudo add-apt-repository ppa:zedtux/naturalscrolling
    sudo apt-get update
    sudo apt-get install naturalscrolling -y

A fresh start with Ubuntu Oneiric Ocelot 11.10

A fresh install for my laptop, with some Desktop tools and all the rails/ruby stuff I need.

  1. Choose a short name for your computer, it will later show in the prompt. Only enter your firstname/alias, it will always show in the toolbar.
  2. Enable canonical partners in “Software Sources” > Other Software
  3. Install RVM
    sudo apt-get install curl libcurl4-openssl-dev zlib1g-dev libssl-dev libreadline6-dev libncursesw5-dev libxml2 libxml2-dev libxslt1-dev libsqlite3-dev -y
    install rvm following instructions in the link...
    
  4. Rubymine to /opt/rubymine Command key: Choose "meta is mapped to left win" in advanced keyboard layout options Executable: /opt/rubymine/bin/rubymine.sh and setup mine as executable then
    alias m="mine . > /dev/null 2>&1 &"
    

    Inotify:

    # /etc/sysctl.conf 
    fs.inotify.max_user_watches = 524288
    

    and:
    sudo sysctl -p

    Sun-java: It is no longer in ubuntu repos.

    sudo add-apt-repository ppa:ferramroberto/java
    sudo apt-get update
    sudo apt-get install sun-java6-jre
    export RUBYMINE_JDK="/usr/lib/jvm/java-6-sun/jre"
    
  5. Map unity menu from super to Super+z, so you can use it with shortcuts (see below) and with rubymine commands
    sudo apt-get install compizconfig-settings-manager -y
    open compiz application and rebind unity laucher @ "ubuntu unity plugin", dont mess with anything else, I managed to make ubuntu no longer boot into a GUI with just a few clicks
  6. Shortcuts
    Super+D = desktop
    Super+E = open home
    Super+Up = maximize
    Super+Down = minimize
    Super+Q = quit application (Alt+F4)

  7. Chrome sudo apt-get install chromium-browser -y
  8. Git sudo apt-get install git-core
  9. Ruco commandline editor gem install ruco
  10. copy important dotfiles + firefox history/forms/... database from .mozilla
  11. dotfiles
  12. Multi-clipboard sudo apt-get install clipit
    (set history shortcut: Ctrl+Alt+V)
  13. Skype + add skype to startup
    (video fix in dotfiles --> add add /home/xxxx/dotfiles/bin/video-skype to "Startup Spplications" )

  14. Mysql:
    sudo apt-get install mysql-server mysql-client libmysql-ruby libmysqlclient-dev -y
    I`d recommend no root password
  15. Redis sudo apt-get install redis-server -y
  16. Memcached sudo apt-get install memcached
  17. ImageMagic sudo apt-get install imagemagick libmagick9-dev -y
  18. Arial/Verdana etc fonts: sudo apt-get install msttcorefonts
  19. VirtualBox
  20. Nginx + Passenger
  21. Restrcited codes sudo apt-get install ubuntu-restricted-extras -y
  22. Terminal
    Set Ctrl+Shift+L for clear+reset in terminal, so the history gets removed on keypress
    Set Ctrl+t for new tab
  23. Postgres
    sudo apt-get install postgresql libpq-dev
    gem install pg
    sudo su postgres
    createuser

    use no username / no password in database.yml

  24. Reverse scrolling
    If you often work on macs this can reduce your confusion.
    sudo add-apt-repository ppa:zedtux/naturalscrolling
    sudo apt-get update
    sudo apt-get install naturalscrolling -y

Installing MongoDb on Ubuntu Hardy from source with init.d and data dir

After setting up mongo by hand for 2 servers that are not deployed via puppet, here is a bash script to do it…


sudo su root

cd /opt/ && /usr/bin/curl -OL http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.4.1.tgz && tar -zxvf mongodb-linux-x86_64-1.4.1.tgz && ln -s /opt/mongodb-linux-x86_64-1.4.1 /opt/mongodb

useradd mongod -u 5005

curl http://gist.github.com/raw/413433/834a3d0ecc96cb36f8918f6d01b65fc082025cc0/gistfile1.sh > /etc/init.d/mongodb

chown mongod:mongod /etc/init.d/mongodb
chmod 750 /etc/init.d/mongodb

mkdir /etc/mongodb
chown mongod:mongod /etc/mongodb
chmod 750 /etc/mongodb

echo "dbpath=/opt/mongodb-data/" > /etc/mongodb/mongodb.conf
chown mongod:mongod /etc/mongodb/mongodb.conf
chmod 750 /etc/mongodb/mongodb.conf

mkdir /opt/mongodb-data
chown mongod:mongod /opt/mongodb-data
chmod 750 /opt/mongodb-data

one-liner to install nginx with passenger and ssl

Just build this little guy for our puppet script, maybe someone needs it too 🙂

export V=0.7.67 && wget -O /tmp/nginx-$V.tar.gz http://sysoev.ru/nginx/nginx-$V.tar.gz && cd /tmp && tar xzvf nginx-$V.tar.gz && sudo passenger-install-nginx-module --nginx-source-dir /tmp/nginx-$V --extra-configure-flags="--with-http_ssl_module" --auto --prefix=/opt/nginx-$V && rm /opt/nginx && sudo ln -s  /opt/nginx-$V /opt/nginx

(If you like the stock nginx without ssl, youll need the –auto-download option)

Lucid Lynx a fresh install with ruby, rails, passenger etc

A fresh install for my laptop, with some Desktop tools ans all the rails/ruby stuff i need. I tried using rvm for all gems, but since executables are not available it kind of sucks for things like passenger, where youd have to change the ruby path all the time, a real showstopper imo.

  1. Replace radiance theme with clearlock
  2. copy important dotfiles + firefox history/forms/… database from .mozilla
  3. install dotfiles
  4. Multi-clipboard: sudo apt-get install glipper (add to panel)
  5. install Skype
  6. Application laucher: sudo apt-get install gnome-do + enable skype plugin
  7. Ruby enterprise
  8. Java: sudo apt-get install sun-java6-jre
  9. Rubymine + add Rubymine Desktop icon + choose “meta is mapped to left win” in advanced keyboard layout options
  10. Mysql: sudo apt-get install mysql-server mysql-client libmysql-ruby
  11. Apache:  sudo apt-get install build-essential apache2 apache2-mpm-prefork apache2-prefork-dev
  12. sudo a2enmod rewrite
  13. Passenger
  14. SSL for apache/passenger
  15. gem sources -a http://gems.github.com
  16. gems…
  17. Git: sudo apt-get install git-core git-svn
  18. install redis
  19. sudo apt-get install memcached + add memcached -d to startup
  20. Arial/Verdana etc fonts:   sudo apt-get install msttcorefonts
  21. VirtualBox