Posts Tagged ‘ubuntu’

Sinatra on Ubuntu 11.04

22. November 2011

No Comments »

The following guide is non-authoritative and probably will not work for you. It is simply the commands I use to reproduce a particular environment: Ruby 1.8.7 with Gems 1.8.10 and Sinatra (using Thin).

Before we get started, here is some information about my system:
[code]ubuntu@domU-12-31-38-04-6D-D7:~$ uname -a
Linux domU-12-31-38-04-6D-D7 2.6.38-8-virtual #42-Ubuntu SMP Mon Apr 11 07:04:38 UTC 2011 i686 i686 i386 GNU/Linux
ubuntu@domU-12-31-38-04-6D-D7:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
[/code]

1. Install the necessary Ubuntu packages (not sure if you need all of these).
[code]sudo apt-get install git build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev [/code]
Note: For Ubuntu 11.10 use libreadline-gplv2-dev instead of libreadline5-dev

2. Install RVM. At the time of writing this, the Ruby and Gems in the official repo are a little out of date. Note: I am running this as root for a multi-user install (more on this can be found here.)
[code]sudo bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)[/code]

3. Add necessary users to the RVM group.
[code]sudo usermod -a -G rvm ubuntu[/code]

4. Now you need to restart your shell for the changes to take affect. You can try to source the necessary files, but it is just as easy to exit and restart a new session.

5. At this point, it is a good idea to run rvm notes and rvm requirements and do/install anything it tells you (at the time of writing this, there was nothing extra I needed to install. By the time you read this, that probably will not be the case)

6. I was having some major problems with zlib, so I had to install that (here for more information).
[code]rvm pkg install zlib[/code]

7. Install Ruby 1.8.7 and set it as the default
[code]rvm install 1.8.7
rvm --defaut use 1.8.7[/code]

8. Install Sinatra and Thin
[code]gem install sinatra
gem install thin[/code]

Authenticate to Active Directory with Ubuntu

9. July 2009

1 Comment »

While Linux is a fantastic operating system, when it comes to user rights management, Active Directory is far superior than anything Linux currently implements. As a result many businesses and organizations implement the technology. For a longtime it was extremely difficult to get a Linux operating system to authenticate with active directory – configuring multiple services and managing to get them to work with each other, let alone work with Windows was a task best left for those with years of Linux administration experience. However, in recent years as Linux has become more user friendly, and it should be no surprise that authenticating with active directory has become easy too. In the past few days I have been working with an opensource software called likewise-open which is in the official Ubuntu repositories. Below is a quick guide to getting started and some tips/issues I have found.

Authenticating with likewise-open 4.1 (from Ubuntu 8.04 repository)

1. Install likewise-open
# sudo apt-get install likewise-open

2. Join the domain
# sudo domainjoin-cli join your.fqdn domain_admin
For example:
# sudo domainjoin-cli join example.com Administrator

REBOOT

3. Update rc.d
# sudo update-rc.d likewise-open defaults

4. Start likewise-open
# sudo /etc/init.d/likewise-open start

Using the default domain with likewise-open 4.1
To use the default domain (and avoid using DOMAIN\user to login) append the following line to /etc/samba/lwiauthd.conf
winbind use default domain = yes
==============================================================

Authenticating with likewise-open 5.1 (from Ubuntu 9.04 repository)

1. Install likewise-open5
# sudo apt-get install likewise-open5

2. Join the domain
# sudo domainjoin-cli join your.fqdn domain_admin
For example:
# sudo domainjoin-cli join example.com Administrator

REBOOT

3. Update rc.d
# sudo update-rc.d likewise-open defaults

4. Start likewise-open
# sudo /etc/init.d/lsassd start

Using the default domain with likewise-open 5.1
To use the default domain (and avoid using DOMAIN\user to login) uncomment the following line in /etc/likewise-open5/lsassd.conf
assume-default-domain = yes
==============================================================

Giving domain administrators sudo privileges
Append the following line to /etc/sudoers
%your.fdqn\\domain^admins ALL=(ALL) ALL

==============================================================
Known issues
1. After rebooting the computer and logging in you are given the error “Domain Controller unreachable, using cached credentials instead. Network resource may be unavailable.” Likewise does not start correctly. You have to login as a local admin and run the following command and then users will be able to login.
# sudo /etc/init.d/likewise-open restart
Issue seems to be resolved with likewise-open5

2. If you are having issues authenticating wirelessly, make sure your wireless connection is established. In many instances, wireless will only connect AFTER you login.

3. Samba does not hide hidden windows shares

Setting up a LAMP server with Ubuntu

5. July 2009

No Comments »

Ubuntu, known for its ease of use, makes no exception for setting up an apache, mysql, and php stack. Since the release of Feisty Fawn, Ubuntu has come packed with tasksel – a user interface for installing tasks.

1. At your command prompt, run tasksel as root.

john@earth:~$ sudo tasksel

2. Select LAMP server
1

3. Continue the installation by following the prompts.

It works!
4

One tool I have difficulty living without is phpMyAdmin. From the command prompt type

sudo apt-get install phpmyadmin

Continue the installation by following the prompts. If you are using a version of Ubuntu older than 9.04 (Jaunty) you will need to add the following line to /etc/apache2/apache2.conf Continue the installation by following the prompts. Version 9.04 does this automatically. You will be able to access phpMyAdmin by browsing directly to http:///phpmyadmin