Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to install ocPortal on an Ubuntu 14.04 VPS

ocPortal is a free and open source content management system (CMS) written in PHP and it uses a MySQL database to store the data. It can be thoroughly customized and it comes with lots of website features which can help you customize your online store, create an interactive website and incorporate business. In this tutorial we will show you how to install ocPortal on an Ubuntu Virtual Server with the Apache web server, PHP and MariaDB.

At the time of writing this tutorial, ocPortal 9.0.21 is the latest stable version available and it requires:

  • Apache web server
  • PHP (version 4.2.0 or better) with GD graphics support
  • MySQL(version 4.1.0 or better) installed on your Linux Virtual Server.

Installation instructions:

Log in to your virtual server via SSH

ssh user@virtual_server_IP

Update the system

[user]$ sudo apt-get update && sudo apt-get -y upgrade

Install MariaDB 10.0

To install MariaDB, run the following command:

[user]$ sudo apt-get install -y mariadb-server

Next, we need to create a database for the ocPortal installation:

[user]$ mysql -uroot -p

MariaDB [(none)]> CREATE DATABASE ocportal;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON ocportal.* TO 'ocportaluser'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Do not forget to replace ‘your-password’ with a strong password.

Install Apache2 web server

[user]$ sudo apt-get install apache2

Install PHP and required PHP modules

To install the latest stable version of PHP and all necessary modules, run the following command:

[user]$ sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-gd

Download and extract the latest version of ocPortal on your server

[user]$ sudo cd /opt && wget http://ocportal.com/site/dload.php?id=1054
[user]$ sudo mv dload.php?id=1054 ocportal.zip
[user]$ sudo mkdir ocportal
[user]$ sudo unzip ocportal.zip -d ocportal/
[user]$ sudo mv ocportal/ /var/www/html/

All files have to be readable by the web server, so we need to set the proper ownership:

[user]$ sudo chown www-data:www-data -R /var/www/html/ocportal

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘ocportal.conf’ on your virtual server:

[user]$ sudo touch /etc/apache2/sites-available/ocportal.conf
[user]$ sudo ln -s /etc/apache2/sites-available/ocportal.conf /etc/apache2/sites-enabled/ocportal.conf
[user]$ sudo nano /etc/apache2/sites-available/ocportal.conf

Then, add the following lines:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/ocportal/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/ocportal/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Restart the Apache web server for the changes to take effect:

[user]$ sudo service apache2 restart

Open your favorite web browser, navigate to http://your-domain.com/install.php and if you configured everything correctly the ocPortal installer should be starting. You should follow the easy instructions on the install screen inserting the necessary information as requested.

Do not forget to remove the ‘install.php’ file on your server after finishing the installation:

rm -rf /var/www/html/ocportal/install.php

Once you finish the installation you can access the admin section at:

http://yourdomain.com/adminzone/

Of course you don’t have to do any of this if you use one of our Linux Virtual Server Hosting services, in which case you can simply ask our expert Linux admins to install ocPortal for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.



This post first appeared on Virtual-Server.org Virtual Server, please read the originial post: here

Share the post

How to install ocPortal on an Ubuntu 14.04 VPS

×

Subscribe to Virtual-server.org Virtual Server

Get updates delivered right to your inbox!

Thank you for your subscription

×