Archive for the ‘System Administration’ Category

Flash Player 10 [Square] on Debian Squeeze x86_64

Read about the new pre-release here. Download the tar ball, extract, copy the library to your plugin directory and get rid of gnash.


~$ tar xzfv flashplayer10_2_p3_64bit_linux_111710.tar.gz
~$ cp -av libflashplayer.so /usr/lib/mozilla/plugins/
~$ sudo apt-get remove browser-plugin-gnash gnash-common gnash

Restart your browsers and check your about:plugins page, you should see this:

A good day

image

@ the office

sqlalchemy, MySQLdb, debian

(in virtualevn)

$ sudo apt-get install libmysqlclient-dev python-dev
$ easy_install SQLAlchemy mysql-python

Not sure why the package is labeled mysql-python. Also, you need the development headers because the MySQLdb module is written in c.

Topsy-Turvy

My friend recently got a job with this place.
I noticed this in my access log a few seconds after posting a link on twitter. That is faster than Jimmy Johns!

74.112.128.62 – - [06/Oct/2010:03:40:49 +0000] “GET /2010/10/disgusting/ HTTP/1.0″ 200 17847 “-” “Mozilla/5.0 (compatible; Butterfly/1.0; +http://labs.topsy.com/butterfly/) Gecko/2009032608 Firefox/3.0.8″

Captain Rekick

Well, I nuked / (root) on my work computer today and it finally occurred to me how this happened.

I was working on a gentoo deployment image for a customer. I didn’t want to manually build a kernel for all hardware options, so I was using genkernel.

I needed to rebuild the kernel to include nic drivers for net booting.  As it turns out, when running genkernel, the program attempts to mount /boot (based on the fstab) before copying the initramfs image and kernel to /boot (brilliant?). Under normal circumstances, this is perfectly ok, however, I was working in a chroot, with the host /dev bind mounted under the chroot /dev. The chroot fstab specified /dev/sda1 as boot while on the host device… drum roll .. this actually corresponded to (what was) my root partition.

After I was done with my work, I ran my deployment script; which tars up the important parts of the file system and deletes the source; which this time, included my root partition.

So, what have I learned…

Never mount /dev in a chroot unless you actually need access to the hardware. ESPECIALLY, when using Tardix.

From The Gentoo Genkernel Guide

–no-install: Activates [or deactivates] the make install command, which installs your new kernel image, configuration file, initrd image and system map onto your mounted boot partition. Any compiled modules will be installed as well…

(note, it doesn’t mention that it will try to mount /boot if it is not mounted….)

Does anyone know if make install attempts to do this? I think not! I hope not. If we forget to mount /boot (and we wanted to mount boot) when running make install, and we are too dumb to figure out why it doesn’t work.. please don’t try to fix it for us.. please.. we need to learn.. or maybe .. just maybe.. we knew what we were fucking doing in the first place!!!!!!

FUCK!

PHP Perl Class

Hello,

I have a bit of problem combining PHP and Perl language.

I am trying to pass Perl variables into PHP and keep getting this error

“PHP Fatal error: Class ‘Perl’ not found in /var/www/html/hidden.php on line 3

find attached copy of my script.

Regards,
Customer

Naturally, I thought the customer was crazy. Then I looked at the script:

$perl = new Perl();
$perl->require(“userexit.pl”);

I lol’ed and then search, it seems the Perl class is provided by the Zend people in the form of a php extension, which is, fortunately, in pecl.

Unfortunately, this package seems to be broken :)

( ~ ) pecl install perl
Package “perl” Version “1.0.0″ does not have REST xml available
install failed

I did some searching and found an ‘open’ bug report:
16807

Rather than did too deep, I decided to just install the module manually for the customer.

# wget http://pecl.php.net/get/perl-1.0.0.tgz
# tar xzfv perl-1.0.0.tgz
# cd perl-1.0.0
# phpize
# ./configure
# make
# make install

Now edit your php.ini to include:

extension=perl.so

Or on Red Hat/Fedora, simply:

echo “extension=perl.so” > /etc/php.d/perl.ini

Don’t forget to restart apache.

viola:

# php -v ; php -m | grep perl
PHP 5.1.6 (cli) (built: Feb 26 2009 07:01:12)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
perl

As always, be careful when installing unmanaged modules. Future updates to php may introduce instability when depending modules are not rebuilt with the new symbol table.

Happy Hacking.

Vyatta – Community Software Download

Open Source networking. They provide Xen and VMware Images. I am going to play around with this a bit and blog about my experience. Why? Because it looks like I am working.

Vyatta – Community Software Download.

Transfer domain to new client in plesk

Like many things that should be easy in plesk, this requires manually updating the plesk database.

Before making changes to the psa database, it is always a good idea to make a backup:

mysqldump –opt -Q psa > psa.sql

First, we need some database normalization information:

mysql> use psa

mysql> SELECT id,pname from clients order by id;
+—-+——————+
| id | pname |
+—-+——————+
| 1 | My Domains |
| 2 | Desmond Willy |
| 4 | Beacon |
| 5 | Ham |
| 6 | Lefty |
| 7 | Simon Cowle |
| 8 | Scottyl |
| 9 | SomeRandom Guy |
+—-+——————+
8 rows in set (0.00 sec)

mysql> select id,displayname,cl_id from domains where displayname=’transferme.com’
-> ;
+—–+—————–+——-+
| id | displayname | cl_id |
+—–+—————–+——-+
| 101 | transferme.com | 1 |
+—–+—————–+——-+
1 row in set (0.00 sec)

So we can see that transferme.com is part of the My Domains client, but we want it to be part of the ‘SomeRandom Guy’ client. To do this we simply need to update the cl_id for the domain:

mysql> UPDATE domains SET cl_id=9 WHERE id=101;

mysql> select id,displayname,cl_id from domains where displayname=’transferme.com’;
+—–+—————–+——-+
| id | displayname | cl_id |
+—–+—————–+——-+
| 101 | transferme.com | 9 |
+—–+—————–+——-+
1 row in set (0.00 sec)

Now that is done. One last thing that is important not to forget, you must ensure that the client you are transfering the domain to has the ip that transferme.com is hosted on in its ip pool. If not, plesk will choke on itself.

Register.com, migration pains

Well. It has been a long day. I awoke this morning dealing with a major network outage. Once that passed, I settled into my normal routine of fixing Linux problems. While dumping some 80G of databases, I figured I would get a head start on my migration. I am moving blacknode.net to slicehost, so my first order of work was cleaning up and migrating my zones to slicehost’s nameservers. No big deal there.

Now here is where the trouble starts. For some reason I cannot recall, I used register.com as blacknode’s registrar 3 years ago when I sniped the domain from some German quake 2 gaming clan. After a few minutes of remembering my login credentials, I was there, looking at there root nameserver editing tool. I double checked my work and entered the new nameservers. I clicked submit.

I have walked customers through this process THOUSANDS of times. webmasters and ecommerce noobs have a stigma attached to all things DNS. The words TTL and root NS records seem to go hand in hand with 24-48 hours of downtime. The average domain owner also seems dread making changes at the registrar level; especially when register.com is involved. After todays experience, I think I finally understand why.

For some reason my dns changes would not stick. The interface simply said that the change failed and that I should try again. I did so, and still no go. The register.com website gloats about its amazing call center support. I think this is how they justify being the most expensive registrar on the planet.

So after the receptionist, who politely told me my estimated hold time (5 minutes), I was connected to a techie type who seemed to know what this crazy DNS thing was, or at least new what words to throw around. She went through the dns change process that I had just went through and verified that my dns servers we up and answering queries but ran into the same problems I did. She got me into a ticket and escalated the problem to a tech with access to the backend.

This was around 3:30pm.

I checked the status of my ticket by querying the whois database for register.com. After about an hour, I noticed something very wrong:

DNS Servers:

dns234.c.register.com
dns249.d.register.com
dns073.b.register.com
dns134.a.register.com

It seems that the annonymous technician was able to reset my domains root nameserver record to the default for register.com. I hoped this was a temporary thing, so I waited for about 5 minutes before getting worried. I attempted to alter the record to point to the slicehost nameservers again, but no dice. I tried to put it back to what I had initially, fail.

You see, I migrated my zone from Rackspace nameservers. The zone happily resolves on both slicehost dns and rackspace dns. So not being able to change it was not a problem, as long as the the records stayed what it had been for the last 3 years. It was about 4:30.

So I called up again. Same procedure, I had a ticket number, but the techie still had to jump through the hoops. I was ensured that my issue was being addressed by the highest escalation point available and that they would get to the bottom of the issue. They seemed to believe that the problem existed upstream somewhere, unfortunaitly, those guys live on the east coast, and are 9-5.

While on hold, I began adding the important records to the register.com dns servers. It seems that the original ip I had hosted blacknode.net on was still present on register’s nameservers with a TTL of about 14400 seconds. The ip was a dynamic address used on a residential broadband network. So i ended up caching this on my local dns…

So I was effectively down. Not that this cheesy blog gets allot of traffic. Or like I make money off this site. But if I did, I am sure I would be pissed.

The techie got back on the phone after about 15 minutes and said that they could not resolve the issue without the real technicians who only worked daywalker hours.

I think I will be transferring my domain elsewhere. Godaddy seems to be it.

~

Rackspace Cloud API

In an article here, Rackspace is announcing the availability of their beta web services api that can be used to jack into their cloud. Much like EC2, this should lead the way for projects like scaler, that dynamically grow a configuration as thresholds are reached.

Check out http://www.rackspacecloud.com/ for more info. I am going to sign up, I will let you know how it goes.

Return top