Install Gibbon on Ubuntu Server 20.04
Gibbon is an open source school platform project designed to be flexible, extensible and themeable, whilst aiming to help teachers to do their jobs. It aims to provide all schools, no matter their size or resources they have, with the systems they need to provide effective learning, teaching and school management. Gibbon is built using PHP, MySQL, jQuery, Git, Atom and other open tools.
I have done this step-by-step “How To” to help an academy so they can benefit from Gibbon. This particular academy already have an empty physical server to host the app but for this documentation, I used the following:
o Ubuntu Server 20.4 ISO
o Ubuntu Server 20.04 VM on Oracle VirtualBox
– RAM 2GB
– vDisk 32GB
– Bridged network interface
o 5 Mbps Internet connection (not much but served it’s purpose)
Prep-work
o Download Ubuntu Server 20.04 ISO
Download the server ISO from the Ubuntu Server download page
o Create the Ubuntu Server 20.04 install USB
For this, I used balenaEtcher on my Windows 10 PC.
I opted for the portable version which you can choose by clicking the drop-arrow icon.
It is important to run the app as Administrator. Otherwise, you will get a privilege error.
Ubuntu Server Install
o Insert the USB installer into any available working USB port of the physical server
(I will simply refer to this as just “server” hereafter)
o Turn on the server, then get into the BIOS/EFI interface and configure it to boot from USB
– at times, you will need to disable Secure Boot too
After you save the settings, the server will reboot
o On reboot, if all goes well, the server will boot from the USB installer.
On this install page, select English and press the Enter key to continue.
By the way, you will need to press the Enter key to execute a command.
o From here, follow the screenshots below but bear in mind that you need to substitute values or entries that apply to you.
You will have to wait until the installation completes so be patient.
Press Enter to reboot the server.
You will be prompted to eject or remove the USB installer; do so then press Enter.
After the reboot, you probably will see something like this:
Don’t be alarmed. Just hit Enter.
Login using the user credentials you created during the install process.
Setting Up LAMP
o To be sure the server is up-to-date, execute the following commands:
sudo apt -y update
sudo apt -y upgrade
sudo apt -y –fix-broken install
Enter the user password when prompted for it.
o Verify the server’s IP address and take note of it. Execute command ip address to do this.
o Exit from the server then go to your PC. Assuming you’re using a Windows PC, download the latest Putty from the developer’s website; click HERE to download.
o Launch the Command Prompt as Administrator.
Execute command notepad C:\Windows\System32\drivers\etc\hosts.
Edit the file like below:
Remember to enter the actual IP address of your server.
o Close the file then select Save and verify connectivity to the server, execute command ping gibbon.nma.edu
If all is good, you will have result like below:
(Please note that this domain name is only local. Should you intend this to be public, have it registered)
o Go to the Downloads folder, launch Putty.
In Putty, type the server IP address or the host name in the Host Name field; click Open then use the same user credentials in previous procedure. Select No when prompted.
o Copy the string of command below and paste it on Putty by doing a right-click of your mouse
sudo apt -y install apache2 mariadb-server mariadb-client php libapache2-mod-php php-common php-sqlite3 php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-bcmath php-xml php-cli php-zip unzip git
You will be prompted for user password; please do so. This process downloads and installs the LAMP packages and will take time depending on your Internet connection so be patient.
Tasks like copying and pasting commands is easy when working remotely on the terminal; this is why I prefer it when working on our servers.
o Execute this command sudo apt -y –fix-broken install to make sure we’re not missing any software packages.
o To verify that the web server is installed and running, launch your web browser and point it to http://gibbon.nma.edu.
You should have something like this:
o We now need to edit a few PHP parameters for use with Gibbon.
Execute command sudo nano /etc/php/7.4/apache2/php.ini
This opens the file with the Nano text editor.
Proceed to change these parameters:
memory_limit = 384M
upload_max_filesize = 200M
post_max_size = 256M
max_file_uploads = 100
Important: Value must be larger than number of students in a class
max_execution_time = 120
date.timezone = Asia/Manila
Relevant nano keys:
CTRL+W <<< launches the find/search entry
CTRL+X <<< exits the app. Press Y to confirm save changes
o Next, we create and prepare a database for use with Gibbon. Execute commands:
sudo mysql
CREATE DATABASE gibbondb;
CREATE USER 'gibbonuser'@'localhost' IDENTIFIED BY 'gibbonpass';
GRANT ALL ON gibbondb.* TO 'gibbonuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
Entries in red, must be changed to what is relevant to you; I just used those to document this procedure.
Gibbon Install
o Download latest Gibbon package from offcial github repository.
Execute command wget -c https://github.com/GibbonEdu/core/archive/v21.0.01.zip
o Extract the downloaded file; execute this command unzip v21.0.01.zip
o Next, move the extracted files to /var/www/html/gibbon
Execute command sudo mv core-21.0.01 /var/www/html/gibbon
o Verify if move is a success.
Execute ls /var/www/html.
You will see something like this:
o Proper permission must be assigned on the Gibbon directory.
Execute commands:
sudo chown -R www-data:www-data /var/www/html/gibbon/
sudo chmod -R 755 /var/www/html/gibbon/
o Configure Apache web server for Gibbon use.
Execute sudo nano /etc/apache2/sites-available/gibbon.conf
This opens a blank file; populate it with this:
ServerAdmin admin_email@mail_domain
DocumentRoot /var/www/html/gibbon
ServerName gibbon.nma.edu
Options FollowSymlinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
Press CTRL+X <<< exits the app. Press Y to confirm save changes
o Enable the newly created config file
Execute sudo a2ensite gibbon.conf
o Enable apache rewrite & restart the Apache services
sudo a2enmod rewrite
sudo systemctl restart apache2
o Now we're ready to install Gibbon.
If you still have the browser window open when you tested for Apache, simply refresh the page. Otherwise,
point your web browser to http://gibbon.nma.edu.
This is Page1 for the web GUI Gibbon installation. Change the System Language to English – United States
you can leave this unchanged if you wanted to use the default.
Click Submit to continue.
o Fill the form with the following info:
Database Server: localhost <<< don’t change this
Database Name: gibbondb
Database Username: gibbonuser
Database Password: gibbonpass
Install Demo Data: Yes <<< you need this to learn about the system
Note that Database Name and Database Username are what you specified in the database creation.
Click Submit to continue.
o Fill the form with the following info:
Under User Account
Surname, First Name, Email, Username, Password
Must be credentials of the personnel who will maintain the system
Under System Settings
Base URL: Same as the web address you used on the browser. Please note that this is only available
on campus unless hosted on outside hosting site with registered domain name.
System Name: You can use Gibbon or another name of your choice
Install Type: Production
Other options will be more confusing especially if you're not a developer since debugging notifications will pop-up from time to time
Under Miscellaneous
Country: Philippines
Currency: Philippine Peso
Timezone: Asia/Manila
Click Submit to continue.
o Click go to your homepage, login, and start using Gibbon.
Use the user account credentials you entered on Step 3 of the web GUI installation page to login.
o Visit the Gibbon Support YouTube page.
Learn from the Gibbon Training Day 2021 series.
Hope this helps… 🙂
Install DSpace in Debian 6.0 (Squeeze)
I was tasked by our IT director (who, by the way, is a hardcore Debian fan) to install DSpace for the library for them to try and eventually use it as their archive repository. I searched the web for an idiot’s guide (because am a Windows guy) to install Dspace on Debian but didn’t find a suitable one, unfortunately. Here, am sharing what I did to successfully install and run Dspace after all the trial and error. By the way, I used SSH via Putty doing the procedures below; it made the task even lighter. Hope this helps…
THE TRY-IT-OUT STAGE
Host PC:
Lenovo 3000
CPU Intel Centrino 1.66GHz
RAM 2.99GB usable
HDD 320GB
OS Windows 7 32bit Ultimate
Virtual Machine:
Hypervisor Oracle VirtualBox 4.0.4r70112
RAM 384MB
HDD 10GB
Audio Disabled
Network Bridged
OS Debian 6.0 (Squeeze)
Hostname dspace
Network DHCP reservation
DSPACE INSTALLATION
1. Start the VM and login as root then install the pre-requisite applications (Java, Tomcat, Maven, Ant, PostgreSQL)
apt-get install sun-java6-jdk
During the Java package installation, just answer Y (Y is the default action when you hit Enter as with other application installation except if the application cannot be authenticated where N is the default action), OK (press the Tab key) and Yes (left arrow key) when prompted.
apt-get install tomcat6
apt-get install maven2 (Ant is bundled with this package. No need to install separately)
apt-get install postgresql
or if you have a very fast connection, you can do a single liner
apt-get install sun-java6-jdk tomcat6 maven2 postgresql
2. Just to make sure you won’t get a Java runtime misconfiguration, you do this
update-alternatives –config java
Select the selection number that says:
/usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode (in my case, I selected option 2 see screenshot)
3. Download the latest Dspace package. For some unknown reason, I am not able to access sourceforge.net so I downloaded the package here.
Before downloading, change directory to /usr/src
cd /usr/src/
Then download the package
wget -c http://www.sfr-fresh.com/unix/www/dspace-1.7.0-release.tar.gz
4. Unpack the package.
ls dspace-1.7.0-release.tar.gz (just to verify the package is in the directory)
tar zxvf dspace-1.7.0-release.tar.gz
5. Create Linux user account for Dspace
useradd -m dspace (-m option creates user home directory)
6. Change ownership of newly unpacked directory
chown -R dspace:adm dspace-1.7.0-release
7. The next step involves Postgresql. It requires you to change the file system permission setting to trust localhost connections you do this by editing the pg_hba.conf file.
nano /etc/postgresql/8.4/main/pg_hba.conf
When you open the file, scroll down to the last portion where you will see the following entries
# Database administrative login by UNIX sockets
#local all postgres ident <<< comment this line and add line below
local all postgres trust
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# “local” is for Unix domain socket connections only
#local all all ident <<< comment this line and add line below
local all all trust
8. Restart Postgresql to use the modified configuration
/etc/init.d/postgresql restart
9. Create Postgresql user account for DSpace
To verify Postgresql is running, type psql -U postgres
You should be able to login to Postgresql. Type \q to quit
Proceed by typing this command
createuser -U postgres -d -A -P dspace ; createdb -U dspace -E UNICODE dspace
key-in dspace when prompted for password and when asked to confirm password
key-in y when prompted to take action on role
10. Change directory to the initial configuration files repository
cd dspace-1.7.0-release/dspace/config/
10.1 Edit dspace.cfg particularly the following parameters:
# DSpace host name
dspace.hostname = dspace.your-domain-name.edu
# DSpace base host URL
dspace.baseUrl = http://dspace.your-domain.edu:8080 or http://ip_address:8080
NOTE
– It is extremely important that you enter the correct information otherwise Dspace will not work
– If hostname is used, then an entry on your DNS server is a must. In BIND for example
dspace.xxxxxx.edu. IN A x.x.x.x
or in the Windows host, add an entry in the Windows\System32\Drivers\etc\hosts file the should point to the DSpace VM.
# Name of the site
dspace.name — Dspace for AIIAS Hardinge Library
# Database name (“oracle”, or “postgres”)
#db.name = ${default.db.name} <<< comment this entry
db.name = postgres <<< uncomment this
#db.name = oracle
# URL for connecting to database
#db.url = ${default.db.url} <<< comment this
db.url = jdbc:postgresql://localhost:5432/dspace <<< uncomment this
# JDBC Driver
#db.driver = ${default.db.driver} <<< comment this
db.driver = org.postgresql.Driver <<< uncomment this
# Database username and password
#db.username = ${default.db.username} \__ comment these
#db.password = ${default.db.password} /
db.username = dspace \__ uncomment these
db.password = dspace /
# SMTP mail server
mail.server = smtp.your-domain.edu
# From address for mail
mail.from.address = dspace-noreply@your-domain.edu
# Currently limited to one recipient!
feedback.recipient = dspace-help@your-domain.edu
# General site administration (Webmaster) e-mail
mail.admin = dspace-help@your-domain.edu
11. Change directory to /var then create dspace directory and chown directory ownership
cd /var
mkdir dspace
chown dspace dspace
12. Build the Maven package
cd /usr/src/dspace-1.7.0-release/dspace
mvn package
it will start downloading a lot of jar and pom files… until you see something like this:
[INFO] Copying 1386 files to /usr/src/dspace-1.7.0-release/dspace/target/dspace-1.7.0-build.dir [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] DSpace Addon Modules .................................. SUCCESS [8:46.193s] [INFO] DSpace XML-UI (Manakin) :: Web Application ............ SUCCESS [1:02:46.078s] [INFO] DSpace LNI :: Web Application ......................... SUCCESS [2:39.578s] [INFO] DSpace OAI :: Web Application ......................... SUCCESS [43.201s] [INFO] DSpace JSP-UI :: Web Application ...................... SUCCESS [3:26.257s] [INFO] DSpace SWORD :: Web Application ....................... SUCCESS [1:22.040s] [INFO] DSpace SOLR :: Web Application ........................ SUCCESS [17:28.865s] [INFO] DSpace Assembly and Configuration ..................... SUCCESS [5:06.675s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 102 minutes 23 seconds [INFO] Finished at: Wed Mar 09 06:57:19 PST 2011 [INFO] Final Memory: 40M/92M [INFO] ------------------------------------------------------------------------
13. Change directory to Dspace source directory and run ant
cd /usr/src/dspace-1.7.0-release/dspace/target/dspace-1.7.0-build.dir
ant fresh_install
this will start a process, connecting database and updating a lot of files. Until you will see something like this:
[echo] [echo] ==================================================================== [echo] The DSpace code has been installed, and the database initialized. [echo] [echo] To complete installation, you should do the following: [echo] [echo] * Setup your Web servlet container (e.g. Tomcat) to look for your [echo] DSpace web applications in: /dspace/webapps/ [echo] [echo] OR, copy any web applications from /dspace/webapps/ to [echo] the appropriate place for your servlet container. [echo] (e.g. '$CATALINA_HOME/webapps' for Tomcat) [echo] [echo] * Make an initial administrator account (an e-person) in DSpace: [echo] [echo] /dspace/bin/dspace create-administrator [echo] [echo] * Start up your servlet container (Tomcat etc.) [echo] [echo] You should then be able to access your DSpace's 'home page': [echo] [echo] http://localhost:8080/xmlui [echo] [echo] You should also be able to access the administrator UI: [echo] [echo] http://localhost:8080/xmlui/dspace-admin [echo] ==================================================================== [echo] BUILD SUCCESSFUL Total time: 17 minutes 33 seconds
14. For your own sanity’s sake, instead of tweaking Tomcat as suggested by the installer, copy instead the DSpace webapps directory content to the Tomcat webapps directory.
cp -R /dspace/webapps/* /var/lib/tomcat6/webapps/
15. Create the initial administrator account.
cd bin
chmod 775 dspace
./dspace create-administrator
Creating an initial administrator account
E-mail address: xxxxxxx@xxxxx.edu
First name: xxxxxxx
Last name: xxxxxxx
WARNING: Password will appear on-screen.
Password: your_password
Again to confirm: your_password
Is the above data correct? (y or n): y
Administrator account created
16. Check if Tomcat is running. Launch your favorite web browser and go to cp
http://dspace_server_address:8080
A webpage should say something like IT WORKS
17. Access your Dspace home page at
http://dspace_server_address:8080/jspui
or access the administrator at
http://dspace_server_address:8080/jspui/dspace-admin
CONGRATULATIONS! You have successfully installed Dspace…
Dynamips in Windows 7: an update
I thought of revising the previous post but decided to just add this update instead. Dynamips now works 100% with Windows 7. It now can interact with the physical network. Simply download and install the latest version of WinPcap then BAM!!! you’re on. So now, I don’t have to shift between Windows XP and Windows 7 when I needed to mess around with Dynamips… 🙂
I am a PC? Are you?
Remove Feedback tool from Windows 7 Beta
Bitlocker To Go
How to provide Internet connection to a Virtual PC guest OS using a loopback adapter
Installing Windows 7 on Virtual PC 2007 and activating it Windows Server 2008 Server Core style was not a problem since the host PC (a Lenovo 3000 N100 laptop running WinXP Pro) I used was connected to our corporate network. At home though, hooking up to the Internet is via dialup using PLDT WeROAM. The problem is, I wanted to use the same network interface I assigned Windows 7 in VPC and I don’t have a switch to physically connect the network interface into. Below is my workaround to address the problem at hand. |
|
PS: If you don’t want to make a physical loopback adapter, try using the MS Loopback adapter and assign that adapter to be used by the guest OS. You get the same result but making a physical loopback adapter gives you a different experience because nothing beats a rather physical action… |
Old school Hosts file to fix name resolution problems
62.146.66.181 dl1.avgate.net <<< both for Avira AntiVir Classic
62.146.66.182 dl2.avgate.net <<<
Activating Windows 7 Beta (build 7000): Windows Server 2008-Server Core Style
Frustrated, I launched the Command Prompt in an attempt to activate Windows 7 via Windows Server Core style. Guess what? It worked. Here’s how I did it:
- Enable the built-in Administrator account. (this is because you need administrator privilege to run the activation script)
- Right-click Computer from the Start Menu then select Manage from the context menu.
The Computer Management console pops up. - Expand the System Tools snap-in then expand the Local Users and Groups snap-in as well.
- Click the Users extension then right-click the Administrator user account and select Properties from the context menu.
The Administrator Properties dialog pops up. - Uncheck Account is disabled then click OK.
- Right-click Computer from the Start Menu then select Manage from the context menu.
By the way, if you can’t recall the built-in Administrator’s password, you might as well reset the password since you will be prompted for it later.
- Launch the Command Prompt.
- In the Command Prompt, type runas /user:administrator /env "cscript x:\windows\system32\slmgr.vbs -ato" then hit Enter.
You will be prompted for the password. Just to do so and hit Enter then wait until you see the blinking cursor again. - Verify the activation by launching the System applet in the Control Panel or right-click Computer then select Properties from the context menu. You should have something like this:
By the way, I was able to locate the activation link the second time I installed Windows 7. Just launch the System applet via the Control Panel or Properties from the Computer context menu. Windows activation section follows after Computer name, domain, and workgroup settings.