{"id":19027,"date":"2016-04-29T07:39:53","date_gmt":"2016-04-29T12:39:53","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=19027"},"modified":"2022-12-29T11:17:10","modified_gmt":"2022-12-29T17:17:10","slug":"install-osclass-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-osclass-on-a-centos-7-vps\/","title":{"rendered":"Install Osclass on a CentOS 7 VPS"},"content":{"rendered":"
Osclass is a popular open source project that allows you to easily create and manage your own classifieds website without any technical knowledge. This PHP application is used by thousands of users around the world for creating job listing, sales listing, real estate and other similar listing websites. In this tutorial we will guide you through the installation of Osclass on a CentOS 7 VPS<\/a> with Apache, PHP and MariaDB.<\/p>\n To start the Osclass installation, login to your CentOS 7 server as user root<\/p>\n and run the following command from the terminal to update all installed packages<\/p>\n Next, install Apache web server<\/p>\n Once the installation of the Apache web server is completed, start it and make it to start automatically on boot.<\/p>\n Osclass is written in the PHP programming language, so we need to install PHP and a few PHP extensions<\/p>\n Run the following command on your terminal to install MariaDB server on your CentOS 7 server<\/p>\n Once the installation of the database server is completed start the MariaDB server and set it to start on system boot<\/p>\n Then, run the Osclass requires an empty database, so login to the MariaDB server with the root user and create a new user and database that will be used by Osclass to store information<\/p>\n Don\u2019t forget to replace \u2018PASSWORD\u2019 with an actual strong password of your choice.<\/p>\n Go to the official Osclass website and download the latest release of their application<\/p>\n Create a new directory for Osclass in the document root directory on your server and unpack the downloaded ZIP archive to the that directory<\/p>\n Set the Apache user to be owner of the Osclass files and directories<\/p>\n On the next step we will create Apache virtual host for your Osclass based website. Create a \u2018\/etc\/httpd\/conf.d\/vhosts.conf\u2019 file with the following content:<\/p>\n Create a \u2018vhosts.d\/\u2019 directory:<\/p>\n and create the virtual host with the following content:<\/p>\n Save the changes and restart the Apache web server for the changes to take effect.<\/p>\n With this step the installation of Osclass from the command line is completed. We need to access the Osclass installation script at\u00a0 http:\/\/yourdomain.com\/index.php and follow the on-screen instructions to finish the Osclass installation.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Osclass<\/strong> for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS<\/strong><\/span>. 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.<\/p>\n","protected":false},"excerpt":{"rendered":" Osclass is a popular open source project that allows you to easily create and manage your own classifieds website without … <\/p>\nssh root@IP<\/pre>\n
yum -y update<\/pre>\n
yum -y install httpd<\/pre>\n
systemctl start httpd\r\nsystemctl enable httpd<\/pre>\n
yum -y install php php-mysql<\/pre>\n
yum -y install mariadb mariadb-server<\/pre>\n
systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\n
mysql_secure_installation<\/code> script. This script will help you improve the security of your MariaDB installation and set your MariaDB root password.<\/p>\n
mysql -u root -p\r\n\r\nCREATE DATABASE osclass;\r\nCREATE USER 'osclassuser'@'localhost' IDENTIFIED BY 'PASSWORD';\r\nGRANT ALL PRIVILEGES ON `osclass`.* TO 'osclassuser'@'localhost';\r\nFLUSH PRIVILEGES;\r\nexit<\/pre>\n
wget https:\/\/static.osclass.org\/download\/osclass.3.6.1.zip<\/pre>\n
mkdir \/var\/www\/html\/osclass\r\nunzip osclass.3.6.1.zip -d \/var\/www\/html\/osclass<\/pre>\n
chown -R apache: \/var\/www\/html\/osclass<\/pre>\n
IncludeOptional vhosts.d\/*.conf<\/pre>\n
mkdir \/etc\/httpd\/vhosts.d\/<\/pre>\n
vim \/etc\/httpd\/vhosts.d\/yourdomain.com.conf\r\n\r\n<VirtualHost YOUR_SERVER_IP:80>\r\nServerAdmin webmaster@yourdomain.com\r\nDocumentRoot \"\/var\/www\/html\/osclass\/\"\r\nServerName yourdomain.com\r\nServerAlias www.yourdomain.com\r\nErrorLog \"\/var\/log\/httpd\/yourdomain.com-error_log\"\r\nCustomLog \"\/var\/log\/httpd\/yourdomain.com-access_log\" combined\r\n\r\n<Directory \"\/var\/www\/html\/osclass\/\">\r\nDirectoryIndex index.html index.php\r\nOptions FollowSymLinks\r\nAllowOverride All\r\nRequire all granted\r\n<\/Directory>\r\n<\/VirtualHost><\/pre>\n
systemctl restart httpd<\/pre>\n
\n