Installing Koha from the Ubuntu Command Line: Scripts

Yes, this page needs work to make it look less ugly. But the information's here.

One difficulty with installing Koha from the Ubuntu command line is that you have to type in some fairly complicated scripts. Like all operating systems, Ubuntu will do exactly what you type in, not what you wanted to type in but you got something wrong. In addition, Ubuntu is case-sensitive, so "a" and "A" are two separate things.


In an attempt to make Koha easier to install, I have written some scripts that will type in the complicated commands for you. All you have to do is type
./scriptname
and the command will be executed. To install the scripts on your computer, first make yourself a superuser as shown in the video. Then type
wget -i http://www.avengingchicken.online/koha/scripts.txt
Then you have to change the file permissions so you can run the scripts. Type
chmod 777 *

What the Scripts Do


Filename: addstable
What it does: tells you system to use the most recent version of Koha
Command it's running: echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list


Filename: addoldstable
What it does: tells you system to use the second most recent version of Koha
Command it's running: echo deb http://debian.koha-community.org/koha oldstable main | sudo tee /etc/apt/sources.list.d/koha.list


Filename: addoldoldstable
What it does: tells you system to use the third most stable version of Koha
Command it's running: echo deb http://debian.koha-community.org/koha oldoldstable main | sudo tee /etc/apt/sources.list.d/koha.list


Filename: addkey
What it does: adds a key on your system do you don't get warning messages as you install Koha.
Command it's running: wget -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -


Filename: findpassword
What it does: shows password you use when you start configuring Koha
Command it's running: sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml;echo


Filename: homepage
What it does: Makes the Koha OPAC page visible by renaming the Apache default home page
Command it's running: mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.old
And then it runs: systemctl restart apache2

Filename: restartapache
What it does: Restarts the Apache web server
Command it's running: systemctl restart apache2


Filename: reindex
What it does: Re-indexes Koha.
Command it's running: koha-rebuild-zebra -v -f library
Note: Replace "library" with the name of your library instance. (The one you created with "koha-create --create-db library".)