Subscribe via

Setting up Sendmail on FreeBSD 6.2

Previously, I mentioned that I was not able to successfully send emails via sendmail. This functionality is quite useful because WordPress, among other things, uses sendmail to send emails to you when someone leaves a comment on your post. So it turns out that because most public mail servers (i.e. gmail, hotmail, etc) do not trust my “omninoggin.com” mail server domain, all messages I sent were refused. After hours of research, I found out that I can route my mail traffic through my internet service provider’s mail proxy (SBC Yahoo!) to get this to work. Read on…

WP-Cache, the Untold Way to Set It Up

WP-Cache is a WordPress plugin that improves your WordPress speed by caching a static version of each dynamic page request and deliverying that static version for subsequent requests to that page. This in combination with WordPress internal cache, Apache cache, eAccelerator op code cache, and Varnish proxy cache provides the ultimate setup to combat traffic storms if your article gets dugg. *Note* that there is also a method that helps you turn on WP-Cache on demand (only during traffic storms), but I will discuss that in a later article.

If you’ve ever tried to install the WP-Cache plugin for WordPress just by uploading to the wp-content/plugins directory and activating it via WordPress Plugins administration, then you know that 99% of the time that method will not work because of some file permission problems.

Here is the proper way to do it: Read on…

Keeping BSD Ports Up-to-date Effortlessly

If you don’t have ‘cvsup’ installed, do so by following the tutorial on Open Addict (section: Rebuild the World, and Recompile the Kernel):

Since all you have to do to update your ports is run the command:

cvsup -g -L 2 /root/ports-supfile

Just stick that command in your crontab and make it run every midnight.

crontab -e # This opens the crontab in the vi editor.

Add this line to the crontab:

0 0 * * * /usr/local/bin/cvsup -g -L 2 /root/ports-supfile

Shift+zz to save and you are done.

This it one of the reasons why I love Unix. With little thought, everything is script-able and customizable.

Recapping: Setting up a FreeBSD 6.2 Web Server

I hope I can get some part-time consulting jobs to do this optimization for small businesses. All in all, it doesn’t seem too hard to do and I enjoyed doing it. If you run into a problem just google it for the answer. Anyway, here is the recap of the steps I took to set up my FreeBSD 6.2 Web Server.

  1. Installing OS
  2. Setting Up Apache, MySQL, and Other Services
  3. Migrating WordPress from WinXP to FreeBSD
  4. Optimizing Apache
  5. Optimizing MySQL
  6. Optimizing PHP
  7. Proxy Caching
  8. Optimizing WordPress with WP-Cache
  9. Keeping Your FreeBSD Ports Up-to-Date Effortlessly
  10. Setting Up Sendmail on FreeBSD 6.2

Setting up a FreeBSD 6.2 Web Server: Optimizing PHP (Part 6)

Comments Off on Setting up a FreeBSD 6.2 Web Server: Optimizing PHP (Part 6)

This was by far the easiest step in my optimization process. To optimize PHP, I used the software called eAccelerator. Compared to all of the other steps, this one had the best ROI for me.

When a PHP script is executed, the PHP interpreter will spend some time interpreting the script then compile the interpretations into opcodes for execution. eAccelerator will precompile your PHP code into ready executable opcodes and manage that opcode cache for you. If your PHP script does not change, Apache will directly call the precompiled opcodes (saving interpretation and compilation time).

This is what I did to set it up: Read on…

Setting up a FreeBSD 6.2 Web Server: Apache, MySQL, etc (Part 2)

I admit that I cheated, but since I’m newbie in FreeBSD, I am allowed to follow another very nice tutorial on deploying a server found on Open Addict. My job is not to recite the tutorial to you. Instead I will comment on the tutorial’s instructions and point out any roadblocks I ran into during my installation process. Read on…

Setting up a FreeBSD 6.2 Web Server: Installing OS (Part 1)

This post will cover installing FreeBSD 6.2. FreeBSD was recommended to me by my friend Ben Connelly because it is known to be the most stable and secure Unix OS out there. After I installed it, I became even more pleased at my decision because of the package manager and BSD ports. If installing using the package manager doesn’t work, you can most likely make port-install work on the same software. Also since it is so stable, you are 99% sure that anything you install WILL work. Read on…