S E R V E R   S I D E
View current page
...more recent posts

It does get easier every time. I'm not sure if that's me getting better or the software getting easier. Probably a little of both. Here's a big chunk of my day yesterday getting CentOS 5.3 with qmailtoaster, apache, mysql, and PHP up and running.

Minimal install (just 'base' - nothing else) CentOS 5.3 i386 (only need CD 1 of 6)

But networking didn't work. To fix:

vi /etc/sysconfig/network-scripts/ifcfg-eth0
add:
TYPE=Ethernet
GATEWAY=xx.xx.xx.xx
ifconfig eth0 up
service network restart vi /etc/yum.repos.d/CentOS-Base.repo
and uncomment the

#baseurl=

line from [base] [update] [addons] and [extras] sections

Then do:
yum update

yum install httpd php mysql-server mysql mysql-devel php-mysql gcc gcc-c++ rpm-build 
zlib-devel libtool libtool-ltdl-devel libtool-ltdl automake autoconf gdbm-devel expect 
mrtg pcre-devel bzip2-devel gmp-devel curl-devel libidn-devel
(should be all one line of course.)
chkconfig mysqld on
chkconfig httpd on
(last two lines to get apache and mysql to start automatically on reboot)
shutdown -r now
(because yum update updated the kernel and we need to reboot or qmailtoaster will complain)
mysql -uroot
mysql: use mysql;
mysql: update mysql.user SET Password = 'newrootpassword' where User = 'root';
mysql: delete from user where User = '';
mysql: drop database test;
mysql: exit;
yum remove sendmail
(qmailtoaster doesn't want sendmail - I think I could have not included in the initial install but I didn't.)
rpm -Uvh http://qtp.qmailtoaster.com/trac/downloads/1
yum install qmailtoaster-plus
qtp-newmodel
(say 'y' to all the install toaster options and 'y' to unioned sandbox)

qtp-newmodel is slick, but it doesn't make the vpopmail database, so in mysql do:

mysql: create database vpopmail;
mysql: grant all on vpopmail.* to 'vpopmail'@'localhost' identified by 'passwordhere';
mysql: flush privileges;

Then change the /home/vpopmail/etc/vpopmail.mysql file with whatever you chose for 'passwordhere' above.

The only catch is that the long 'yum install httpd php mysql...' line was originally just those three things, and everything else was added one at a time as I was trying to get qmailtoaster to run (i.e., try to install it; fail; read in the logs what was missing; yum install that one thing; repeat.) So I didn't really install them all at once like that. Still, I don't see why it wouldn't work this way.

And I guess there are probably people out there who would think I'm crazy for running qmail. It's clearly solid and powerful, no one disputes that, but the community seems to have standardized away from it a bit. Some of it had to do with the personality of the original author. But I'm won over by the community. The mailinglist is extremely responsive and helpful. That really means a lot to me. So qmail it is.
- jim 9-19-2009 4:13 pm [link] [1 comment]

Moved my MySQL data directory onto it's own drive last night. Went pretty smoothly with only a couple minutes of down time. For my records, here's what I did. In my case I'm changing it from the stock /var/lib/mysql location to /data/mysql.

Make a copy of MySQL conf file in case anything goes horribly wrong and we need to revert to where we were:

cp /etc/my.cnf /etc/my.cnf.bak
Edit my.cnf and in the [mysqld] section change
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
to
datadir=/data/mysql
socket=/data/mysql/mysql.sock
Then in the [mysql.server] section change
basedir=/var/lib
to
basedir=/data
Save /etc/my.cnf when done. Then do
service mysqld stop
rsync -vrplogDtH /var/lib/mysql/ /data/mysql/
to stop MySQL (so no data gets lost while we are changing locations) and then rsync to copy all the data to the new location. Then here's where I'm not 100% sure, but after one false start where I couldn't connect to MySQL after starting it up at this point I did it all again adding this step after the rsync:
ln -s /data/mysql/mysql.sock /var/lib/mysql/mysql.sock
to create a link in the new data location to the old mysql.sock (which is what a client uses to connect to the database.) Then just:
service mysqld start
Works fine although I'd like to understand better about having to link mysql.sock. I would think this wouldn't be necessary since my.cnf should contain enough info to figure out where the socket is. But maybe other things on the system expect it to be in /var/lib/mysql? I guess that's the case since it seems like you need that link.
- jim 9-18-2009 3:58 pm [link] [add a comment]

Pretty basic stuff, but just so I don't have to look it up again.

Assuming you have a brand new drive (unformatted) to add:

Enter "fdisk [disk name]" (ex., "fdisk /dev/sdb"). You will then be asked to choose a command to enact upon the disk.
Enter "n" to create a new partition. You will then be asked to pick an extended or primary partition.
Enter "p" for a primary partition, unless you are sure you want to set up an extended partition.
Enter "1" to assign the number 1 to your new partition (ex., sdb1) or another number if you want.
Hit enter twice to establish the partition across the default space fdisk has chosen for you.
To set up the partition's system ID, enter "t", select the appropriate partition and enter "83".
Enter "w" to write the new partition to the disk and exit. You have now created a partition on your disk!
Enter "mkfs.ext3 -b 4096 [partition name]" to create an ext3 filesystem on your partition.

(above from here)

Then make a directory where you want to mount it (in this example /data):

mkdir /data
chmod 777 /data

Then edit /etc/fstab so drive will mount automatically on reboot

vi /etc/fstab

Add the following line to the end of /etc/fstab

/dev/sdb1 /data ext3 defaults 0 0

(Of course change /dev/sdb1 to the partition name you made in fdisk above, and change /data to your mount directory)

From the command line do

mount -a

to force a reload of /etc/fstab (so your disk mounts right now without a reboot.)

Also, see here for 3ware RAID management help.



- jim 9-17-2009 4:46 pm [link] [add a comment]

Jqueryui is getting better positioning support in the upcoming 1.8 release:

Position: Utility script for absolutely positioning any widget relative to the window, document, a particular element, or the cursor/mouse
Emphasis mine. Very nice. That will make a lot of things easier.
- jim 9-10-2009 7:15 pm [link] [add a comment]

Jquery powered sortable, searchable multiple select widget. Nicely done.
- jim 9-10-2009 1:30 am [link] [1 comment]

Amazing. 67 TB 4U rackmount server: Backblaze Storage Pod. The site contains complete details on building your own. Total cost, $7867. That is incredibly cheap.

In this post, we’ll share how to make one of these storage pods, and you’re welcome to use this design. Our hope is that by sharing, others can benefit and, ultimately, refine this concept and send improvements back to us. Evolving and lowering costs is critical to our continuing success at Backblaze.

- jim 9-02-2009 2:45 pm [link] [1 comment]

Here's a thought experiment. Imagine there was a mobile computing device that was so popular, and used so much by the many people that owned one, that all network operators really needed those users as customers (networks don't make money laying idle.) Then imagine that this device contained multiple radios so that it could communicate over every common channel. And lastly, imagine the maker of this device created an online marketplace for the buying and selling of data transit on all the various networks in real time.

The user opens the device which quickly scans the local area, consults with the transit marketplace for current rates, and then offers a menu of current connection options along with their prices. Or, with a default selection, the device always chooses the lowest cost connection. Or, with more advanced preferences, always chooses the lowest cost connection that isn't AT&T (or whatever network you hate.) Or, always chooses network X when in physical location Y (home, office, etc...) and only offers a choice when in a new location.

The customer only deals financially with the device maker (and marketplace operator) who has a track record of making financial transactions simple and painless. Network operators, almost universally despised by consumers, disappear into the background as mere utility providers. But after initially being upset at the new order of things the operators soon realize that network usage is up so much, and network utilization is so high, that even though they make less per bit in most circumstances, they are making much more money in total.

Win win win.
- jim 8-29-2009 6:20 pm [link] [add a comment]

Bruce Sterling gave a talk at the launch party for Layar's Reality Browser which is one of the big players in the Augmented Reality scene. I've written excitedly about Augmented Reality recently, and Sterling is drinking a similar Kool-aid, calling it a "techno visionary dream come true" among other superlatives. The basic idea is just to lay data over the top of a live video feed, turning our handheld video cameras (a.k.a., our phones) into third eyes with access to the vast knowledge stored on the internet. In other words, not "virtual reality" where the user is immersed in an entirely artificial computer generated world, but "augmented reality" where computer generated graphics are overlayed on top of a real time view of the world. Something like a Terminator's view of the world. In any case, to me this is a pretty weak talk by Sterling (although the bar is about as high as it can go regarding his talks,) so maybe not worth watching. But it is interesting that this is what he's excited about at the moment.
- jim 8-28-2009 3:23 pm [link] [add a comment]

Blackberry maker RIM just bought Torch Mobile, developers of the WebKit-based Iris Browser. WebKit is the open source heart of Apple's Safari browser that is quickly becoming the defacto browser (or rendering engine at least) in the mobile world. Google's Android OS uses it, obviously the iPhone uses it, the Palm Pre uses it, Nokia S60 uses it, and now it looks like the Blackberry will be using it too. Not a happy time to be backing Windows Mobile browsing! And more than just another (huge) win for WebKit, this will be huge for the Blackberry as it's lackluster browsing experience is it's current weak spot.

If I was Adobe I'd have a hit team focused exclusively on WebKit. There is a tiny historical moment upon us right now where Flash could be killed as we move into the mobile space. Apple looks like they want to do it, and just about every major mobile player is on board.
- jim 8-28-2009 3:07 pm [link] [add a comment]

In my fantasy stock trader life I've been betting against Nokia because I see them as too unfocused, with no experience bringing a full hardware / software stack to market in anything but the entry level phone space. Or, put another way, I think Symbian (the open source OS backed, primarily, by Nokia and Sony that Nokia uses in it's smartphones) is doomed and I'm betting that Nokia can't get anything else together.

But of course now they've just released a new flagship "phone" they are calling the N900 Mobile Computer. And it's not running Symbian, it's running a full Linux distribution (based on Debian + Gnome) called maemo. Hardware specs look great: Arm Cortex A8 CPU like the new iPhone, lots of RAM, 3D graphics horsepower, full hardware qwerty keyboard, and a 5mp camera with a zeiss lens.

Obviously the very stock linux OS is appealing to the geeks. This is what I thought the iPhone was going to be when it was first announced - something exactly like my computer, but in my phone. Instead the iPhone turned out to be a much more closed, more closely controled by Apple, computing device. This has turned out great for Apple who are selling a gazillion of them, but a little disappointing to geeks like me who would like to run a full LAMP stack on their phone. Just 'cuz.

So I like the N900. Very intriguing. But the devil is in the details, and we'll see how it works out. My guess is that just like there are much better PMPs out there than the iPod, the N900 may well be a technically better smartphone than the iPhone. But you can't consider these things in isolation. The iPod won because of the complete iPod, iTunes, iTunes Music Store package. It was just completely easy to use, buy, and manage music with it, Similarly, the iPhone, iTunes (for syncing), and the App Store are a killer combination that Nokia (or Microsoft, or Google, etc...) is going to have a tough time competing with. (Om Malik says the App store does 2.4 Billion in sales a year, with 1.5 Billion applications having been downloaded.)

The N900 looks like a good move by Nokia. Enough to make me wonder about my (fantasy) short position. But I'm sticking to my guns. They have layed a nice foundation here, but I still think they can screw it up. Competition is good for everyone though, so the better they do the better phones we'll all be using. Congratulations on at least building a seemingly very open system. Now will they come?
- jim 8-28-2009 2:56 pm [link] [1 comment]

older posts...