Last updated 8-18-2006
The gnuschool application was set up in a GNU/Linux system
Following are the steps I used to set up the system

*********START of Ingredients**********
Intel D865PERL Socket 478 Motherboard
Intel Celeron D 340 2.93Ghz/256k Cache/533 FSB/Socket 478/Processor
Ultra Aluminum Heat Sink Pentium 4 CPU cooling fan Skt 478
Ultra DDR Memory 512 MB PC3200 DDR 400MHz, I used two of these
Memorex 52X CD drive
Maxtor Hard Drive 160GB EIDE 7200/8MB/ATA-133
Ultra 350 Watt V-Series PSU Black ATX Power Supply
Ultra Wizard Black Mid Tower ATX Case
Fedora Core 3 CDs
Connection to the Internet
*********END of Ingredients**********

*********START of PROCESS**********
Install Fedora Core 3 as server with nothing checked in the packages section

Configure your system for Internet access
At the GNU/Linux system prompt, enter the following:
netconfig

Click on the box to turn dhcp ON or OFF.
ON for downloading files
OFF if you want to disconnect your system from the Internet

After making network changes, use the "network" program
At the GNU/Linux system prompt, enter the following:
/etc/rc.d/init.d/network restart

Run ifconfig to check if eth0 is connected
At the GNU/Linux system prompt, enter the following:
ifconfig -a

Run uname to check system information
At the GNU/Linux system prompt, enter the following:
uname -n
uname --help

Run hostname to check domain and host name info
At the GNU/Linux system prompt, enter one of the following:
hostname -a
hostname -s
hostname -d
hostname -f
hostname
hostname --help

Run hostname to set your hostname and domainname
At the GNU/Linux system prompt, enter the following:
hostname mysystemname.mydomainname.com

Make sure /etc/hosts has the hostname information
Run vi to edit the file
At the GNU/Linux system prompt, enter the following:
vi /etc/hosts

With the file /etc/hosts opened, insert the following lines:
127.0.0.1     localhost.localdomain           localhost
192.168.1.11  mysystemname.mydomainname.com   mysystemname

Change the 192.168.1.11, mysystemname, and mydomainname above
It should have your own IP address, system name, and domain name

Make sure /etc/sysconfig has the hostname information
Run vi to edit the file
At the GNU/Linux system prompt, enter the following:
vi /etc/sysconfig/network

With the file /etc/sysconfig opened, insert the following lines:
NETWORKING=yes
HOSTNAME=mysystemname.mydomainname.com

To continue we need to use specific RPMs
Many of the RPMs are in your Fedora CDs
However, some of the RPMs you need are not in the Fedora CDs
You'll have to download them from the Internet
Two sections follow
If you're getting all your RPMs via the Internet, use "SECTION 1"
Otherwise use "SECTION 2"

(start of SECTION 1)
At the GNU/Linux system prompt, enter the following:
cd /user/local
wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/glibc-kernheaders-2.4-9.1.87.i386.rpm
rpm -i glibc-kernheaders-2.4-9.1.87.i386.rpm
rm -f glibc-kernheaders-2.4-9.1.87.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/glibc-headers-2.3.3-74.i386.rpm
rpm -i glibc-headers-2.3.3-74.i386.rpm
rm -f glibc-headers-2.3.3-74.i386.rpm
wget http://download.fedora.redhat.com/pub/fefora/linux/core/3/i386/os/Fedora/RPMS/glibc-devel-2.3.3-74.i386.rpm 
rpm -i glibc-devel-2.3.3-74.i386.rpm
rm -f glibc-devel-2.3.3-74.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/cpp-3.4.2-6.fc3.i386.rpm 
rpm -i cpp-3.4.2-6.fc3.i386.rpm
rm -f cpp-3.4.2-6.fc3.i386.rpm
wget http://download.fedora.redhat.com/pub/fefora/linux/core/3/i386/os/Fedora/RPMS/gcc-3.4.2-6.fc3.i386.rpm
rpm -i gcc-3.4.2-6.fc3.i386.rpm
rm -f gcc-3.4.2-6.fc3.i386.rpm
wget http://download.fedora.redhat.com/pub/fefora/linux/core/3/i386/os/Fedora/RPMS/zlib-devel-1.2.1.2-1.i386.rpm
rpm -i zlib-devel-1.2.1.2-1.i386.rpm
rm -f zlib-devel-1.2.1.2-1.i386.rpm
wget http://download.fedora.redhat.com/pub/fefora/linux/core/3/i386/os/Fedora/RPMS/libxml2-devel-2.6.14-2.i386.rpm
rpm -i libxml2-devel-2.6.14-2.i386.rpm
rm -f libxml2-devel-2.6.14-2.i386.rpm
wget http://download.fedora.redhat.com/pub/fefora/linux/core/3/i386/os/Fedora/RPMS/flex-2.5.4a-33.i386.rpm
rpm -i flex-2.5.4a-33.i386.rpm
rm -f flex-2.5.4a-33.i386.rpm
(end of SECTION 1)

(start of SECTION 2)
At the GNU/Linux system prompt, enter the following:
cd /user/local
wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/glibc-kernheaders-2.4-9.1.87.i386.rpm
rpm -i glibc-kernheaders-2.4-9.1.87.i386.rpm
rm -f glibc-kernheaders-2.4-9.1.87.i386.rpm
wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/glibc-headers-2.3.3-74.i386.rpm
rpm -i glibc-headers-2.3.3-74.i386.rpm
rm -f glibc-headers-2.3.3-74.i386.rpm
rpm -i /Fedora/RPMS/glibc-devel-2.3.3-74.i386.rpm
rm -f glibc-devel-2.3.3-74.i386.rpm
rpm -i /Fedora/RPMS/cpp-3.4.2-6.fc3.i386.rpm
rm -f cpp-3.4.2-6.fc3.i386.rpm
rpm -i /Fedora/RPMS/gcc-3.4.2-6.fc3.i386.rpm
rm -f gcc-3.4.2-6.fc3.i386.rpm
rpm -i /Fedora/RPMS/zlib-devel-1.2.1.2-1.i386.rpm 
rm -f zlib-devel-1.2.1.2-1.i386.rpm
rpm -i /Fedora/RPMS/libxml2-devel-2.6.14-2.i386.rpm
rm -f libxml2-devel-2.6.14-2.i386.rpm
rpm -i /Fedora/RPMS/flex-2.5.4a-33.i386.rpm
rm -f flex-2.5.4a-33.i386.rpm
(end of SECTION 2)

At the GNU/Linux system prompt, enter the following:
groupadd mysql
useradd -g mysql mysql
cd /usr/local
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-standard-5.0.16-linux-i686-glibc23.tar.gz/from/http://mysql.mirrors.pair.com/
md5sum mysql-standard-5.0.16-linux-i686-glibc23.tar.gz

The above command makes sure the download was successful
The result for the md5sum command above should be:
bfec94aa94a02d01e79072168d1af3e6

At the GNU/Linux system prompt, enter the following:
gunzip < mysql-standard-5.0.16-linux-i686-glibc23 | tar xvf -
ln -s /usr/local/mysql-standard-5.0.16-linux-i686-glibc23 /usr/local/mysql
cd /usr/local/mysql
./scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
./bin/mysqld_safe --user=mysql &
./bin/mysql -u root

***************************************************************
SUPER USER NOTE 1:
	"new_admin" super user replaces the root super user
***************************************************************
You are now at the mysql client prompt which looks like this "mysql>"
We're now going to add a super user called "new_admin"
Change "new_admin" to a name you prefer
The new super user will have access to mysql from 3 places
  1) localhost
  2) 127.0.0.1
  3) An IP address of your choice (optional)
Number 3 is the IP address "MYSQL Administrator" will be connecting from
At the mysql prompt, enter the following:
GRANT ALL PRIVILEGES ON *.* TO 'new_admin'@'localhost' WITH GRANT OPTION; 
GRANT ALL PRIVILEGES ON *.* TO 'new_admin'@'127.0.0.1' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'new_admin'@'192.168.1.4' WITH GRANT OPTION;

View all user and host combinations in the mysql database
At the mysql prompt, enter the following:
SELECT User, Host FROM mysql.user;

Remove no name user
At the mysql prompt, enter the following:
DROP USER ''@'localhost';

Remove all users in this way except "new_admin" users
At the mysql prompt, enter the following:
DROP USER 'root'@'localhost';

The "new_admin" super user should be the only remaining user
The next command should display 3 "new_admin" host combinations
At the mysql prompt, enter the following:
SELECT User, Host FROM mysql.user;  

View all existing databases.
At the mysql prompt, enter the following:
SHOW DATABASES;

Delete the test database.
At the mysql prompt, enter the following:
DROP DATABASE test;

Again view all existing databases
"information_squema" and "mysql" should be the only remaining databases
At the mysql prompt, enter the following:
SHOW DATABASES;

***************************************************************
SUPER USER NOTE 2:
	Give "new_admin" super user the same password 3 times
***************************************************************
Change "new_pswd" to something you prefer
At the mysql prompt, enter the following:
SET PASSWORD FOR 'new_admin'@'localhost' = PASSWORD('new_pswd'); 
SET PASSWORD FOR 'new_admin'@'192.168.1.4' = PASSWORD('new_pswd'); 
SET PASSWORD FOR 'new_admin'@'127.0.0.1' = PASSWORD('new_pswd'); 
exit

Now we're back at the GNU/Linux system prompt
At the GNU/Linux system prompt, enter the following:
cd /usr/local
wget http://mirrors.playboy.com/apache/httpd/httpd-2.0.55.tar.gz
md5sum httpd-2.0.55.tar.gz  (It should be b45f16a9878e709497820565d42b00b9)
gzip -d httpd-2.0.55.tar.gz
tar -xvf httpd-2.0.55.tar
wget http://us2.php.net/get/php-5.1.1.tar.gz/from/us3.php.net/mirror
md5sum php-5.1.1.tar.gz	  (It should be ed3d099828282e66c66cadd8d879d739)
gunzip php-5.1.1.tar.gz
tar -xvf php-5.1.1.tar
cd /usr/local/httpd-2.0.55
./configure --enable-so
make
make install
cd /usr/local/php-5.1.1
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-dbase
make
make install
cp /usr/local/php-5.1.1/php.ini-dist /usr/local/lib/php.ini (if file doesn't exist)
cp /usr/local/php-5.1.1/libs/libphp5.so /usr/local/apache2/modules (if file doesn't exist)
vi /usr/local/apache2/conf/httpd.conf

The file /usr/local/apache2/conf/httpd.conf is now opened in the text editor
The following 4 lines need to be in this file.
DocumentRoot "/home/gnuschool"
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
<Directory "/home/gnuschool">

At the GNU/Linux system prompt, enter the following:
cd /usr/local/apache2
./bin/apachectl start

*********END of PROCESS**********


*********start gnuschool setup**********
Copy gnuschool.tar into your /home directory
At the GNU/Linux system prompt, enter the following:
cd /home
tar -xvf gnuschool.tar
cd gnuschool

Copy the 3 files into the /tmp directory
At the GNU/Linux system prompt, enter the following:
cp students.txt /tmp
cp teacher_students.txt /tmp
cp principals.txt /tmp


In this example the IP address 192.168.1.11 is used
It's where the web application gnuschool is located
Substitute it with your system IP address

Using a web browser access http://192.168.1.11/db_admin/index.html
From here on "http://192.168.1.11" will be omitted when referring to web pages
However, it's understood they preceed the web pages
Click on the first button "Setup the school database system"

You are now in /db_admin/school_setup.php
Click on the first button "Create the user database"

You are now in /db_admin/create_user.php
In the first 2 fields, type your new_admin name and
your new_password used in "Note 1" and "Note 2"
In the lower 3 fields, you will create an administrator with
exclusive web administration privileges
***************************************************************
NOTE 3: 
   Use this web administrator for all gnuschool administration
***************************************************************
Click on "Create User Database"
You are still in /db_admin/create_user.php
The text towards the bottom will inform you if it was successful
Now click on the link to the main school setup page

You are now in /db_admin/setup_school.php
click on "Create the school database" type in your user name and
password from NOTE 3

You are in /db_admin/create_main.php click on "Create School Database"
You are in /db_admin/create_main.php text towards the bottom will
inform you if it was successful
Click on the link to the main school setup page
You are in /db_admin/setup_school.php
Click on "Edit default settings"

You are in /db_admin/defaults.php
The fields you see apply to files used to import data into the
database or export data from the database
The file students.txt is in the gnuschool directory
This is a formatted ASCII text file I use to test the database
First I use students.txt to import data into the database
The first line has the column names
Each line after that has the student name and homeroom name
You have already copied students.txt into /tmp
gnuschool will use the files in /tmp to import and export data
You may use an input file with a different name
If so, you must update the file name field in /db_admin/defaults.php
Click on the link to the main school setup page

You are in /db_admin/setup_school.php
At number 3, click on "Use a default text file"
You are in /db_admin/im_txt_2_main_stu.php click on "Proceed"
You are still in /db_admin/im_txt_2_main_stu.php
Text towards the bottom will inform you if it was successful
Click on the link to the main school setup page

You are in /db_admin/setup_school.php
At nuber 4, click on "Use a text file"
You are in /db_admin/im_txt_2_teac_stu.php
The file teacher_students.txt is in the gnuschool directory
It is a formatted ASCII text file used to test the database
I use teacher_students.txt to import data into the database
It has teacher and student sections
The file arrangement is now explained in /db_admin/im_txt_2_teac_stu.php
You have already copied teacher_students.txt into /tmp
"Display all user name and password data" should be checked
Leave the email checkboxes unchecked
Presently this help file does not cover the email options
click on "Proceed"
You are in /db_admin/im_txt_2_teac_stu.php
Text towards the bottom will inform you if it was successful
Leave this window open
You will need the teacher user names and passwords later
Click on the link to the main school setup page

You are in /db_admin/setup_school.php
At number 5, click on "Use the text file"
You are in /db_admin/im_txt_2_teac_pri.php
The file principals.txt is in the gnuschool directory
It is a formatted ASCII text file used to test the database
I use principals.txt to import data into the database
The file arrangement is now explained in /db_admin/im_txt_2_teac_pri.php
You have already copied principals.txt into /tmp
"Display all user name and password data" should be checked
Leave the email checkboxes unchecked
Presently this help file does not cover the email options
click on "Proceed"
You are in /db_admin/im_txt_2_teac_pri.php
Text towards the bottom will inform you if it was successful
Leave this window open
You will need the principal user names and passwords later
You can always get them again via /db_admin/new_password.php
It allows an administrator to generate a new teacher user name and/or password

You can always get a new principal or teacher user name and password
The page /db_admin/new_password.php allows you to do just that
It lets an administrator generate a new user name and/or password

To access a teacher's database open a new browser window
Open /teachers/attendance.php
You will need to type the teacher's user name and password
As a teacher you're able to use the web pages available via the menu

To access a principal's search open a new browser window
Open /principals/absent_search.php
You will need to type the principal's user name and password
As a principal you're able to use the web pages available via the menu

You have now completed the gnuschool setup

