Install on Ubuntu
These instructions will walk you through setting up LAMP (Linux Apache Mysql PHP) software and install OpenCATS on a Ubuntu machine. These instructions will work with a VPS, or a home/office machine.
Ubuntu -Installing pre-reqs¶
Note
mysql and mariadb have diverged somewhat in base functionality. Whereas MariaDB and MySQL were interchangable in previous releases, now only MariaDB is supported. If you need to move from MySQL to MariaDB it's as simple as installing MariaDB over MySQL.
$ sudo apt-get update
$ sudo apt-get install mariadb-server mariadb-client
$ sudo mysql_secure_installation
$ sudo apt-get install apache2
Note for PHP 7.2 Versions higher than PHP7.2 are not currently supported
1: add the PPA maintained by Ondrej Surý
2: install PHP versions 7.2
3: Select the standard version of PHP
$ sudo apt-get install php7.2 php7.2-soap php7.2-ldap
$ sudo apt-get install php7.2-mysqli php7.2-gd php7.2-xml
$ sudo apt-get install php7.2-curl php7.2-mbstring php7.2-zip
$ sudo service apache2 restart
Setting up your MySQL/MariaDB database¶
Note
This is the backend database that stores all your OpenCATS information. You likely will NOT be messing with this much after installation unless you choose to. The login/password you set up here will NOT be the same as your login/password for OpenCATS.
NOTE: The default encoding for new databases in MariaDB is latin-1 which will have problems with non-english characters. If you will encounter any non-english characters, please creaet your databases with UTF-8 encoding (shown in bold, below)
$ sudo mysql -u root -p
It will ask you for your Ubuntu Root password
Then it will ask you for your mysql root password
You should see a prompt like this:
MariaDB [(none)]>
MariaDB [(none)]>
CREATE USER
‘opencats’@’localhost
’ IDENTIFIED BY ‘databasepassword’;
MariaDB [(none)]>
CREATE DATABASE opencats;
OR WITH UTF-8;CREATE DATABASE opencats CHARACTER SET utf8 COLLATE utf8_general_ci
;
MariaDB [(none)]>
GRANT ALL PRIVILEGES ON opencats.* TO
‘opencats’@’localhost
’ IDENTIFIED BY ‘databasepassword’;
MariaDB [(none)]>
exit;
Note
Make sure you don’t forget the ; on the end of every line!
Download the OpenCATS files¶
$ cd /var/www/html
$ sudo unzip opencats-0.9.6-full.zip
$ sudo mv opencats-0.9.6 opencats
$ rm /var/www/html/opencats/INSTALL_BLOCK
Note
By default in this documentation for OpenCATS version 0.9.6 the directory would be opencats
. You can name it whatever you want. Just remember that all of the directory locations from here on must match the name of the directory you create, including capitol letters.
Note
If you have tried installing OpenCATS before, or for any reason see something called INSTALL_BLOCK in this directory, you MUST delete it. This will prevent OpenCATS from running the installer. The command for that would be $ sudo rm INSTALL_BLOCK
.
Server and Directory permissions¶
$ sudo chown www-data:www-data opencats
$ sudo chown -R www-data:www-data opencats
$ sudo chmod 770 opencats/attachments
$ sudo chmod 770 opencats/upload
Now go to Run the installer
Last updated