Setting up a moodle box and Oracle database (for comms with external Oracle dbase) on Fedora Core 6 (x86)
Friday, December 8th, 20061. Install Fedora Core 6 with the following settings:
| Desktop Environments: | Gnome |
| Applications: | Editors Graphical Internet |
| Development: | Development Libraries Developer Tools Legacy Software Development |
| Servers: | MySql Database (Note! Check php-mysql-5.1.6-3.1.fc6) Server Configuration Tools Web Server |
| Base System: | Admin Tools Base System Tools Legacy Software Support XWindow System |
2. Disable SELinux from startup program.
3. Turn off non-essential services:
| acpid | netfs |
| apmd | nfslock |
| autofs | pcscd |
| avahi-daemon | portmap |
| bluetooth | readahead_early |
| cpuspeed | readahead_later |
| cups | restorecond |
| firstboot | rpcgssd |
| gpm | rpcidmapd |
| haldaemon | sendmail |
| hidd | smartd |
| irqbalance | |
| kudzu | |
| mcstrans | |
| mdmonitor | |
| messagebus |
4. Install a couple of plugins:
yum install gd-devel
yum -y install php-gd
yum provides php-gd
yum -y install php-mbstring
yum provides php-mbstring
5. Install PhpMyAdmin
Download the most recent package using wget and unpack it using tar xzvf downloadedfilename
Move unpacked folder contents to /var/www/phpmyadmin
6. Edit the /etc/httpd/conf/httpd.conf
Setup Virtual Servers:
Uncomment Name Based Server line and put the IP addess of the server in there.
Create a virtual directory simulating the example provided within the file.
7. Create the config.inc.php for phpmyadmin and remember to include a password
For ease of use set the phpmyadmin virtual directory to the ip address of your server through httpd.conf and login to it via a web browser. From here you will be able to configure a config.inc.php file for phpymyadmin. Note: you will have to create a writable config directory within the phpmyadmin root directory. Make sure the character set is set to UTF8.
8. Download moodle
http://download.moodle.org/stable17/moodle-latest-17.tgz
Install it using a web browser to administer it.
9. Download the Oracle database and openmotif RPM from the following areas:
http://www.oracle.com/technology/software/products/database/oracle10g/index.html
ftp://fr.rpmfind.net/linux/fedora/core/4/i386/os/Fedora/RPMS/openmotif21-2.1.30-14.i386.rpm
Unpack the oracle database zip file.
10. Edit the hosts file to include a fully qualified name for the server
E.g. 131.231.84.12 gilo.lut.ac.uk gilo
i.e.
11. Set the Kernal Parameters
Add the following lines to the /etc/sysctl.conf file:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
Run the following command to change the current Kernel parameters:
/sbin/sysctl -p
12. Add the following to the /etc/security/limits.conf file
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
13. Add the following to the /etc/pam.d/login file, if it doesn’t already exist
session required /lib/security/pam_limits.so
14. Ensure SELinux is disabled by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:
SELINUX=disabled
15. Install the following packages from Fedora Core 5
I downloaded an iso from the lboro site here and mounted it using the following commands
mkdir /mnt/iso
mount -o loop -t iso9660 yourcd.iso /mnt/iso
# From Fedora Core 5 DVD
cd /media/dvd/Fedora/RPMS
rpm -Uvh setarch-*
rpm -Uvh –force tcl-*
rpm -Uvh –force libXau-devel-* libXp-*
rpm -Uvh compat-db-*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libf2c-34-*
rpm -Uvh compat-gcc-34-*
rpm -Uvh libaio-*
rpm -Uvh compat-gcc-34-c++-*
rpm -Uvh compat-libstdc++-296*
rpm -Uvh compat-libgcc-296*
# From download
rpm -Uvh openmotif21-2.1.30-14.i386.rpm
16. Create the new groups and users:
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba oracle
passwd oracle (choose your password here)
17. Create the directories in which the Oracle software will be installed:
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01
Login as root (if not already in root) and issue the following:
xhost +
Edit the /etc/redhat-release file replacing the current information with:
redhat-4
18. Login as the oracle user and add the following lines to the end of the .bash_profile file:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
19 .Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory:
./runInstaller
Note: I had to change permissions on the folder (chmod 777 -R database) to run the Installer
2nd Note: I also had to issue yum install libXp as this package wasn’t installed
See the Installation section of this help resource to see screen shots of the installation screens
The three I found most useful are here:
Specify Inventory Directory and Credentials
20. Download and install the Oracle Client
http://download.oracle.com/otn/linux/oracle10g/10201/10201_client_linux32.zip
Same as before unpack it in the Oracle directory you unpacked the database too and run the installer same as before.
21. Post installation Commands
Edit the /etc/redhat-release file restoring the original release information:
Fedora Core release 6 (Zod)
Finally edit the /etc/oratab file setting the restart flag for each instance to ‘Y’:
:/u01/app/oracle/product/10.2.0/db_1:Y
22. Create links to a couple of libraries that are automatically missing
nano /etc/ld.so.conf.d/oracle.conf
At the top of the file type: /u01/app/oracle/product/10.2.0/db_1/lib
Save and close
That’s a lot of steps.