Install ocPortal on VPS CentOS – ocportal is a free and open source, PHP-based content management system. It can be completely customized and is equipped with many features of the site out of the box. In this tutorial we will be installing CentOS VPS at ocPortal with Apache web server, PHP and MariaDB.

Ocportal is a CMS for free with open source code based programs. In the official site mentioned some of them, namely the length of oc online content, online community, online contribution, online collaboration, online corporate, online commerce, online creative and online communication. ocportal is written in PHP language with MySQL database support.
- First update your system and install the required packages:
# yum -y update
# yum -y install wget unzip
2. The second step is to Install an Apache web server:
# yum install httpd
3. Start the web server and allows to start the boot:
# systemctl start httpd.service
# systemctl enable httpd.service
4. Install PHP and some additional PHP modules:
# yum install php php-fpm php-cli php-mbstring php-gd php-curl php-pdo php-xml
5. Next, we will install the MariaDB server by running the following command:
# yum install mariadb-server mariadb
6. To start the MariaDB and activate it at the time of boot run:
# systemctl start mariadb.service
# systemctl enable mariadb.service/
7. In order to secure server MariaDB and set MySQL ‘ root ‘ password, run the following command:
# mysql_secure_installation
8. Once you are done with the above steps, log in as root MariaDB and create a new database and user:
# mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE ocportal;
MariaDB [(none)]> GRANT ALL ON ocportal.* to ocportaluser@localhost identified by ‘YOURPASSWORD’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
9. Don’t forget to replace the ‘ password ‘ with a strong password. Now, create a new directory for ocPortal in the document root directory on your server.
# mkdir /var/www/html/domain.com
# cd /var/www/html/domain.com
10. and go to the official website of ocPortal and then download the latest version and stable. At the time of writing this article was version 9.0.15. Unpack the downloaded zip archive.
# unzip ocportal_manualextraction_installer-9.0.15.zip
11. Set the correct ownership:
# chown -R apache:apache /var/www/html/domain.com/
12. Create a virtual host directive for your domain in the web server configuration file:
# /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/html/domain.com
ServerName domain.com
ErrorLog logs/domain.com-error_log
CustomLog logs/domain.com-access_log common
</VirtualHost>
13. Restart Apache and Done:
# systemctl restart httpd