Introduction
This is the manual install method (walkthrough). This option explains in greater depth the steps required to get Knowl-Bookshelf up and running. This option will give you a greater understanding of what's "under the hood", and may help you get Knowl-Bookshelf running on non-ubuntu systems with minor modification.
Objective
Install Ubuntu Server into a VMware Virtual Machine. Then install some general software requirements into Ubunutu. Finally, login to Ubuntu with terminal software.
Minimum Requirements
- Operating System: Ubuntu Server 20.04 LTS
- Memory: 16GB RAM
- System Storage (excluding eBooks and book-covers):
- 64GB HDD (for unpacking/installing science and fiction)
- 128GB HDD (for unpacking/installing science, fiction and articles)
- If you wish to have the science and fiction book covers reside on the same system (MariaDB, ElasticSearch, Knowl-UI, etc), then add another 128GB to the minimum storage requirement above.
Download and Install "VM Ware Workstation Player" (Version 16.1.0 or newer)
- Navigate to: https://www.vmware.com/products/workstation-player.html
- Follow the VMware download prompts to download the VMware Workstation Player for your platform.
- Install the downloaded file, and follow on screen prompts.
Download Ubuntu Server (Version 20.04.1 LTS or newer)
- Navigate to: https://ubuntu.com/download/server
- Click on button labeled:
Option 2 - Manual server installation
- Click on button labeled:
Download Ubuntu Server 20.04.1 LTS
- The following install file will download:
ubuntu-20.04.1-live-server-amd64.iso
Create a new Virtual Machine
- Launch VMware Workstation Player and then select "Create a New Virtual Machine"
- For "Installer disc image file (iso)", choose the ubuntu file previously downloaded.
- Fill out the "Easy Install" fields, and click next to begin the installation of Ubuntu into the Virtual Machine.
- Click on "Customize Hardware..." button to further customize the virtual machine. I recommend the settings shown below:
- Click "Finish", and then Power on the newly created virtual machine
Ubuntu Server Installation
The following installation screenshots show the non-default installation values that I used for the purposes of the documentation.
Download & run Putty Terminal
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Using the terminal, login to 10.10.10.10 (username="bookuser", password="password")
Install some general software requirements
Copy the following into your terminal window:
echo "[020] # INSTALL GENERAL SOFTWARE REQUIREMENTS"
sudo apt-get update -y
sudo apt-get install -y cifs-utils # For mounting remote ebook shares
sudo apt-get install -y apt-transport-https # Required for Elasticsearch Repo
sudo apt-get install -y openjdk-8-jre # Required for ELK Stack
sudo apt-get install -y unrar # Extracting archives
sudo apt-get install -y unzip # Extracting archives
sudo apt-get install -y rar # Creating archives
sudo apt-get install -y zip # Creating archives
echo "[030] # INSTALL CORRECT YARN"
sudo apt-get -y remove cmdtest yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update -y
sudo apt-get install -y yarn
Install MariaDB (Version 10.4.17 or newer)
# INSTALL MARIADB
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.4/ubuntu $(lsb_release -cs) main"
sudo apt update
sudo apt -y install mariadb-server
# USE ARIA AS DEFAULT STORAGE ENGINE
echo "[mysqld]" > /etc/my.cnf
echo "default-storage-engine=Aria" >> /etc/my.cnf
sudo systemctl restart mariadb
echo "[120] # CREATE THE MARIA DATABASE USER: bookuser PASSWORD: password"
sudo mysql <<ENDSQL
DROP USER 'bookuser'@'localhost';
FLUSH PRIVILEGES;
CREATE USER 'bookuser'@'localhost' IDENTIFIED BY 'password';
ENDSQL
echo "[130] # GRANT bookuser ACCESS TO MariaDB"
sudo mysql <<ENDSQL
GRANT USAGE ON * . * TO 'bookuser'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT FILE, SELECT, LOCK TABLES ON * . * TO 'bookuser'@'localhost';
FLUSH PRIVILEGES;
ENDSQL
Section Summary
You should now be logged into a fresh install of Ubuntu Server 20.04.1 Server with some basic software requirements installed.
Section References and Resources
- https://ubuntu.com/download/server
- https://www.ithowtoo.com/2020/12/09/installing-ubuntu-20-04-server/
- https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- https://mariadb.org/
- https://computingforgeeks.com/how-to-install-mariadb-on-ubuntu/
- https://severalnines.com/database-blog/using-aria-storage-engine-mariadb-server
Next Steps
Proceed to Launch Knowl-Interface