Dan Robertson's picture

I have worked on my first tkl patch -- an nginx webserver.  It is not quite ready for release, there are a couple things I need some help with.  (Please move this to the support forum if it is more appropriate.)

Current status:

  • Nginx server pulling latest stable version from nginx ppa.
  • PHP 5.3.2 from lucid repos
  • php-fpm from Brian Mercer's ppa
  • APC and Memcached (I haven't tested these yet)
  • MySQL, and webmin-mysql package
  • PHPMyAdmin on port 12322 over https
  • I took the default home page from the LAMP server and modified it.

Problems:

  • There is an issue with the phpmyadmin.conf.  During the build, it says it can't import the data.  After you boot to a new instance from the patched iso, you can't log into phpmyadmin using your root password until you manually update the password for the mysql admin account.  I also noticed you are not prompted for MySQL passwords during the install.
  • I would like to display the phpmyadmin address on the confconsole. Fixed.
  • I am currently using a ppa for php-fpm.  I would really like to use php5.3.3 instead.  I see nginx has a ppa for it (it's commented out in the conf script).  Whenever I tried using it, apache2 kept coming up as a dependency (I think from the php5 package).  I don't want apache running in this.
  • I am not aware of a webmin module for nginx.  If there is one, please let me know and I can include it.
  • I have not yet created a phpinfo() page. Fixed.

I started from Basil's LAMP patch and modified it by removing the apache stuff and then put in the nginx stuff, so I thought the mysql/phpmyadmin configs wouldn't have any issues.  Also, since I don't really have any experience with nginx configuration, any comments would be appreciated!

Currently the patch is located at http://github.com/slacker/tklpatch-nginx.  Feel free to fork it and help out.  I will upload a tarball here once the major bugs are worked out.

Forum: 
Jeremy Davis's picture

I have only just released my first TKLPatch too (incomplete), although yours looks a little more involved than mine! I like the idea of putting the patch on github, someone else has done that too I think. I will look into that because github seems like a great way to allow others to be easily involved.

BTW I think that for TKLPatches, even in an incomplete state, here in the general forum is the right place (until we get a dedicated TKLPatch forum anyway!) although Alon & Liraz may correct me.

Dan Robertson's picture

Wow, I honestly didn't see that before.  I will definitely take a look at it.

Dan Robertson's picture

I see that we are doing some things a little differently.  The question is what would be best for a TKL appliance?  My goal with this is to have a patch that builds an appliance to my specifications for my personal use.  So I will keep on refining this until it is as good as I can get it.  I am definitely open to discussing ideas on how to make it better.  Thanks!

Jeremy Davis's picture

Whilst in some respects it may be a waste of effort to replicate something that someone else has already done. OTOH there are often many different approaches to acheive the same (or similar) ends.

Having multiple patches for same or similar appliances allows Liraz and Alon to look at the different approaches and decide which they think is best. Perhaps they may choose to pick bits from each, or maybe do it a completely different way altogether. Regardless the work that is put in is never really wasted because at the very least it raises awareness about different software (as many of your patches have Basil) and may highlight differing usage scenarios and configurations. Also as there is usually a degee of research involved in TKLPatching it will almost always save the devs some leg work regardless of which direction they take with a patch.

I guess though that in this situation, even if Dan had decided to take a different path it may well have been useful for him to have tweaked Basil's patch to his desire or to at least recycle some of his work.

Anyway... Good work all round I say!

Liraz Siri's picture

Congratulation Dan on your first TKLPatch! Don't worry about the overlap with Basil's earlier patch. There has been a lot of development activity recently and it's easy to miss stuff. A few days ago JedMeister suggested we should summarize all development activity on the development wiki, but we haven't gotten around to that yet. So much to do, so little time...

Anyhow, I took a look at your patch and compared it with Basil's:

Nginx installation: You installed nginx from a PPA (0.7.67-4) while Basil installed it from Lucid universe (0.7.65). When a package is already available in the standard distribution there has to be a compelling reason to go for an unofficial PPA due. In general, using a PPA has security and stability implications.

FastCGI integration: Basil used php5-cgi with some glue code to support FastCGI. You used php5-fpm from a PPA. Same concerns as above. On a personal note, I've been using php5-cgi to provide FastCGI services on one of my servers and it works very well.

memcached integration: Dan, could you elaborate a bit regarding the rational for including memcached in your LEMP stack? We haven't included that in the TurnKey LAMP stack because we figured anyone sophisticated enough to need/use memcached in their applications could easily install it themselves, and for everyone else it would just be another unnecessary process. Perhaps you have a different take on this?

Opcode optimizers - APC vs xcache: Basil included xcache for opcode optimization. Dan went with APC. I know a couple of years back when I last checked APC had stability issues with many programs. I've been using xcache myself and have been happy with it, but I'm hearing that APC is the "officially blessed" solution that will eventually get built into PHP 6. I'd love to hear more thoughts from the community on the pros and cons of each. Not only for the LEMP stack but also for the new LAMP stack and all dependent appliances.

Jeremy Davis's picture

The TKL Nginx applince is here: http://www.turnkeylinux.org/nginx-php-fastcgi

If so what wasn't near enough on that to base your build? What would you recommend the TKL devs do to change their appliance and why?

Jeremy Davis's picture

It is LAMP based so not as optimized as wcat's suggestions, but it works well. The current version is a little dated but you can build the ISO yourself (using TKLDev - the code has been updated but the new version hasn't been released yet). Or the new version should be released within the next month or 2...

Add new comment