Linux Ubuntu
After over a year of using openSuse 10.0 to run
Slion.net and following the advice from my friend Frank I decided to try out
Ubuntu 6.10.
Motivations
One might ask why change your system? Here are my motivations:
- openSuse 10.0 is the only Linux I've been running at home for a significant amount of time. So I thought it might be interesting to try some other distribution.
- I think being able to install a system is an essential skill for a Software Engineer like me. So from time to time I exercise that skill.
- I got no girl friend since December, spend the last 3 week-ends on various dance floor and ended up home at dawn, drunk and lonely...
- I'm kind of sick this week-end and don't feel like going out socializing
- Minor issues I have with my current openSuse installation:
- When I run a
find from the root of the file system it crashes the machine - I think I had that issue before see LinuxCrash.
- I find the package management rather messy - Even more since I installed every single package available.
- Desktop screen resolution not optimal. Surely a compatibility issue with my graphic card.
Why Ubuntu?
- I heard of it long ago from my friend Alex a Security Consultant.
- Last week Frank said they changed from openSuse to Ubuntu at his company.
- It's Debian based and I've been using Debian quite a bit.
- I'm running my company's intranet TWiki on a Debian machine.
- I've been using Debian through my DreamHost web hosting account.
- I like the Ubuntu mantra: "Linux for human beings"
- At first sight the desktop looks great.
Why using a graphical desktop to run web server?
- Because I'm a human being and I too get bored and frustrated of typing command lines.
- I also enjoy using that same machine for doing various software development tasks.
- I don't like self flagellation
Search documentation
Problems & Solutions
I can't log on as root?
That's the first oddity I came across on
Ubuntu. In fact the
root account is locked by default on
Ubuntu and they use
sudo to perform administrator tasks.
How to enable root account?
If like me you are having to do some serious setup in your machine you most certainly want to enable the root account to avoid typing
sudo and your user password too often. Just do
sudo passwd root and choose a password. To disable the root account again just do
sudo passwd -l root. See my
source.
How to install mc (midnight commander)?
mc is not listed in the standard package cache. After a short struggle trying to get that working using the command line I decided to use the UI and Synaptic Package Manager. I just followed some instructions from
UbuntuGuide.org on how to load the
universe package repository using Synaptic. I find the whole thing very impressive next to openSuse 10.0 package management.
How to change your machine hostname?
See the solution
there
How to setup your AVM WLAN!Fritz USB stick
First download the Windows
drivers and unzip them by running the Windows executable using
wine. Then
setup Ndiswrapper, it will allow you to use Windows drivers. The
.inf file you want to use is
fwlan.inf. Once the drivers are installed do
iwlist wlan0 scanning to get your wireless network
ESSID. Then do something like
sudo iwconfig wlan0 essid "MyWirelessNetworkName" key s:myasciipassword mode Auto.
I can't get that to work. It sees my WLAN but just can't get an IP from it!
How to configure my desktop?
Right click your menu icon on panel and select
Edit Menus, go to
System tools and show the
Configuration editor. Launch it go to /apps/nautilus/desktop and select your options. You can also
read that.
How to modify kernel boot up argument?
Edit
/boot/grub/menu.lst.
How to execute a GNOME application as root?
Edit the Launcher properties and add the
gksudo to the Command.
How to debug your mouse?
To find out your mouse buttons and wheel mapping got to a terminal window and type
xev.
- Edit
/etc/X11/xorg.conf and set your mouse settings to:
Section "InputDevice"
Driver "mouse"
Identifier "Configured Mouse"
Option "ButtonNumber" "12"
Option "Buttons" "12"
Option "Device" "/dev/input/mice"
Option "Name" "PS2++ Logitech MX Mouse"
Option "Protocol" "explorerps/2"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "11 12"
Option "Resolution" "800"
EndSection
- Edit or create
~/.xmodmap and add those two lines:
! Set up the MX1000 mouse buttons%BR%
pointer = 1 2 3 6 7 8 9 10 11 12 4 5
See
post on Ubuntu forum.
How to make your mouse work with KVM
After a KVM switch and back the mouse can behave erratically or buttons and wheel might not be working anymore. Here is how to fix that:
- Edit and add the following to
/etc/modules :
#Load psmouse module
psmouse
- Edit and add the following to
/etc/modprobe.d/options
#Make my mouse work with KVM
options psmouse proto=imps
Can't get mouse wheel to work on KDE?!? xev gets the events though so I wonder what that could be. Maybe it would just work with default mouse settings on KDE?
How to install setup a web site?
- Install Apache2 packages - I did that using Synaptic, that's how lazy I'm
- Create your virtual host configuration file in
/etc/apache2/sites-available
- Create a symbolic link to that virtual host configuration file in
/etc/apache2/sites-enabled. See symbolic link.
- Restart apache by running:
/etc/init.d/apache2 restart
How to install mod-perl?
- Use Synaptic and install the
libapache2-mod-perl2 package.
- The mod-perl module will be loaded, you only have to setup your apache configuration for using it.
How to setup SSL?
So it goes like that:
a2enmod ssl
openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
cp server.crt /etc/ssl/certs
cp server.key /etc/ssl/private
Edit
/etc/apache2/ports.conf and add:
Listen 443
Edit your site virtual host configuration and add:
SSLEngine on
SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
For more security using a password do
openssl genrsa -des3 -out server.key 1024
instead of
openssl genrsa -out server.key 1024
How to generate your certificate
- Generate
server.key using: openssl genrsa -des3 -out server.key 1024
- Generate
server.csr using: openssl req -new -key server.key -out server.csr
- Generate
server.crt using: openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
How to install TWiki?
- Install CPAN
CGI::Session module.
The following perl module would not compile when installed using CPAN but they are provided as Debian packages by Ubuntu:
- libdigest-sha1-perl (Digest::SHA1)
- libcompress-zlib-perl (Compress::Zlib)
- PerlMagick
How to install ddclient?
- Just get the
ddclient package.
How to install Subversion?
How to install websvn?
Install and configure the websvn package. Make sure to copy
/var/www/websvn to the document root of the virtual host running websvn.
/etc/apache2/conf.d/websvn loads
/etc/websvn/apache.conf. Maybe you want to delete
/etc/apache2/conf.d/websvn and include
/etc/websvn/apache.conf from your virtual host configuration. If needed add some authentication management directive to
/etc/websvn/apache.conf.
How to install KDE
Follow those
instructions or just do:
aptitude update
aptitude install kubuntu-desktop
How to install a mail server
I had such a hard time trying to figure out how to setup Exim4. It was so easy in the end.
Here are the packages I used:
exim4
exim4-base
exim4-config
exim4-daemon-heavy
exim4-doc-html
eximon4
I used
exim4-daemon-heavy over
exim4-daemon-light because I needed SASL authentication to connect to my ISP SMTP server.
Use Synaptic to run the configuration on the
exim4-config package or just do it from the command line using
dpkg-reconfigure exim4-config.
All I wanted was to send e-mails from that machine only so I did the following configuration:
- Split configuration into small files? No
- Choose mail sent by smarthost; no local mail
- System mail name : slion.net
- IP-addresses to listen on for incoming SMTP connections : 127.0.0.1
- Other destinations for which mail is accepted : slion.net
- Visible domain name for local users : slion.net
- Machine handling outgoing mail for this host (smarthost) : smtp.1und1.de (use your ISP SMTP server)
- Keep number of DNS-queries minimal (Dial-on-Demand)? No
Typically your Mail Transfer Agent (postfix/exim4) needs to authenticate with your service provider's SMTP server using SASL. To do that you need to provide your credentials for your service provider email account. It should be the same set of login/password pair you are using to logon on your ISP web mail service.
For Exim4 put your ISP SMTP server's credentials in
/etc/exim4/passwd.client. It should follow that format:
smtp.isp.com:login:password.
Launch
eximon and try sending a mail using
sendmail perl script for instance.
You should see the SMTP server response in
eximon. Alternatively you can check the logs in
/var/log/exim4 to see if your mail was sent successfully.
How to install Teamspeak
Add the following package repository and look for the
teamspeak-server package.
deb http://ftp.de.debian.org/debian unstable main contrib non-free
How to fix permission issues with apache logs
Alter the log file permissions in
/etc/logrotate.d/apache2.
Read that
Ubuntu Forums article.
How to install Subversion extension for Nautilus
Short reminder: Nautilus is the GNOME file explorer and GNOME is the Apple like Desktop for Linux and default Ubuntu Desktop.
You need to install the package
nautilus-script-collection-svn.
Once install it needs to be enabled in Nautilus. Just run the following commands:
sudo apt-get install nautilus-script-collection-svn
nautilus-script-manager enable Subversion
See my
source in French.
See what looks like the
nautilus-script-collection-svn home page.
References