We will be installing:
- FreeBSD (STABLE)
- MySQL
- Apache
- PHP
- and some other apps helpful to webmasters
- 1 blank CD
- A CD burner
- A computer with an ethernet card
- An Internet connection with a static IP address
Download FreeBSD
Your new webserver can be any old, cheap, Intel-based box, as FreeBSD will run on any old piece of crap.
- First, make sure your computer is compatible
- Go to the FreeBSD Releases page
- Check Hardware Notes for the Stable Release
- Make sure your hardware is compatible with that release. I can almost guarantee that it is...
- Download FreeBSD
- Go to the FreeBSD home page
- Follow instructions for downloading the production/stable release
- Download just the disc1.iso ISO image
- Burn the iso to your blank CD
Boot up Install CD
Now you should have:
- 1 FreeBSD ISO CD
- 1 computer (with a network card) ready to be transformed into a web server
Installer Notes:
- Use the arrow keys to move
- Use space to select
- Use enter to execute/select
- Don't use the number pad; stick to the regular number keys
- Boot up
Put your freshly burned CD into the soon-to-be webserver and turn it on. If all goes well you'll see the FreeBSD daemon asking you what you want to do - Select the default option:
Boot FreeBSD
- Use the arrows to select
Standard - Begin Standard Installation
, then hit Enter
The FreeBSD Installer
- Select
Standard
, hitEnter
- Use arrow keys to delete all current partitions:
D
deletes current partition;A
uses entire partition;Q
when you're done Boot Manager
SelectBoot Mgr
, hit enterDisk Label Editor
: Create disk partitions: TypeC
to create a new partition. Create custom partitions, something like below. Create the partitions in this order:
2GB FS Mount Point: /
1GB SWAP
1GB FS Mount Point: /tmp
1GB FS Mount Point: /var
10GB FS Mount Point: /usr
[all remaining] FS Mount Point: /home
The 2nd partition (SWAP) should be 2x the amount of RAM installed. Partitions/
,/tmp
, and/var
can stay rather small (use the defaults above) no matter how big your HD is.
TypeQ
to finishSelect Distribution
ChooseAll
Ports Collection
Yes you want the ports skeleton (you'll go back to the Select Distribution screen. Scroll up, selectExit
Installer Source
SelectCD/DVD
Last Chance
Hell, yeah. Delete everything, reformat the HD, give me some BSDLove
Disk Label Editor
, and begins installing stuff. During the installation, you can see what's going on in a number of different views:ALT-F1
- default GUI viewALT-F2
- verbose installation logALT-F4
- emergency interactive shellAfter extracting the source, and installing the source, you'll get to a screen that says:
Congratulations
Hit
OK
and move on... Configuration
would you like to configure any ethernet or SLIP/PPP network devices?
YesSelect Your Network Card
Select the first option unless you're sure your network card is one of the other optionstry IPV6?
Notry DHCP?
No- Network Info:
Host
[servername] If you want your server to be "foo.example.com", enter "foo" here
Domain
example.com
enter the rest of your net info, clickOK
function as a network gateway?
Noinetd and network services that it provides?
Noenable SSH?
Yesanonymous FTP?
NoNFS server?
NoNFS client?
Nocustomize system console settings?
Yes
I just selectSAVER
and select a really retro screen saver...like snake...Set this machine's timezones now?
YesLinux binary compatibility?
Yes - this should let you run compiled linux binaries through FreeBSD's emulator.Does this system have a PS/2, serial, or bus mouse?
No - mice are for wimps.FreeBSD Package Collection - Browse the collection now?
No - we'll add ports later onAdd any initial user accounts?
Yes
SelectUser
; hitEnter
- Login ID: web
- UID: [default]
- Group: [leave blank]
- Password: *******
- Full Name: Web Master
- Member Groups: wheel
- Home Directory: /home/web
- Login Shell: /bin/csh (I like csh better than the default, sh)
Set Root's Password
Visit the general configuration menu for a chance to set any last options?
No- Use the right arrow to select [
Exit Install
]
HitEnter
Are you sure you want to exit
? Hell, fricken' yes, I'm sure
Your system will restart. Remove the install CD, and behold your new FreeBSD webserver
First Startup
You'll see a verbose startup messages page across the screen. The first startup, you'll eventually be asked to create an SSH key. To do this, just type a screenful (maybe 10 lines) of random junk then hit enter.
Your system will finish booting up and eventually prompt you with:
FreeBSD/i386 (foo.example.com) (ttyv0)
login: []
Login
Log in as
web
and the password you made, and start familiarizing yourself with some unix commands: Next Steps
Now you have a FreeBSD web server connected to the internet. SSH is enabled, but not FTP. More importantly, to serve web pages, you'll need to install some additional software.In the next lesson, we'll install:
- PHP
- MySQL
- Apache
- ...and more.
No comments:
Post a Comment