How to install FreeBSD and SiT

From Sit
(Redirected from InstallationOfFreeBSDandSiT)
Jump to: navigation, search


Personal Requirements

  • A little knowledge of using a command line interface
  • A little knowledge of editing config files
  • A little knowledge of installing Unix/Linux

Software/Hardware Requirements

A standard installation of FreeBSD (Follow the guide) Working internet connection Fully configured network on the FreeBSD box

FreeBSD Installation

This installation takes that you downloaded and burned FreeBSD 7.x or 8.x CD1, and you are installing on a clean computer. If you have data on your drive, I won't be held responsible if you loose it. The procedures for FreeBSD 7.1, 7.2 and 8.0 are similar, very little or nothing has changed in the visual parts of the installations.

  • Boot from the CD
  • Choose your country when prompted
  • Choose your keymap
  • Choose Standard
  • Press enter/space at the fdisk message screen
  • Press the 'a' key for using the entire disk
  • Press the 'q' key for finish
  • Choose 'Standard' to install a standard MBR (no boot manager)
  • Press enter/space for next message box
  • Press the 'a' key for auto defaults
  • Press the 'q' key to finish and save
  • Choose 'User'
  • Say no to install the ports collection
  • Move the cursor to the top and choose exit
  • Install from a FreeBSD CD/DVD
  • Choose 'Yes' to partition your disk

Now wait for the installation to finish and press enter/space to finish the installation

  • Choose 'Yes' to configure your network device
  • Choose your ethernet adapter (Usually the upper one)
    • If you use IPv6 choose 'Yes' if you are in doubt or use IPv4 choose 'No'
    • If you know your IP settings choose 'No' (recommended)
  • Enter the hostname, domain name, and if you chose 'No previously, your IP settings.
  • Choose 'No' to having your machine to work as a network gateway
  • Choose 'No' to configuring your inetd
  • Choose 'Yes' to enable SSH login
  • Choose 'No' to enable anonymous FTP
  • Choose 'No' to configure a NFS server
  • Choose 'No' to configure a NFS client
  • Choose 'Yes' to customize your console settings
  • Choose 'Repeat' and choose 'Fast', choose 'Exit'
  • If you want to configure your Timezone Choose 'Yes'
    • Make your right choice here I prefer local time so I'll choose 'No' here
  • Choose your region
  • Choose your country
  • Choose 'Yes' if everything looks fine
  • Choose 'No' for linux binary compatibility
  • If you have a PS/2 mouse choose 'Yes'
  • Choose enable, and move your mouse to see if it works
    • If your mouse works, choose 'Yes'
  • Choose 'Exit'
  • Choose 'No' to browse the package collection
  • Choose 'Yes' to create an initial user/group
  • Choose 'User'
  • Fill out the template, I prefer Group=wheel & Login shell = /bin/tcsh
  • When you are member of the wheel group, you are able to become a superuser from SSH
  • Choose 'Exit'
  • Press enter/space for the message box
  • Enter your password for your root user
  • Choose 'No' if you are satisfied with all your choices.
  • Choose 'X Exit Install' and 'Yes' to exit
  • Remove the CD/DVD from the drive

Congratulations, you now finished installing FreeBSD!

Software installation

We are going to build the applications needed from scratch using the ports tree.

  • Login as the root user
  • At the command prompt type in (remember case sensitivity):
	cd /usr
	tar zxvf ports.tar.gz
	rm ports.tar.gz
  • Time to install MySQL Server
  • If you want MySQL 5.1 instead, replace mysql50-server with mysql51-server below
	cd /usr/ports/databases/mysql50-server
	make install clean
  • Wait til the shell is ready again
  • Install Apache 2.2
	cd /usr/ports/www/apache22
	make install clean
  • Add "Use PCRE from ports" if it isn't already
  • Remove IPV6, otherwise choose 'OK'
  • Time to install php5 (If you install this step before the Apache, then it'll install Apache 1.3)
	cd /usr/ports/lang/php5
	make install clean
  • Remove IPV6 if you don't use it, add Apache
  • Install with default settings (Just press OK)
  • Install some PHP5 extensions that are required
	cd /usr/ports/lang/php5-extensions
	make install clean

Check out the requirements page

  • If you don't need them remove all modules, but be sure the following are checked (use space bar to check on/off)
    • IMAP (if you need to use the IMAP feature)
    • MBSTRING (if you need to use incomming mail)
    • LDAP (If you need to use the LDAP feature)
    • MYSQL
    • PCRE
    • ZLIB
  • To make Apache and MySQL start with the OS, you need to edit /etc/rc.conf (I'll use the ee editor since it's more friendly to people who don't know how to use the vi editor)
  • Edit the file
	ee /etc/rc.conf
  • Go to the bottom of the file and enter
  • Edit the file
	ee /etc/hosts
  • Add to the file your fully qualified hostname e.g.
  • Press 'ESC' and 'a' to leave and 'a' again to save
  • Edit the apache config file to make it work with PHP
	ee /usr/local/etc/apache22/httpd.conf
  • Do a search for the servername
  • CTRL-Y
  • type in 'servername' without the quotes and press enter
  • Make a new line beneath the found and use your own fully qualified domainname (same name as the computer)
  • Do a search for the document root
  • CTRL-Y
  • type in 'DocumentRoot' without the quotes and press enter
  • Edit the line so the line says
	DocumentRoot "/usr/local/www/apache22/data/sit/"
  • Do a search for the directoryroot
  • CTRL-Y
  • type in '<Directory "/usr' without the single-quotes and press enter, CTRL-X to find the next (if it isn't the first hit)
  • Edit the line so the line says
	<Directory "/usr/local/www/apache22/data/sit/">
  • Do a search again
  • CTRL-Y
  • type in 'directoryindex' without the quotes and press enter
  • Scroll down till you find
	DirectoryIndex index.html
  • edit the line so it looks like
	DirectoryIndex index.php index.html
  • Do a search again
  • CTRL-Y
  • type in 'addtype' without the quotes and press enter
  • scroll down till you find
AddType application/x-gzip .gz .tgz
  • and add after that line the following 2 lines
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
  • Quit and save
  • 'ESC' 'a' 'a'
  • Download and extract SiT!
	cd /usr/local/www/apache22/data 
	tar zxvf sit_3.45.tar.gz
	mv sit-3.45 sit
  • You can later on with newer updates use the link from the direct link from the sourceforge download page
  • Start MySQL
	/usr/local/etc/rc.d/mysql start
  • Next step is to create the database, and the user to connect to the database.
mysql> CREATE USER sit@localhost identified by 'password';
  • where password will be replaced by your own
mysql> GRANT ALL on sit.* to sit@localhost;
  • The above user and password is what you need as database user and password for sit
  • For security you should change the password of the root user, just replace newpass with your own
mysql> SET PASSWORD FOR root@localhost = PASSWORD('newpass');
mysql> exit
  • To login as root with the new password, just use the following
	mysql -u root -p
  • Congratulations, you should now be able to install SiT! From a webbrowser.
  • A reboot before starting installation of SiT! Is recommended to test if everything works perfectly.

Installing SiT!

To continue setting up SiT! go to this page: Installation.

Personal tools