October 2010 Archives
The current Amazon Linux AMI Beta doesn't include nginx, which is a shame because it's a great frontend. Here's what I did to solve the problem. All these commands are on the EC2 instance, running as a normal user. And just to be clear what I'm providing here, it's nothing more than "how to build a specific source RPM."
- sudo yum install gcc rpm-build perl-ExtUtils-Embed
- mkdir $HOME/rpm $HOME/rpm/SOURCES $HOME/rpm/SPECS $HOME/rpm/BUILD $HOME/rpm/SRPMS $HOME/rpm/RPMS $HOME/rpm/RPMS/i386
- echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
- wget http://download.fedora.redhat.com/pub/epel/5/SRPMS/nginx-0.6.39-5.el5.src.rpm
- rpm -Uvh nginx-0.6.39-5.el5.src.rpm
- cd ~/rpm/SPECS/
- rpmbuild -bb nginx.spec
- cd ~/rpm/RPMS
- sudo rpm --nosignature --Uvh i386/nginx-0.6.39-5.amzn1.i386.rpm
Now you should have the latest EPEL version of nginx, which you can chkconfig and /sbin/service start to your heart's content. I might try using this specfile to build the latest nginx (0.8.52). Will update post if I do.
Update: I did it. Here's what I did:
- Went to rpmfind.net and found a reasonably current Fedora SRPM. Downloaded and installed it.
- Edited the specfile to change the 7.67 reference to 8.52.
- Noted that the specfile downloads the nginx source directly from sysoev.ru, which at first looked a little scary but is actually the same site as the one referenced on the Nginx wiki.
- Duplicated, twice, the two lines toward the bottom of the specfile that install fastcgi and fastcgi_default config files. Changed one of the copies to install scgi, and the other to install uwsgi. These seem to be newer config files introduced in 0.8, so we need to package them into the RPM, too.
- Built the RPM following the same method described above.
This seems to be working just fine. Note that because your RPM is unsigned, you'll need to install with the --nosignature option.
I recently tweeted about my displeasure with the long time it takes between the rental decision and actually getting to watch anything on the new Apple TV. My comparison was Netflix streaming (which is absolutely amazing and unbelievable that it's only $9/month).
But I thought a little more about it and realized that Apple is making a big deal about HD quality. If that's the promise, then they have to stick to it; they can't ratchet down to lower video quality or pause for 30 seconds to let the buffer catch up, because that would ruin the promised viewing experience. It's the usual tradeoff as in most projects. Cheap, fast, good: pick two. Apple chose cheap and good. Netflix chose cheap and fast.
So I retract my disappointment about the poor streaming experience, but I replace it with a different disappointment: that Apple TV probably can't replace both cable and Netflix. Apple TV requires planning ahead in exchange for a guaranteed viewing experience. Netflix and cable are good for watching something, anything, when I'm bored. Apple TV could replace my DVD player and my TiVo for the few programs I record (Hell's Kitchen, Master Chef, The Simpsons, Family Guy). But as long as Apple picks good over fast, it can't yet replace cable.
