Aug/100
sendmail[2525]: My unqualified host name (servername) unknown
If you see these messages in your syslog, your sendmail is not configured correctly with the domain name. If you are sending from a fully qualified domain, add it to the local-host-names file. In Ubuntu, it would be /etc/mail/local-host-names. Make sure it reads something like this.
localhost
[domain.com]
[server name]
Now in the /etc/hosts, make sure it reads the following.
127.0.0.1 [domain.com] [server name] localhost
…
Then
sudo /etc/init.d/sendmail restart
and the error should not continue filling the syslog.
Apr/100
Changing Mysql data directory require change to AppArmor
After a bit of googling and hair-pulling, I realized that if I just changed the datadir directive in my.cnf will cause mysql start to fail on Ubuntu. The other thing is to add permissions to apparmor for mysql to access the new data directories.
Steps
1. sudo vi /etc/apparmor.d/usr.sbin.mysqld
2. Add
/newdir/ r,
/newdir/** rwk,
3. sudo /etc/init.d/apparmor restart
4. sudo /etc/init.d/mysql restart
If that still does not work, check the nix permissions to be sure mysql is owner and group for the new directory recursively.
Dec/090
Ubuntu 9.10 Karmic slow Firefox
There is a bug in the IPv6 lookup in Karmic that is making any application requesting IPv6 while a NAT is not configured to respond to IPv6 respond very slowly. It is still a bug not solved at this time. Buta solution for Firefox is given here as a work around for now.
Aug/090
VMware Server must be reconfigured when there is a kernel upgrade
If the linux kernel is upgraded, vmware will not load http://localhost:8222. It requires a reconfigure when this happens. Do the following.
sudo /usr/bin/vmware-config.pl
Jul/090
Forget your mysql root password?
This following line saved my butt when something happened and my root password was no longer working.
sudo dpkg-reconfigure mysql-server-5.0
It will allow you to reset your root password without messing with the data or any other configuration in my.cnf.
May/090
Ubuntu apache2 virtualhost setup problems
If you are getting error messages when starting apache2 like
“Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName”
or
“[warn] _default_ VirtualHost overlap on port 80, the first has precedence”
you need to make sure a couple of lines are in your /etc/apache2/httpd.conf file.
ServerName localhost
NameVirtualHost *:80
Apr/099
Ubuntu 9.04 Vmware Arrow Keys Problem
I finally found how to get all those keys working on my newly installed Ubuntu 9.04 with my XP VM. The issue is that all the arrow keys and delete key don’t work. There are others too but not listed. So a bit of googling, I found that you have to map the keys in a vmware config file to solve the problem. So this is what needs to be done.
1. Edit /usr/lib/vmware/config
2. Add the following to the end.
xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu
3. Save it
4. Restart vmware
Thank goodness. What a pain this was to use with a whole bunch of keys not working.
Apr/090
GRUB Error 21 Dual Boot Raid
I was installing Ubuntu to dual boot onto a newly added drive on my workstation that already has Windows XP. After the installation, GRUB gives me error 21. I looked through all the forums and help and tried everything from reinstalling GRUB to modifying menu.lst. Nothing worked. Then I figured out what the problem was. My system before adding the new drive had three drives; one with XP OS and two in a Raid 1 array for data. The issue was the Raid 1 array. With the new drive I added for Ubuntu, the computer had four drives. During installation, Ubuntu saw four drives and when installing GRUB, it pointed Ubuntu to boot on hd3,0. However, when GRUB tried to load, the BIOS was showing only three drives and hd3 was non-existent resulting in error 21.
Then I decided to move my SATA cables around so the location of the Ubuntu install does not change no matter if we saw the Raid 1 as one drive or two. So I kept XP on hd0, moved Ubuntu to hd1, and then having the Raid 1 drives to follow with hd2 and hd3. At this point, I reinstalled GRUB and tried to boot up again with the Raid 1 configured in the BIOS. Now I get GRUB error 17! What the heck is that? I found that if I got rid of Raid on the BIOS, error 17 goes away and GRUB comes up without a problem.
I got tired of trying to debug this and decided to just go all Ubuntu and just VM XP for the few things I still need to do on Windows.
Nov/081
Where to install Eclipse on Ubuntu
If you’re like me, accustomed to installing most packages via Ubuntu’s package manager, you might be a bit confused as to where to install Eclipse since it should be in a place thats accessible by every user on your system. Sure you can install it in your user home directory but that wouldn’t be very tidy.
I extracted part of these instructions from: http://flurdy.com/docs/eclipse/install.html
These instructions assume you’ve downloaded and extracted the Eclipse tarball:
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipsesudoedit /usr/bin/eclipse
With these contents:
#!/bin/sh
export ECLIPSE_HOME=”/opt/eclipse”
$ECLIPSE_HOME/eclipse $*
Now you can execute Eclipse from anywhere in your bash shell. Check out the original article for generating a desktop icon. In the tarball I downloaded, it didn’t come with the icon.xpm that contains the Eclipse icon but no worries for me.
The take-home lesson here is that /opt is meant as a place to install application software packages. The topic is Filesystem Heirarchy Standard (FHS) .. these folks seem to be the standard authority on it:
http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES
However it’s not to say that this standard is the most progressive one we have today. I found GoboLinux to be particularly interesting: http://en.wikipedia.org/wiki/GoboLinux#The_GoboLinux_hierarchy
May/080
Mysql on 32bit processor vs 64bit processor
Here is the continuation of the experiment done previously on Mysql on Windows vs Linux. After doing more analysis and observation, it appeared that the difference in speed for the benchmark tests were not related to Windows and Linux but were related to the processor. The previous test just happened to have AMD 64s on the Linux machines and Intel Xeon 32bits on Windows. We hypothesized that the increased throughput of the 64bit processors resulted in about half the time required to return the same query run on a 32bit machine.
So we decided to test the same query again on a Windows machine with an AMD 64 X2. This time the result for the query took 7.35 second, almost the same as the other AMD 64s running Linux.
One more test to run the query on a Windows Intel 64bit chip machine would better solidify our hypothesis.