In this tutorial, we will cover the steps to install Open Source Event Manager (OSEM) on Ubuntu Server.
Before starting with the installation of OSEM, update your system by running the following command:
sudo apt-get update
sudo apt-get upgrade
OSEM requires several packages to be installed before starting the installation process. To install them, run the following command:
sudo apt-get install -y build-essential libsqlite3-dev libmysqlclient-dev libpostgresql-dev libsasl2-dev libxml2-dev libxslt-dev libffi-dev libyaml-dev zlib1g-dev
We will use Git to clone the OSEM repository from Github. To install Git, run:
sudo apt-get install -y git
Clone the OSEM repository from Github using the following command:
git clone https://github.com/openSUSE/osem.git
Navigate to the cloned directory by running:
cd osem
OSEM is written in Ruby, and therefore, we need to install Ruby to run OSEM. By default, Ubuntu has Ruby preinstalled. You can confirm the version of Ruby installed on your system by running:
ruby -v
If Ruby is not installed already, run the following command:
sudo apt-get install ruby-full
Bundler is a Ruby gem that manages the applications' dependencies. To install Bundler, run:
sudo gem install bundler
OSEM has some dependencies that need to be installed before running the server. Install these dependencies by running:
bundle install
Create a database for OSEM using MySQL or PostgreSQL.
For MySQL, run:
sudo apt-get install mysql-server
mysql -u root -p
CREATE DATABASE osem CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'osem'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON osem.* TO 'osem'@'localhost';
For PostgreSQL, run:
sudo apt-get install postgresql
sudo su - postgres
psql
create database osem;
create user osem with password 'password';
grant all privileges on database osem to osem;
We need to set up some environment variables before running OSEM. Run the following commands to set up environment variables:
export RAILS_ENV=production
export OSEM_SECRET_TOKEN=$(openssl rand -hex 64)
export OSEM_DB_ADAPTER=mysql2 #(For MySQL)
export OSEM_DB_ADAPTER=postgresql #(For PostgreSQL)
export OSEM_DB_DATABASE=osem
export OSEM_DB_USERNAME=osem
export OSEM_DB_PASSWORD=password
To create the database schema, execute the following command:
bundle exec rake db:migrate
Finally, we can start the OSEM server using the following command:
bundle exec rails server -b 0.0.0.0 -e production
You can now access OSEM by visiting http://your_server_ip:3000
Congratulations, you have successfully installed OSEM on Ubuntu Server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!