The Ultimate Media Server - Apache+SSL , PHP, MySQL and Jinzora
The Ultimate Media Server
Apache+SSL , PHP, MySQL and Jinzora
Author: Elijah Savage
Date Last Edited 01/29/06 Rev.1
I started out on this project to create the ultimate multimedia server using all opensource tools and applications. Some of you may be thinking along the lines of a TIVO device, no this was to create a hosting server on my business broadband connection so that I can have access to and listen to my MP3's from anywhere that had an Internet connection while keeping it all secure as possible.
This guide will lead you through creating a secure ssl based webserver to be able to stream your multimedia across the World Wide Web. Before embarking on this journey I would highly recommend reading this documentation in it's fullest before executing any of it. You may find some pointers in the tips and tweaks section that you can make during installation that would make this install even easier and make it a one time install.
You will also notice Blue Font type and Underlined type used throughout this documentation. These are actual www links provided to make finding things a bit easier for you.
1) Base install of FreeBSD and Ports, preferably FreeBSD 6 as it is the latest stable production release.
2) A public domain name for WWW access.
3) Some sort of Internet connectivity either broadband or some sort of business connectivity like a t1. I would like to point out and recommend that your upstream bandwidth be at least 384kbps.
4) Your favorite text editor. I prefer VI but there are others like Emacs and Pico.
5) A Very large hard drive or at least large enough to hold all of your media for your server.
Now lets get to the fun piece of this document. As I stated this guide is based on FreeBSD 6 which you should have installed, there is so much documentation on the installation of FreeBSD that I will not guide you through that piece, not to mention it is one of the easiest UNIX's to install. But if you do find that you need a bit of help you can always visit The FreeBSD Handbook . After base install I did make sure I had the latest version of these applications in ports by using CVS to get the latest and greatest ports collection. This process of Updating Ports is also a very easy task and well documented by the FreeBSD organization
The first thing we will embark on is installing Apache1.3 and SSL. Apache currently has 3 development paths Apache1.3 and Apache2.0 and the recently released Apache2.2, at the time of this writing I still preferred to run Apache1.3 call me old school, this version has been around for a very long time and is the most used web server on the Internet today and the Apache staff is still developing security patches for it. You can visit Apache's Website to see what the differences are in versions.
Install Apache1.3 and SSL from ports
Login to your server via the console or ssh and make sure you have root privileges. All text with black background are actually commands executed on the server.
# cd /usr/ports/www/apache13-modssl
The above will install apache13-modssl in / usr /local/etc/apache/
# echo ' apache_enable ="YES"' >> /etc/ rc.conf
The above commands makes sure that apache will startup on bootup . See I told you it was not that hard all it takes is a little time and patience and desire to follow through. Now moving on to installing Mysql Sever
Install MySQL Server with SSL Support
# cd /usr/ports/databases/mysql41-server
Go crab a coke or your favorite beverage as this may take a while but when you are done you will have just installed MySQL Server with SSL support successfully.
Next we will make sure that MySQL Server starts up on bootup
# echo ' mysql_enable ="YES"' >> /etc/ rc.conf
Next we go about creating the root password for MySQL which should NOT be the same password as the system root user. You can do this with one command from the command line which is what I use below. There is also another way of doing this which can be found in the MySQL documentation, I am taking the easy way out since I am in the comfort of my own home with no one looking over my shoulder.
# mysqladmin -u root password newpassword
We will now create the default database
# mysql_install_db â€“user= mysql
Thats it for MySQL , this rocks does it not?