Subscribe via

Setting up Sendmail on FreeBSD 6.2

Thaya Kareeson

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…

Keeping BSD Ports Up-to-date Effortlessly

Thaya Kareeson

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

Thaya Kareeson

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: Proxy Caching (Part 7)

Thaya Kareeson

Okay I lied, eAccelerator gives a pretty darn high ROI, but setting up a proxy cache gives a comparable or higher ROI. I chose to use Varnish as my proxy cache.

Once installed, Varnish will keep a cache of all objects requested by internet users (e.g. post-generated PHP pages, CSS, javascripts, images) with the goal of off-loading some work from your web server (remember: we won’t want big Apache to do the work only if it has to). Also Varnish takes full advantage of the OS’s virtual memory and advanced I/O features on FreeBSD 6.x making it the optimal choice for my setup.

There were many confusing instructions on the web about how to configure Varnish. Here are the steps I took to setting up Varnish for a signal machine running both Varnish and the web server: Read on…

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

Thaya Kareeson
Comments Off

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: Optimizing MySQL (Part 5)

Thaya Kareeson

Similar to Apache, you do not want MySQL to start hogging all the memory in your system. To configure your MySQL settings, open your /etc/my.cnf file for editing. Under the [mysqld] section of the file modify the following variables: Read on…

Setting up a FreeBSD 6.2 Web Server: Optimizing Apache (Part 4)

Thaya Kareeson

After my WAMP days were over I declare that I shall no longer fall victim to an inefficient/unoptimized lifestyle. So here is my home brew optimization tutorial (yes, I really did it myself this time!). Read on…

Setting up a FreeBSD 6.2 Web Server: Migrating WordPress from WinXP to FreeBSD (Part 3)

Thaya Kareeson

Background

I previously made a an awfully painful choice to host this site on my WindowsXP machine using WAMP (FYI, WAMP = Windows, Apache, MySQL, PHP packaged into one install). WAMP and I had a 10-month-long love-hate relationship: Read on…

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

Thaya Kareeson

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)

Thaya Kareeson

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…