Revive is a free and open source ad serving the application. It is written in PHP and uses MySQL or PostgreSQL to store its data. It enables publishers, ad networks, and advertisers to serve ads on different platforms such as desktop and mobile sites, in apps or in video players. It collects detailed statistics about impressions, clicks, and conversions. You can also use Google AdSense with Revive Adserver. It provides easy to use web interface to manage ad campaigns for multiple advertisers and ad networks. You can easily track and report campaign performance, including click-through rates, conversion rates, revenue, and conversion details etc.
In this tutorial, we will install Revive Adserver on CentOS 7 server.
Revive does not require any special hardware requirements. It can be installed on servers with a very small amount of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Once you have your system updated, you can proceed to install the LAMP stack. Start the LAMP installation by installing Apache web server and MariaDB, which is a fork of MySQL using the following command.
Revive can be installed on any version of PHP greater than 5.6. You can install PHP 7 for high performance. PHP 7 is not included in default YUM repository, hence you will need to add the Webtatic repository in your system. Webtatic repository requires EPEL repository to work. Run the following command to install EPEL repository.
yum -y install epel-releaseyum -y update
Now install Webtatic repository using the following commands.
Once you have PHP installed, you can check the version of PHP using the following command.
You should get output similar to this.
[root@liptan-pc ~]# php -v
PHP 7.1.4 (cli) (built: Apr 15 2017 08:07:03) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies
Now start Apache web server and enable it to start at boot time using the following command.
systemctl start httpdsystemctl enable httpd
To start MariaDB and enable it to start at boot time using the following commands.
systemctl start mariadbsystemctl enable mariadb
Now run the following commands to secure your MySQL or MariaDB installation.
It will run a small script which asks you to set a root password for your MariaDB installation. Most of the questions are self-explanatory and you should answer yes to all the questions.
As we have all the dependencies ready we can now create a database to store the data of Revive. To create a database we will need to login to MySQL command line first. Run the following command for same.
mysql -u root -p
This will prompt you for the password, provide the root password of MySQL which you have set earlier. Now run the following query to create a new database for your Revive installation.
CREATE DATABASE revive_data;
The above query will create a database named revive_data. Once the database is created you can create a new user and grant all the permissions to the user for the database. Using root user is not recommended for the databases. To create a new database user, run the following query.
CREATE USER 'revive_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username revive_user. Replace StrongPassword with a strong password. Now provide the appropriate privileges to your database user over the database you have created. Run the following command.
GRANT ALL PRIVILEGES ON revive_data.* TO 'revive_user'@'localhost';
Now run the following command to immediately apply the changes on the database privileges.
Exit from MySQL prompt using exit command.
As we have all the dependencies ready, we can now download the install package from the Revive site.
cd /var/wwwwget https://download.revive-adserver.com/revive-adserver-4.0.2.zip -O revive.zip
The above command will download the installer archive and store it as revive.zip file. You can always look for the latest release by going to the Revive download page.
Extract the archive using the following command.
If you don't have unzip installed, you can run yum -y install unzip. The above command will extract the content of the archive to revive-adserver-4.0.2 directory. Rename the directory to revive using following command.
mv revive-adserver* revive
Now create a virtual host for the Revive application. Run the following command for same.
Paste the following lines into the file.
Options Indexes FollowSymLinks
Allow from all
Require all granted
CustomLog "/var/log/httpd/ad.yourdomain.com-access_log" combined
Replace ad.yourdomain.com with any domain or subdomain you want to use to access the application. Save the file and exit from the editor. Run the following command to restart your Apache server.
systemctl restart httpd
Now you will need to provide the ownership of the application to web server user using the following command.
chown -R apache:apache /var/www/revive
You may also need to allow HTTP traffic on port 80 through the firewall if you are running one. Run the following commands for same.
You will also need to disable SELinux. To temporary disable SELinux without restarting the server, run the following command.
To completely disable the SELinux you will need to edit /etc/selinux/config file.
If you don't have nano installed, you can install it using yum -y install nano Find the following line:
Change it to:
Now complete the installation using a web browser, go to the following link using your favorite web browser.
You will see the following welcome page.
The first page is displaying GNU license agreements, click I Agree to proceed further. In next interface, you will be asked to provide the database details to store your Revive data.
Provide the database name, username, and password as created earlier. Click Continue once done. If the database details are accurate, you will be taken to next interface, if not, you will be shown an error. In next interface, you will need to create and administrator account.
Provide the username for the administrator account, provide administrator password and email. Select the language and timezone for your application. Finally, click Continue to proceed to next step.
The application will be installed now along with the installation of few plugins. Once installed, you will be taken to the administrative dashboard.
In this tutorial, we learned how to install Revive Adserver on CentOS 7. You can now easily serve ads in different platforms like desktop and mobile websites, applications and videos.
Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.
Do you need to increase the memory limit in WordPress? Getting an error about memory Exhausted? The memory limit is one of the most common WordPress errors as the default limit of memory in WordPress is only set to 64mb! But there’s good news! The Memory Exhausted error is one...
A vulnerability has been discovered in the “All In One WordPress Migration” WordPress plugin. All versions earlier than, and including 6.97 contain a vulnerability which allows Cross-Site Scripting (XSS).With over 2 million active installations, this vulnerability has the potential to be high impact, however, this is lessened by the nature...
HostPresto will be launching a European point of presence in the coming weeks, specifically in Amsterdam. For customers needing their data located within the EU still please contact support to request migration to this location with ticket subject ‘EU Migration’. We will ensure this is actioned well before the Brexit...