Home » Archive

Articles in the Linux Category

Fedora, Linux, nginx, PHP, wordpress »

[1 Apr 2011 | No Comment | 2,509 views]

Interested in installing nginx on a Fedora system? The configuration with nginx is more complicated than Apache since it requires the setup of the nginx server and a separate daemon for running PHP. I prefer creating the daemon from scratch rather than going with the fpm route in Fedora 14 since there isn’t official support for it. I’d certainly install the fpm package once its available in Fedora.

Why switch to nginx?

If you have a site with heavy CPU and memory load in Apache, then nginx is a great choice. I recently made the switch to nginx and have noticed a reduction in CPU and memory usage. Nginx loads static content very fast and efficiently.

Here’s a graph of my nginx server load test. Courtesy of LoadImpact‘s free load testing service.

The user load time on my server is minimally impacted with 50 clients viewing the site simultaneously.

Linux, PHP »

[2 Mar 2011 | One Comment | 2,173 views]

By default, SELinux will block the ability for Apache/webapps to write to files in Fedora. This is a security feature to limit what folders Apache can write to. You can notice this issue if you get errors in your Apache logs such as:

PHP Warning:  move_uploaded_file(): Unable to move ‘/tmp/…’ to ‘…….’

Command to set permissions:

chcon -R -t httpd_sys_rw_content_t [Name of Folder]

You can check the SELinux permissions via the following command:
ls -halZ

debian, Linux, Tomcat »

[15 Nov 2010 | One Comment | 1,624 views]

Is your Debian install of Tomcat 5.5 not working with your Webapp?

Just a heads up for anyone with problems trying to get webapps working with Debian. I highly recommend installing Tomcat 6.0 from source. It helped clear a number of issues for me. Debian only supports Tomcat 5.5 in their package management system. I could have gone with unstable to get Tomcat 6.0, but I prefer not to deal with their folder organization layout (see below)

Here are a few resources I’ve used to install Tomcat 6.0 in Debian Lenny.

  1. How to Install Tomcat 6 in Debian Lenny. This is an excellent step-by-step tutorial. A+ in my book.

  2. http://www.mysql.com/downloads/connector/j/ Connector/J, MySQL JDBC Connector download.

  3. http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html. Tomcat 6.0 configuration with MySQL Connector/J JDBC.

debian, Linux »

[9 Nov 2010 | No Comment | 1,405 views]

Upon updating Webmin, I noticed that there is a new package dependency that breaks the updates.

To fix, you will need to get the phpini package from Webmin http://www.webmin.com/standard.html and extract the folder to your Webmin system folder. In Debian, its located in /usr/share/webmin/   This should also apply to any other Webmin packages that are missing from your system.

debian, Linux »

[5 Oct 2010 | No Comment | 1,228 views]

Scponly is used for chroot to limit server access for SSH and SFTP users. Unfortunately, the Debian package for scponly does not work with Debian 5.0.

If you upgraded from Debian 4 to Debian 5 and are using scponly, you may notice that the clients are unable to connect. Possible error messages include:

  • “failed WinSCP compatibility mode” error message
  • WinSCP closes unexpectedly after authenticating
  • Connection failure after successful authentication
  • Client logs two attempts to connect to the /home/username home directory before failing