Subscribe via

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.

Setup Useful Daemons

The only daemon I use is ntcd used for time synchronization. “net-snmp” will be paired with Cacti (a nice network graphic utility with a web interface) so it *could* be useful to you, but for the time being, it doesn’t do much for me. I will most likely revisit net-snmp & Cacti later as my site gets more popular.

Configuring Mail Services

I have to admit that I was not able to figure out how to configure mail services on this server. I’m pretty sure I followed all the steps correctly, so either something is wrong in the steps or I have an invisible firewall somewhere on my network that doesn’t allow me to send mail from my server. In any case, you might be better off looking for a different tutorial online about setting up mail services on FreeBSD. For you experts, please let me know if any of you have had experience setting up a mail service on FreeBSD or know of a reliable tutorial.
*Update* – 10/10/2007
I was able to successfully setup sendmail and wrote a quick guide about it, Setting up Sendmail on FreeBSD 6.2. Enjoy!

Configuring Web Services

Overall the Apache instructions are pretty good. Again I skipped the squirrelmail install since I was not able to get mail services to work.

I also ran into a minor problem because my WordPress’s “Lazyest Gallery” plugin needs PHP GD2 Library to work. There are no instructions on how to do this in the tutorial or on the internet (based on the saying, “There is so much information out on the net that it is very hard to find the information you need.”) . After a couple trial-and-errors, this is what I did to get GD2 Library to work with PHP5:

cd /usr/ports/lang/php5-extensions/; make install clean

A customization screen will pop up with default extensions to install. I unchecked everything and then check the GD Library option. After that, I restarted Apache and it worked like magic. Also, if you ever need to come back and reconfigure php5-extension, all you have to do is the following:

cd /usr/ports/lang/php5-extensions/
make config # this will bring up the customization screen
make install clean

Configure System Graphing, powered by MySQL

I followed the MySQL instructions and it worked like a charm. Again I skipped Cacti setup for reasons I previously mentioned in the first paragraph.

Configure Bind

I skipped this step since I have a really nice router doing DNS resolution for me.

For the record, I have a Linksys WRT54G router with the DD-WRT firmware. There are many after-market router firmwares out there promising the world. I’ve tried a few high rated ones but in the end I chose DD-WRT for a couple important reasons.

  1. It’s so stable that uptimes of greater than 3 months is common. The reason why it’s usually never more than 1 year is because I live in California. Damn that Arnold.
  2. It has so many built-in features that you would otherwise have to setup on an independent Unix machine. Some uncommon things I’ve used it for are traffic tunneling, DNS resolution, dynamic DNS updating (works with Zonedit and other dynamic DNS services), QoS, and Samba mount.

Okay, I’m out of my soap box now.

Conclusion

Setting up Apache, MySQL, PHP was not as hard as I thought. Little did I know that the hardest part will come when I start optimizing the server.

Save and Share
StumbleUpon
Reddit

3 Responses to “Setting up a FreeBSD 6.2 Web Server: Apache, MySQL, etc (Part 2)”

[go to last comment]
  1. Thaya Kareeson

    *Update* I’ve finally finished setting up my sendmail! Believe it or not it was one tough cookie. I will post a tutorial about this and link you to it when it’s done.

  2. Recapping: Setting up a FreeBSD 6.2 Web Server « OMNINOGGIN

    [...] Setting Up Apache, MySQL, and Other Services [...]

  3. Setting up a FreeBSD 6.2 Web Server: Installing OS (Part 1) | OMNINOGGIN

    [...] I have a rad OS, on to setting up services! ids.push(48); if (!sz_post_config_params){var sz_post_config_params = new Array();} [...]

[go to first comment]