Articles in the Linux Category
Fedora, Linux, nginx, PHP, wordpress »
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 »
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 »
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.
- How to Install Tomcat 6 in Debian Lenny. This is an excellent step-by-step tutorial. A+ in my book.
- http://www.mysql.com/downloads/connector/j/ Connector/J, MySQL JDBC Connector download.
- http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html. Tomcat 6.0 configuration with MySQL Connector/J JDBC.
debian, Linux »
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 »
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
debian, Linux, MySQL »
The quickest way to disable autostart of services in Debian is to utilize a convenient curses interface to selectively choose which services to autostart in different run levels. Its so much easier to use than update-rc.d. Its good for instances where you are migrating services out of an existing box, such as removing the mysql server without uninstalling.
The package is called:
sysv-rc-conf
(Install it using aptitude or apt-get install)
Linux »
If you install the amanda-client package on Debian, some things need to be configured before you can actually use the service. By default, the server will not be able to connect to the client. The common error is: “selfcheck request failed: timeout waiting for ACK”. Read the post for the solution.
Linux »
Here’s the fix for the common error with ScpOnly when using the Jail SFTP option. The error message for WinSCP clients is “WinSCP: this is end-of-file:0 failed with invalid output” when trying to connect to a SFTP server. View the post to see the fix for WinSCP.
Apache, Linux »
I recently installed Mailman with Exim4, which was a challenge considering all the manual configuration you have to do. I found a few guides on the install, but they didn’t seem to be “complete” enough to get the system working. Turns out, the biggest challenge was Exim4. The configuration files are confusing, especially since there are two sets of configuration files.
Apache, Linux »
One thing I’ve encountered with Awstats is adding in old apache log files. This is useful if you are migrating data from servers. By default, Awstats will ignore ALL past dates in the log that occur before the most recent log entry date. In order to avoid Awstats from finding the “recent log entry date”, you will need move all Awstats cached files into a separate folder.
