Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

This Week I Learned - 2016 Week 30

Looking back to the last week post or you might want to check out the whole series.

How to sort a hash in Perl. However, that is only for one column or key. How about multiple keys or columns? Similar, just with additional criteria.

Why SSH takes a long time to connect? Just update the SSH daemon configuration file.
$ vi /etc/ssh/sshd_config
GSSAPIAuthentication no
UseDNS no

DebOps. A great showcase on using Ansible. Unfortunately, it still did not solve one of the main issue server provision on multiple distros as this only works on Debian or Debian-based distros. Meanwhile, there exists another tool, Molecule, to help testing Ansible under different environments.

Speeding up APT? Use Apt-fast, which is a wrapper for Apt which use different downloader which support parallel downloads.

Good introduction to Vue.js. Note that this is for version 1.0 but the concept still relevant.

How to implement infinite scrolling. Surprisingly the concept is very simple.

Probably the best REPL for Perl, Reply.

Testing Debian GNU/Hurd 0.6

It was so long since I last heard about GNU Hurd but most recent 0.6 release piqued my interest compare to last time as my laptop are powerful enough to test run in a virtualization environment.

Installation was done in Fedora 22 where I've spend most of my computing time. On a side note, Fedora, as a desktop Operating Ssytem, is way more integrated and stable compare to Ubuntu. To be more precise, user experience in Gnome 3 is just way better than Unity desktop, although the former came a long way, after being constant ridiculed before reaching that usable point.

Let's continue with the installation. We will run it as a Debian GNU/Hurd QEMU guest OS image. Before that, we will need to install all the necessary packages.
$ sudo dnf install aria2 qemu-system-x86

Download the image using Aria2 download client.
$ aria2c -x 4 http://people.debian.org/~sthibault/hurd-i386/debian-hurd.img.tar.gz
[#aa5de7 10MiB/380MiB(2%) CN:4 DL:380KiB ETA:16m34s]

Instead of using Wget download client, we can create an alias which point to Aria2 instead, as shown.
alias wget='aria2c -x 4'

Extract image file which is roughly around 3G.
$ tar -xz < debian-hurd.img.tar.gz
$ qemu-img info debian-hurd-*.img
image: debian-hurd-20150424.img
file format: raw
virtual size: 2.9G (3146776576 bytes)
disk size: 1.2G

Following the documentation to boot the Operating System through QEMU through the image file.
$ qemu-system-i386 -m 512 -net nic,model=rtl8139 -net user -drive cache=writeback,index=0,media=disk,file=$(echo debian-hurd-*.img)
WARNING: Image format was not specified for 'debian-hurd-20150424.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions.

As the console message stated, to remove restriction on write operations on block 0, we have explicitly specify disk format by adding -drive format=raw option.
$ qemu-system-i386 -m 512 -net nic,model=rtl8139 -net user -drive format=raw,cache=writeback,index=0,media=disk,file=$(echo debian-hurd-*.img)

Once you see the login prompt screen as shown below, login as root user and press enter. Password is not needed.


To enter into the GUI interface, start the Window Manager, which is IceWM. Note that to exit mouse grab within QEMU, just press CTRL+ALT+G.
$ startx


The screenshot above which reminds me of the early days of GNU/Linux where there are no desktop environment but just a bunch of Windows Managers. I'm always wonder when can we really use GNU/Hurd as an alternative or replacement to GNU/Linux distros? Next century perhaps? Yes, the development is that dog slow as most or all kernel developers are working on GNU/Linux.

Shockwave Flash has crashed

Kept getting this error message while trying to play any Flash video these past few days in Google Chrome Version 37.0.2062.120 in Debian Wheezy. According the this bug report, it was caused by the 'erroneous GLIBC_2.14 requirement'.

From all the recommended temporary solution, the best is still revert to the previous working version or downgrading. Luckily, apt kept a cache copy of the deb package.
$ sudo dpkg -i /var/cache/apt/archives/google-chrome-stable_37.0.2062.94-1_amd64.deb
$ killall chrome
$ google-chrome

Oz - Virtual Machine Builder

Stumbled upon this program, oz while trying different kind of virtual machine image builder. Unfortunately, there is not Deb package for Debian 7, hence I've to build one for myself.

Following the instruction here, creating deb package is quite straightforward.

Install the prerequisite packages.
$ sudo apt-get install debhelper python-all build-essential git-core gdebi

Clone the Git repo.
$ mkdir /tmp/oz
$ cd /tmp/oz
$ git clone https://github.com/clalancette/oz oz-git

Build the deb package.
$ cd oz-git
$ dpkg-buildpackage -us -uc
$ cd ../

Install the software with all the necessary dependencies using Gdebi installer.
$ sudo gdebi oz_*_all.deb

However, to get this tool to work, you'll have to install and setup KVM virtualization.
$ sudo apt-get install qemu-kvm libvirt-bin
$ sudo adduser kianmeng kvm
$ sudo adduser kianmeng libvirt

Refresh and update your user groups without manually logout from the system.
$ exec su -l $USER

As non-root user, there should be no permission denied error when running below command.
$ sudo virsh list --all

Network stuff.
$ sudo virsh net-list --all

Name                 State      Autostart
-------------------------------------------------------
default              inactive   yes      

$ sudo virsh net-start default

error: Failed to start network default
error: internal error Child process (/usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override) unexpected exit status 2: 
dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use

Apparently, running your own dnsmasq with have conflict with libvirt. To solve it, make sure dnsmasq bind to certain interface only. Edit /etc/dnsmasq.conf and uncomment these lines.
interface=wlan1
bind-interface

$ sudo service dnsmasq restart
$ sudo virsh net-start default
$ sudo virsh net-autostart default
$ sudo $ /sbin/brctl show
bridge name     bridge id                            STP enabled     interfaces
virbr0                 8000.525400d0634b       yes                     virbr0-nic

On a related note, based on my few days experience, if you want to try out anything related to cloud or virtual machine, Fedora seems to be a more suitable and supported GNU/Linux distro. I'm thinking whether to move away from Debian to Fedora as my base distro.

PHP Version Manager (PHPENV)

With the recently release PHP 5.6, I stumbled upon these tools, phpenv, (inspired by rbenv) and php-build which let you build different PHP versions without messing up your existing installation. For installation steps, we're following Kobito's setup guide.

1. To setup both phpenv and php-build, just type these commands. Be extra careful when running downloaded shell script directly from the net.

$ curl https://raw.github.com/CHH/phpenv/master/bin/phpenv-install.sh | bash
$ git clone git://github.com/CHH/php-build.git ~/.phpenv/plugins/php-build
$ echo 'export PATH="$HOME/.phpenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(phpenv init -)"' >> ~/.bashrc
$ exec $SHELL -l

2. Checking our installation. Second command should give you a long list of PHP versions.
$ phpenv --version
rbenv 0.4.0-98-g13a474c

$ phpenv install -l

3. As I was running Debian, install all the necessary packages so we can compile the source code.
$ sudo apt-get install make ccache re2c libcurl libcurl-dev bison libcurl4-gnutls-dev libjpeg62-dev libmcrypt-dev libtidy libtidy-dev libxslt1-dev apache2-prefork-dev

4. Compilation. Took me around 15 minutes.
$ CFLAGS="-g" phpenv install 5.6.0

$ which php
/home/kianmeng/.phpenv/shims/php

5. Switching between installed version (system) and your compiled version.
$ phpenv versions
* system (set by /home/kianmeng/.phpenv/version)
5.6.0

$ phpenv global
system

$ php --version | grep ^PHP
PHP 5.4.4-14+deb7u14 (cli) (built: Aug 21 2014 08:36:44)

$ phpenv rehash
$ phpenv global 5.6.0

$ phpenv global
5.6.0

$ php --version | grep ^PHP
PHP 5.6.0 (cli) (built: Sep  1 2014 03:26:46)

Unfortunately, to install phpdbg, you'll need to create another shell script, as a plugin to php-build in order to build it. Someday perhaps.

AMD Radeon R7 260X

R7 260X, that's probably the best budget (less than USD100) graphic card you can buy right now which have good support for both FOSS and proprietary driver for GNU/Linux. I'm still contemplating about getting this card.

Two reasons. The hefty price, average local price is around MYR470+ and unsure support in Debian Wheezy with backports kernel (>= 3.13). If possible, I would like to stick with Debian Wheezy and FOSS driver. It would be even better if I can get WebGL to work in Chrome.

Debian Wheezy Backports Kernel

So I assumed, upgrading your Debian Wheezy to later kernel version through backports, is relatively easy, you've just to
$ echo "deb http://ftp.debian.org/debian/ wheezy-backports main non-free contrib" | sudo tee -a /etc/apt/sources.list.d/wheezy-backports.list

$ echo "deb-src http://ftp.debian.org/debian/ wheezy-backports main non-free contrib" | sudo tee -a /etc/apt/sources.list.d/wheezy-backports.list

$ sudo apt-get update
$ sudo apt-get -t wheezy-backports install linux-image-amd64
$ sudo apt-get -t wheezy-backports install linux-headers-amd64 
$ uname -a
Linux butterfly 3.14-0.bpo.1-amd64 #1 SMP Debian 3.14.7-1~bpo70+1 (2014-06-21) x86_64 GNU/Linux

Easy right? Straight forward right? Wait until you reboot your machine...
$ sudo reboot

X can't start due to incompatible Nvidia drivers with the Kernel. Virtualbox also won't load as well. Remove and update the Virtualbox's Dynamic Kernel Module Support (DKMS) since it's does not come together with the GNU/Linux source.
$ sudo apt-get remove virtualbox-dkms
$ sudo apt-get -t wheezy-backports install virtualbox-dkms
$ sudo reboot

Everything seems okay. No conflict and failure during booting.

Next, the Nvidia's DKMS.
$ sudo apt-get remove nvidia-kernel-dkms
$ sudo apt-get -t wheezy-backports install nvidia-kernel-dkms
$ sudo reboot

Still can't get X to show up. Check the kernel log.
$ dmesg | grep nvidia

[   65.677942] nvidia: Unknown symbol acpi_os_wait_events_complete (err 0)

acpi_os_wait_events_complete (err 0)? It seems the Nvidia is/was ? A bit lacking behind following changes with the Kernel API with their driver. Patching it manually did not solve the issue.

Unfortunately have to purge all Nvidia driver and switch to
$ dpkg --get-selections | grep nvidia | xargs sudo aptitude purge --assume-yes
$ sudo rm /etc/X11/xorg.conf
$ sudo rm /etc/X11/Xorg.conf.d/20-nvidia.conf
$ sudo apt-get install -t wheezy-backports xserver-xorg-video-nouveau
$ sudo reboot

Update the xrandr to relect driver changes so that the dual-monitors will work again. Nouveau driver is noticeable dog slow, not a pleasant experience especially when watch YouTube as it can hang occasionally for some unknown reason.

Lesson learned. Upgrading backports kernel in Debian is not that straight forward. Should I switch to to AMD ATI card instead? Do not foresee myself getting any Nvidia hardware in coming years.

mkdtemp: private socket dir: Permission denied

Woke up this morning and my GDM login kept kicking me out of the login. Ctrl+Alt+F1 back to the console shell and check all the logs message. Based on the similar incident I've faced few months back, check the the .xsession-errors file. Result as shown.

Go to my home directory.
$ cd

Read the X's session log file for some clue.
$ cat .xsession-errors
/etc/gdm3/Xsession: Beginning session setup...
localuser:kianmeng being added to access control list
openConnection: connect: No such file or directory
cannot connect to brltty at :0
Script for scim started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
mkdtemp: private socket dir: Permission denied

Googled around, it seemed that this is quite a common issue. To confirm my finding.
$ ls -ld /tmp
drwxr-xr-x 17 root root 20480 Jun 15 12:42 /tmp/

Applied the fix.
$ sudo chmod a+wt /tmp

What is the actual root cause? Last I remembered, I was restarting the machines repeatedly without login to the machine, for some BIOS settings tweaking. Most likely that's reason.

The Weirdness of Ruby Version in Debian Wheezy

Due to certain application dependency on Ruby, I need to install Ruby on the machine. As you can see from below, the versioning and packing in Debian puzzled me.

Install the latest Ruby version and the ruby-switch program which will can set the default Ruby version to any installed version.
$ sudo apt-get install ruby1.9.3 ruby-switch

Check our just installed version.
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Show the list of available version. Note that listing shows ruby1.9. I thought we've just installed version 1.9.3?
$ sudo ruby-switch --list
ruby1.8
ruby1.9.1

Set version 1.9.3 as our default Ruby version.
$ sudo ruby-switch --set ruby1.9.1

Check the binary of ruby. Apparently it is a soft link.
$ file `which ruby`
/usr/bin/ruby: symbolic link to `/etc/alternatives/ruby'

Again, another soft link but pointed to ruby1.9.1.
$ file /etc/alternatives/ruby
/etc/alternatives/ruby: symbolic link to `/usr/bin/ruby1.9.1'

Check whether /usr/bin/ruby1.9.1 is a binary or soft link. As result shown, it's a binary program.
$ file /usr/bin/ruby1.9.1
/usr/bin/ruby1.9.1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xf5d1e1e2959315b9d4907b6a40fb2c44f1c27c87, stripped

Check the ruby1.9.1 version again. What?! Why it's showing version 1.9.3?
$ /usr/bin/ruby1.9.1 --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Check which package contains this /usr/bin/ruby1.9.1 binary. Weird, it belongs to ruby1.9.1 package, which is reasonable but I didn't install that.
$ apt-file search /usr/bin/ruby1.9.1
ruby1.9.1: /usr/bin/ruby1.9.1

Show the reverse dependancies. Why ruby1.9.1 needs ruby1.9.3?
$ apt-cache rdepends ruby1.9.1 | grep ruby
ruby1.9.1
ruby1.9.1:i386
libstfl-ruby1.9.1
ruby1.9.3
ruby1.9.1-full
ruby1.9.1-examples
ruby1.9.1-dev
ruby

Okay. Let's check with Ruby Gem. Similar steps.
$ file `which gem`
/usr/bin/gem: symbolic link to `/etc/alternatives/gem'

$ file /etc/alternatives/gem
/etc/alternatives/gem: symbolic link to `/usr/bin/gem1.9.1'

Interesting. gem1.9.1 is a ruby script.
$ file /usr/bin/gem1.9.1
/usr/bin/gem1.9.1: Ruby script, ASCII text executable

However, when checking the version of /usr/bin/gem1.9.1.
$ /usr/bin/gem1.9.1 --version
1.8.23

What the heck?!

Debian 7 Installation : Part 5 - Graphic Adapter (Nvidia)

Since I have an old legacy Nvidia graphic card that support dual monitors (VGA and DVI port), might as well reuse it again to setup my home development environment. This card will support two DELL E190S LCD monitors, the last of the remaining square size monitor still being manufactured.

Let's follow the wiki instruction to detect, install, and configure this graphic card to the maximum potential output. If you insert the card properly, the original Matrox adapter will be disable, otherwise you'll need to take it out again and reinsert it back.

First, let's find the exact model number. As shown below, the card is GeForce 7300 SE/7200 GS.
$ lspci - nn | grep VGA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G72 [GeForce 7300 SE/7200 GS] [10de:01d3] (rev a1)

Alternately, instead of using lspic command, we can use lshw command as well, which show more hardware details.,
$ sudo apt-get install lshw
$ sudo lshw -C display
  *-display               
       description: VGA compatible controller
       product: G72 [GeForce 7300 SE/7200 GS]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: [email protected]:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:d2000000-d2ffffff memory:c0000000-cfffffff memory:d1000000-d1ffffff

Next, we need to detect the Graphic Processing Unit (GPU) to make a recommendation for the matching drivers to be used. I used to set it up on two LCD monitors few years back and driver support should be stable and good enough.
$ sudo apt-get install nvidia-detect
$ nvidia-detect 
Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G72 [GeForce 7300 SE/7200 GS] [10de:01d3] (rev a1)
Your card is supported by the default drivers and version 173.
It is recommended to install the
    nvidia-glx
    package.

Following the wiki instruction again, let's install the necessary packages for this graphic card. If you haven't add the non-free repository, type this command to add the non-free repository.
$ cat 'deb http://http.debian.net/debian/ wheezy main contrib non-free' \
| sudo tee /etc/apt/source.list.d/wheezy-non-free.list

Note that I don't modified the default repository list file (/etc/apt/sources.list) as it is easier to put every repository details in /etc/apt/source.list.d folder and rename it to something else if want to disable it. This is a matter of preferences.

Finally, we will update the update the package index files and install the necessary packages.
$ sudo aptitude update
$ sudo aptitude r install linux-headers$(uname r|sed 's,[^]*[^**]*-,,') nvidia-kernel-dkms

Again, we don't use the default /etc/X11/xorg.conf file anymore but instead put it as separate file in /etc/X11/xorg.conf.d folder. Is easy to toggle a configuration file using such mechanism. More on this later when we want to setup for dual monitors.
$ sudo mkdir /etc/X11/xorg.conf.d
$ echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' \
| sudo tee /etc/X11/xorg.conf.d/20-nvidia.conf

Lastly, before we reboot the machine, we need to install the GUI software to manage the graphic card settings. See the screenshot below.
$ sudo apt-get install nvidia-settings
$ sudo nvidia-settings
$ sudo reboot

Debian 7 Installation : Part 4 - Graphic Adapter (Matrox)

Checking the VGA display adapter used by the machine. Surprising to find the long forgotten graphic card manufacturer, Matrox on this machine.
$ lspci | grep -i VGA
01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200 AGP (rev 03)

Instead of using the default basic VESA driver which is quite slow (you can see the screen slowly refresh itself), we opt for the exact vendor driver instead.

Following the configuration instructions by pc-freak, we need to rebuild and install vendor driver for getting the best optimized performance from this legacy card.
$ sudo apt-get install --yes xserver-xorg-video-mga
$ sudo dpkg -i /usr/src/modules/mga-vid/debian/mga-vid-source_2.6.32-1_i386.deb
$ sudo apt-get install --yes mga-vid-common
$ sudo reboot

Debian 7 Installation : Part 3 - Root Account and Wifi Configuration

Continue with previous post on the setup of the new Debian installation.

During the installation, I chose to disable the root account and hence the first user will use sudo to perform administrative tasks. A practice popularized by Ubuntu.

However, if you want to set the root password, just simple type command below to replace the default empty password.
$ sudo passwd root

Next step, settings up my Wifi dongle so I can move this server anywhere around the house instead of limiting myself to certain location using wired connection.

Using the lsusb command to find the brand and model of the Wifi adapter.
$ lsusb

Unfortunately, you will need install special non-free binary firmware for the RTL8188CUS Wifi adapter to work.
$ echo "deb http://http.debian.net/debian/ wheezy main contrib non-free" \
| sudo tee /etc/apt/sources.list.d/wheeze-non-free.list
$ sudo apt-get update
$ sudo apt-get install firmware-realtek
$ sudo reboot

Sadly, the default package repository is just dog slow, updating speed was pathetically at 725B/s!

Debian 7 Installation : Part 2 - Burning ISO Image to USB Thumbdrive

Continue with previous post on Debian installation. The CD image was created using isohybrid technology, which can write to both CD ROM and USB thumbdrive. However, since most laptop these days don't have CD ROM anymore, we've to write the ISO image into a USB thumbdrive and do our installation
through this media.

Plug your thumbdrive in and check for the device name through any of these commands. Typically the thumbdrive device name start with /dev/sdb, /dev/sdc, or the next sequence. For my case, the device name is /dev/sdc.
$ dmesg
$ df -h
$ mount

Write bootable ISO image to the USB thumbdrive using the dd command. Be patient as it takes a while to finish both commands.
$ sudo dd if=debian-7.4.0-amd64-CD-1.iso of=/dev/sdc bs=4M
$ sync

Take the the USB drive and boot the machine using it. Before that, please remember to configure your BIOS to boot from removable media first. If you encounter this error message "isolinux.bin missing or corrupt" when booting from thumbdrive, then you've wrote the image to the thumbdrive incorrectly. Double check the dd command in step 2 again as the device name is /dev/sdc and not the partition name /dev/sdc1.

On a side note, I prefer Debian to Ubuntu installer as it is more verbose in explaining the reason of the installation procedure. The Ubuntu installer has been dumbed down or made easier for beginner user.

Debian 7 Installation : Part 1 - ISO Image Verification

Due to unforeseen reason, I need to revive back my unused server and install Debian 7 (Wheezy), the latest stable version on it. It has been a while since I last use Debian as my primary GNU/Linux distro compare to its siblings, Ubuntu. Some notes regarding the installation procedure.

Download the ISO CD 1 image as well as the signed checksum files (for verification) from the cdimage site. I opted to use the first CD image which we will later burn into the USB thumbdrive as installation media.
$ wget http://cdimage.debian.org/debian-cd/7.4.0/amd64/iso-cd/debian-7.4.0-amd64-CD-1.iso
$ wget http://cdimage.debian.org/debian-cd/7.4.0/amd64/iso-cd/SHA512SUMS
$ wget http://cdimage.debian.org/debian-cd/7.4.0/amd64/iso-cd/SHA512SUMS.sign

Due to recent exposure to keysigning, is a good practice validate the ISO image using the checksum tool and verify the authenticity of the ISO image. It took me a while of googling to find the proper step-by-step guide (in Chinese but the instructions are quite obvious) to validate and verify the downloaded iso images. Funny how the official documentation does not even has these instruction.

First, let's verify the checksum file to confirm this image was built by the authorized people. As the error message below shown, we're missing the public key to verify the signed checksum.
$ gpg --verify SHA512SUMS.sign SHA512SUMS

gpg: Signature made Isnin 10 Feb 2014 02:31:31  MYT using RSA key ID 6294BE9B
gpg: Can't check signature: public key not found

Find and add the required public key that signed this checksum file. We can obtain this public key from Debian's own key server. Take note of the last line where this key is still not fully valid or trustworthy enough according to the PGP trust model.
$ gpg --keyserver http://keyring.debian.org --recv-keys 6294BE9B

gpg: requesting key 6294BE9B from hkp server http://keyring.debian.org
gpg: key 6294BE9B: public key "Debian CD signing key " imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

To be safe, just to confirm the aforementioned public key had been added locally. The fingerprint shown below should exists in Debian CDs authentication and verification page.
$ gpg --fingerprint 6294BE9B                                                                                                                                        
pub   4096R/6294BE9B 2011-01-05
Key fingerprint = DF9B 9C49 EAA9 2984 3258  9D76 DA87 E80D 6294 BE9B
uid                  Debian CD signing key 
sub   4096R/11CD9819 2011-01-05

Let's verify our downloaded checksum file (SHA512SUMS) using the added Debian CD signing key file (SHA512SUMS.sign).
$ gpg --verify SHA512SUMS.sign SHA512SUMS
gpg: Signature made Isnin 10 Feb 2014 02:31:31  MYT using RSA key ID 6294BE9B
gpg: Good signature from "Debian CD signing key "
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: DF9B 9C49 EAA9 2984 3258  9D76 DA87 E80D 6294 BE9B

However, as the message above indicates, the signature is valid but identify is unverified. Let's show the list of people who had signed this Debian CD signing key.
$ gpg --list-sigs 6294BE9B
pub   4096R/6294BE9B 2011-01-05
uid                  Debian CD signing key 
sig          1B3045CE 2011-01-07  [User ID not found]
sig          3442684E 2011-01-05  [User ID not found]
sig          A40F862E 2011-01-05  [User ID not found]
sig          C542CD59 2011-01-05  [User ID not found]
sig          63C7CC90 2011-01-05  [User ID not found]
sig 3        6294BE9B 2011-01-05  Debian CD signing key 
sub   4096R/11CD9819 2011-01-05
sig          6294BE9B 2011-01-05  Debian CD signing key 

Import these public key with their corresponding names and email addresses.
$ gpg --recv-keys 1B3045CE 3442684E A40F862E C542CD59 63C7CC90
$ gpg --list-sigs 6294BE9B

pub   4096R/6294BE9B 2011-01-05
uid                  Debian CD signing key 
sig          1B3045CE 2011-01-07  Colin Tuckley 
sig          3442684E 2011-01-05  Steve McIntyre 
sig          A40F862E 2011-01-05  Neil McGovern 
sig          C542CD59 2011-01-05  Adam D. Barratt 
sig          63C7CC90 2011-01-05  Simon McVittie 
sig 3        6294BE9B 2011-01-05  Debian CD signing key 
sub   4096R/11CD9819 2011-01-05
sig          6294BE9B 2011-01-05  Debian CD signing key 

Alternatively, you can find the list of users that signed the public key 6294BE9B by using debian-keyring package.
$ sudo apt-get install debian-keyring
$ gpg --keyring /usr/share/keyrings/debian-keyring.gpg -kvv 6294BE9B

You can only verify the identity of the Debian CD signing through the concept
of Web of Trust [7] by going through the list of people above either by signing
their public key (which you've meet them in real life or trust them through
fingerprint exchange) or ask them directly.

Lastly, let's check ISO image file for correctness and corruption.
$ sha512sum -c SHA512SUMS debian-7.4.0-amd64-CD-1.iso 2> /dev/null | grep debian-7.4.0-amd64-CD-1.iso
debian-7.4.0-amd64-CD-1.iso: OK

Stuck with Consevative GNU/Linux Distros

I stuck with conservative GNU/Linux distros (Centos or Debian stable) which don't let you update to a more current LAMP-stack packages. No, don't want to compile source code. What should I do?
For Debian stable, use Dotdeb. For Centos, use IUSCommunity. IUS stands for Inline with Upstream Stable. This third party RPM repository is "sponsored by internal work at Rackspace (but officially unsupported)"

What if I stuck with hosting panel like cPanel, Plesk, or Direct Admin?
Pray hard. Pray very hard. You're at the mercy of your hosting provider.

RedHat/CentOS vs. Debian/Ubuntu

Interesting discussion on experiences using Centos/Redhat, Ubuntu, and Debian. Funny nobody mentions OpenSuSe, Gentoo, or Arch on any serious server deployment. Summary of the discussion.

1. Centos/Redhat. High-performance computing (HPC), scientific stuff, Oracle databases, or Java-related stuff.

2. Ubuntu. Mostly desktop. Latest and greatest stuff. The (Long Term Support) LTS is crappy for HPC.

3. Debian. Server stuff or a more stable and conservative Ubuntu (LTS).

To be fair, for typical LAMP-stack server, all above mentioned GNU/Linux distros are good enough. But Ubuntu/Debian are far more convenient to get more latest greatest packages. 

What is debian-sys-maint?

debian-sys-maint, who are you?
A special MySQL user account used by init script to perform certain administrative task.

Where is the login details being stored?
$ sudo ls -ld /etc/mysql/debian.cnf 
-rw------- 1 root root 333 2011-03-19 20:35 /etc/mysql/debian.cnf
And the file is readable by root user only.

Can I remove this account?
You cannot remove this MySQL user from the database otherwise the mysql server will not start.

Can this account be used for other purpose?
Yes and you can use this account login details as a backup user instead of creating another mysql account. Example
$ sudo mysqldump --defaults-file=/etc/mysql/debian.cnf mysql > /tmp/mysql.sql