16.1 C
Texas
angeloma
Senior Writer and partner

How to install Open Classifieds on Ubuntu 18.04?

On many occasions, it is necessary to have a classified platform. Ideal if we have an SME and need the publication of some commercial requirements that essence is classified. in the light of this, Linux each time has many applications oriented to commercial productivity. In other words, there is an application that does this to you without much effort on our server. In this post, I will show you how to install Open Classifieds on Ubuntu 18.04.

Open Classifieds is the form name of Yclas. It is an application written using PHP language and requires a database manager that allows you to deploy a classified website for our company. One of the great advantages of Open Classifieds is that it is quite light and fast but this does not take away its power. Today the application is a reference in its area. On the other hand, it is open source which makes it possible for us to examine your source code for potential vulnerabilities.

So, let us install Open Classifieds on Ubuntu.

Install Open Classifieds on Ubuntu 18.04

We will now begin the installation process. For this, we require Apache web server, MariaDB and PHP. Then, we will download the Open Classifieds installer.

1.- Install Apache2 and PHP 7.2

- Advertisement -

Open Classifieds requires a web server to run. It is logical if we take into account that it is a web application. At the same time, we will have to install PHP for its running. We can do this with the following command:

:~$ sudo apt install apache2 php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mysql php7.2-gmp php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-gd php7.2-soap php7.2-xml php7.2-cli php7.2-zip

1.- Install Apache and PHP on Ubuntu 18.04
1.- Install Apache and PHP on Ubuntu 18.04

At the end of the installation, it is necessary to modify some PHP configuration parameters. This to ensure that the application runs correctly.

:~$ sudo nano /etc/php/7.2/apache2/php.ini

In this file, you change the following parameters.

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360

Note: You can use CTRL + W to find the lines quickly.

Next, press CTRL + O to save the changes and CTRL + X to close it.

Then, it is time to test PHP. To do it, create a new file on /var/www/html/ called test.php and add the following.

:~$ sudo nano /var/www/html/test.php
<?php
phpinfo();
?>

2.- PHP info
2.- PHP info

Finally, open the file using the web browser. http://your-server/test.php

3.- PHP working on Ubuntu 18.04
3.- PHP working on Ubuntu 18.04

So, PHP is working.

2.- Install MariaDB

MariaDB is a MySQL fork. Practically 100% compatible but with better community support and by Linux distributions today.

:~$ sudo apt install mariadb-server

4.- Install MariaBD on Ubuntu 18.04
4.- Install MariaDB on Ubuntu 18.04

Next, set the root password for MariaDB.

:~$ sudo mysql_secure_installation

However, not only the root password can be defined, but also other settings as you can see in the image.

5.- Using mysql_secure_installation script
5.- Using mysql_secure_installation script

Now you have to create the user and the database dedicated to Open Classifieds. To do this we must enter the MariaDB console.

:~$ sudo mysql -u root -p
> CREATE DATABASE openclassifieds;
> GRANT ALL PRIVILEGES ON openclassifieds.* TO 'openuser'@'localhost' IDENTIFIED BY 'openpss';
> FLUSH PRIVILEGES;
exit;

6.- Creating the user and database for Open Classifieds
6.- Creating the user and database for Open Classifieds

Now, we can install Open Classifieds.

3.- Install Open Classifieds (I)

Now, we can install the free version of the application. These features are enough for most users.

:~$ cd /tmp/
:~$ wget https://github.com/yclas/yclas/archive/master.zip

 

7.- Download and install Open Classifieds on Ubuntu 18.04
7.- Download and install Open Classifieds on Ubuntu 18.04

Then, decompress it. And move it to the Apache folder.

 

:~$ sudo apt install unzip -y
:~$ unzip master.zip
:~$ sudo mv yclas-master /var/www/html/yclas

After that, you have to set the right permissions to the application.

:~$ sudo chown -R www-data:www-data /var/www/html/yclas/
:~$ sudo chmod -R 755 /var/www/html/yclas/

Now, we need to create a new virtual host for Open Classifieds.

:~$ sudo nano /etc/apache2/sites-available/yclas.conf

And add the following:

<VirtualHost>
ServerAdmin [email protected]
DocumentRoot /var/www/html/yclas
ServerName your-domain.com
ServerAlias www.your-domain.com
     <Directory /var/www/html/yclas/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

8.- Creating a new virtualhost
8.- Creating a new virtualhost

Do not forget to replace “your-domain” with yours. Then, save the changes and close the file.

After that, enable the new virtualhost, the Apache rewrite module and restart the Apache service.

:~$ sudo a2ensite yclas
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2

Now, complete the installation using the web interface.

4.- Install Open Classified using the web interface (II)

Open your web browser and go to your server to complete the installation. First, the installer will check for the requirements.

9.- Install Open Classified on Ubuntu 18.04
9.- Install Open Classified on Ubuntu 18.04

Then, type the MariaDB credentials.

10.- Type your MariaDB credentials
10.- Type your MariaDB credentials

Now, configure the site.

11.- Configuring the new site
11.- Configuring the new site

At the end of the installation, you will be able to visit the site and log in.

12.- Installation complete
12.- Installation complete

So, you can check your new site.

13.- Open Classifieds is correctly installed
13.- Open Classifieds is correctly installed

So, enjoy it.

Conclusion

Open Classifieds is a great tool aimed at providing solutions to companies of many sizes. However, the installation is not complicated at all and we can take advantage of the application to deploy our classified page quickly and easily.

Please share this post with your friends.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article