Tagged: CMS, digital ocean, digitalocean, FreeBSD, web development, webmin
- This topic has 1 reply, 1 voice, and was last updated 6 years, 6 months ago by Mulch.
November 9, 2016 at 10:39 pm #626MulchKeymaster
This Journal is about my experience installing a FreeBSD web server may run long, or it may end fairly quickly. It depends.
My Experiences with a FreeBSD Web Server
I have been intrigued with FreeBSD since I heard of it many years ago. (after some experience with Linux) I actually preferred it over Linux.
The choice to go with Linux as a host to my servers had more to do with compatibility for a rich multitasking environment. In fact, I preferred the FreeBSD web server environment. I would have happily used it for my “production” web server (this server) if not for some pretty castrating compatibility issues.
Needless to say, FreeBSD has always held a place in my heart.
The newer versions seemingly were always incompatible with my older, decommissioned hardware that I usually experiment on. So I have not had anything but virtual machines to work with FreeBSD in a more “professional” or “production” environment in MANY years. Certainly not a FreeBSD web server.
Well, that has changed. A couple months ago, I had an idea for a business in my field, as well as a damn good name for it.
So I bought the domain and have been working with other sites (like this one!) to get comfortable with the use of CMS’s. I am now quite certain I can deliver production environments to anyone, and can do so within the current specifications of speed, marketability, usability, interactivity, & compatibility very quickly. I think.
So, no reason not to test this theory on myself and my new domain name, right?
Creating a Digital Ocean FreeBSD Web Server
I was given a $10 credit for Digital Ocean from a referral and started a “Droplet.” (My link is a referral link which will give you $10 credit as well, and if you end up using them, I get $25 credit, which I would really appreciate, because I like them. Fair disclosure). I decided to use my droplet for a FreeBSD web server.
A “droplet” is essentially a Digital Ocean hosted virtual machine with your open OS of choice. (with limitations, they provide the image).
They are on SSD. You can choose not only your OS, but cpu cores, ram size, storage, bandwidth, data center location, among many other things. It is very fast to deploy, easy to either backup or “snapshot”, and very easy to configure (even with RSA keys). They even provide ridiculous amounts of tutorials about integrating different services and such with your droplet.
Here is a tutorial about FreeBSD itself!
I loaded my droplet with FreeBSD web server version 11.0 with zfs file system and away I went.
Compiling Takes Time
First I used subversion to add the ports collection. Then I went with portmaster to update everything. After, I decided to try a favorite utility for managing servers, Webmin . (a gui that makes some administrative and configuration very quick and painless). However, it didn’t add the apache, mysql, and php stack I was expecting it to do. The modules were unavailable.
No bother at all, I just started to add them 1 by 1.
The Webmin modules didn’t connect with the web ports I had compiled. So I decided to try to make Webmin from the ports collection instead of the package. (I prefer ports anyway, the Webmin docs just gave the package instruction for some reason).
So I deleted my droplet, reinstalled FreeBSD, then ports via subversion, then updated with portmaster, and it took forever.
This time I saved a snapshot once the base FreeBSD system was “installed, configured, and upgraded.”
The FreeBSD web server and Webmin configuration take a long time (the mysql compilation is ridiculously long alone). A snapshot makes it faster to “start from scratch.”
Anyway, I finally compiled mysql. I am going to move on in the process. I may be back later to update, I may not. The compiling will continue, that I can assure you!November 10, 2016 at 1:36 pm #648MulchKeymaster
LAMP vs FAMP Stack
Getting the CMS up and running was pretty trivial once the LAMP stack was installed, including the database. Actually, to be fair, it should be called a FAMP stack since instead of being a Linux web server, is is a FreeBSD web server, with apache, MySQL, and PHP.
FAMP server it is to me then, fine.
Install was pretty painless, but after HOURS of trying to get the apache Webmin module to link with the apache install on the FreeBSD web server, I finally figured out the problem.
I kept looking at the path Webmin said apache couldn’t be found in, and then looking up my CLI VI ssh session, and there was indeed an httpd.conf file that I had been happily commenting out and configuring. I could not figure out what the problem was, so I went to bed.
What happened was, the path that it was looking for included the directory apache22, when in fact, I had installed apache24. Once that was discovered, it instantly linked (didn’t even need a restart) and is apparently working splendidly. PHP was already linked, and so was the MySQL db. I just had to enter a user and password and all good.
FreeBSD Web Server Development
Now it is time to configure directives, mods, security, then check logs for errors and stability test. Once that is done, I can move to the layout and functions I want the site to encompass, before finally going into content, optimization, marketing, and testing.
So far, all I have spent is the price of 1 domain name. Obviously when my $10 referral credit from Digital Ocean runs out, that will increase. For that credit, I now have a FreeBSD web server installed, that I can tinker with, as well as a FAMP stack serving my CMS to my new domain name.
It’s not done, but for the price and speed of this deployment, I imagine I could quickly and easily deploy many sites with this snapshot template, either for clients, or as self supported niche adwords, affiliate, or sales microsites.
My Future with FreeBSD
Thinking about it, I am kinda stoked that this little adventure into FreeBSD might produce small revenue streams, and has been so successful. I can’t say it hasn’t been frustrating, but that was part of the learning process. I am certain to parse lines of error code much more closely as decoding the 22 vs 24 thing wasted a lot of time. Otherwise, I am quite happy with this experiment.
So far my suspicions seem to be correct, although obviously further testing is in order. I think a FreeBSD web server may be preferable in a production environment over Linux.
This server runs on a specific flavor of Linux. That choice was made with an eye for stability and compatibility. It wasn’t a bad choice and I do still love that Linux flavor very much.
Cuz it Feels Good
FreeBSD just seems more intuitive to me for whatever reason. It also feels more stable and responsive. I don’t have evidence to back it up. It is a “feel.”
The Handbook is the most amazing manual anyone has ever made for anything, and you still have man pages. The ports system works like a dream, and things are in logical places. They are on the suspicious side, when it comes to security.
I usually use virtual private servers, but having a dedicated OS on a droplet may be a more interesting and flexible way of doing things. I must experiment, although I likely wont journal any of that testing, tho.
So does anyone else in this universe play with FreeBSD web servers in production environments or as droplets on Digital Ocean? I would be curious as to what your experiences are.
- You must be logged in to reply to this topic.