Opencast is a free and open-source web-based application for automated video capture, processing, management, and distribution. It is a Java-based app that uses a database to store its content. It also allows you to build and trim video recordings, schedule events to automatically record based on a pre-defined timetable, and capture both video(s) of the presenter. OpenCast is a very popular software and many organizations and universities are using it to record and schedule events and seminars. For more about Opencast, please visit its homepage. When you’re ready to install OpenCast on Ubuntu, follow the steps below:

Update Ubuntu and Install Dependencies

Opencast required several dependencies including, Tesseract, sox, etc. To get started, run the commands below to update Ubuntu and install the required dependencies. You’ll also want the FFmpeg app if you’re going to be editing video files. To install, run the commands below to add the FFmpeg repository to Ubuntu and install it. To verify if FFmpeg is installed, run the commands below: It should output similar lines as shown below: Continue below with the setup.

Install OpenJDK 8

OpenCast is a Java-based app so you’ll need Java installed. First, download the Java 8 Development Kit: either the official Oracle JDK or Open JDK For this tutorial, we’re going to install OpenJDK. To do that, run the commands below: After installing Java, you can verify it by running the commands below: It should output something similar as shown below: After, continue below to install Maven.

Download and Install Maven

After installing OpenJDK version 8 above, use the steps below to download Maven. You will also need the latest version of Maven (at least version 3.6.3, version 3.6.3 is recommended). Next, go and download Apache Maven latest from its download page. The recommended version of Apache Maven is 3.6.3. Make sure to check the Maven download page to see if a newer version is available for you to download. If there are, select those and download them instead. Run the commands below to download version 3.6.3. Next, run the commands below to extract the downloaded package to the /opt directory. If you want to have separate versions and update them as they become available, create a symbolic link to the version folder. When the next version is released. all you have to do is update the symbolic link to reference the new release folder by running the command above and updating the release number in the folder name. Setup Maven Environment Variables After downloading and extracting the Maven package, go and set up its environment variables. To do that, run the commands below: Then copy and paste the lines below and save them into the file. Finally, run the commands below to update and load the changes. Now run the commands below to check the version number. You should see the content below.

Installing ActiveMQ

Apache ActiveMQ is an open-source message broker system. Opencast requires ActiveMQ as a message relay for the administrative user interface. Run the commands below to download ActiveMQ from the Apache office package repository. At the time of this writing, the current version was 5.15.8. After that, extract the downloaded folder and move its content to the /opt directory and create a folder called activemq To run ActiveMQ effectively, you’ll want to create dedicated user and group accounts. Simply run the commands below to create a username activemq as well as a group name. Next, change the ownership of the /opt/activemq directory so the user can have full control of the content there. After that, you will also want to create an ActiveMQ systemd service so you can control starting, stopping, and enabling its service. To do that, simply run the commands below to create a service file. Then copy the content below into the file and save it. After saving it, run the commands below to enable the service. To verify if the service is functioning, run the commands below to check it. You should see similar output as below: After installing ActiveMQ, its default configuration file is located at /opt/activemq/conf/activemq.xml. You can open it and modify it to fit your environment. After making changes to the file, restart the ActiveMQ service by running the commands below:

Install MariaDB Database

OpenCast needs a database server to store its content. and MariaDB database server is a great place to start when looking at open-source database servers to use with OpenCast. To install MariaDB run the commands below. After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service always to start up when the server boots. Run these on Ubuntu After that, run the commands below to secure the MariaDB server by creating a root password and disallowing remote root access. When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]:  Y Reload privilege tables now? [Y/n]:  Y

Restart MariaDB server To test if MariaDB is installed, type the commands below to logon into the MariaDB server You should see similar messages below: Now that you’ve installed all the packages that are required, continue below to start configuring the servers. First, create a blank OpenCast database. Run the commands below to log on to MariaDB. When prompted for a password, type the root password you created above. Then create a database called opencast Create a database user called opencastuser with a new password Then grant the user full access to the opencast database. Finally, save your changes and exit.

Install OpenCast

For this tutorial, we’re going to be creating a new user account for OpenCast. This user will be used to run the Opencast process. It is recommended to run OpenCast services as non-root. To create a user account named opencast with /opt/opencast home directory, run the commands below: Download the Opencast Source code using Git, then change it into its source directory. You’ll want to get the latest version checked out. To see a list of available releases, use the commands below: You should see a list of all releases with the most recent release at the end. Check out the latest release using the following command. Next, build the code using Apache Maven by running the commands below: It may take some time to build the code, depending on the speed of your machine. This process will create all binaries for OpenCast and installer modules. After a successful build, you should see a similar message as below: Change into the build folder, extract the allinone tar archive and move it to the OpenCast home directory. They give OpenCast’s user ownership of its home folder. Import the database schema and initial data for Opencast installation by running the commands below: Next, edit the Opencast configuration file to make a few changes in the configuration. Make the highlighted changes and save the file. Save the file and exit. Next, open the OpenCast web server configuration file. Set the listening address to 0.0.0.0 so that the application can be accessed outside the network. Run the commands below to use Opencast configurations for Apache ActiveMQ. First, create a backup of the current ActiveMQ configuration file. Next, copy the OpenCast configuration file to its location specified below: The default Opencast ActiveMQ configuration disables the web administration console. You’ll have to enable it. Run the commands below to open the file. Scroll down and un-comment the highlighted line below Save the file and exit, then restart ActiveMQ. Next, copy the Opencast startup script to easily start and manage the Opencast server processes. Reload the Systemd units, start and enable its service. To check the OpenCast service status, run the commands below: It should output similar messages as below: Finally, browse the server’s hostname or IP address followed by port 8080. You should see the OpenCast login page. Login with username and password: Username: admin Password: opencast That’s it! Conclusion: This post showed you how to install and configure OpenCast on Ubuntu 18.04 | 16.04. If you find any error above, please use the form below to report it. Thanks,