{"id":18136,"date":"2015-12-07T15:10:42","date_gmt":"2015-12-07T21:10:42","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=18136"},"modified":"2022-12-15T10:14:25","modified_gmt":"2022-12-15T16:14:25","slug":"install-habari-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-habari-on-a-centos-7-vps\/","title":{"rendered":"Install Habari on a CentOS 7 VPS"},"content":{"rendered":"
Habari is a free and open source publishing platform and application framework with a modular, object-oriented Core. In this guide we will install Habari on a CentOS 7 VPS<\/a> with Apache, MariaDB and PHP. Its installation is pretty easy and straightforward.<\/p>\n To start the installation of Habari, log in to your server as user root:<\/p>\n and as usual, run the following command to make sure that all packages on your CentOS 7 VPS are up to date:<\/p>\n Now, we will install Apache web server:<\/p>\n Once it is installed, start Apache and set it to start on system start up:<\/p>\n Habari is PHP based application, so we will install PHP among with few PHP modules required by the application:<\/p>\n Habari requires already created empty database. It supports multiple database backends but in this tutorial we will install and use MariaDB. Run the following commands to install MariaDB on your server:<\/p>\n Start the MariaDB server and enable it to start on system start up:<\/p>\n Run the Now, log in to the MariaDB server\u00a0 using user \u2018root\u2019\u00a0 and create new database and user for Habari:<\/p>\n Don’t forget to replace \u2018PASSWORD\u2019 with an actual strong password.<\/p>\n Go to Habari’s official website and download the latest stable version of the application. At the moment of writing this article it is version 0.9.2.<\/p>\n Create a directory for Habari’s installation and unpack the zip arhive to the document root directory on your server:<\/p>\n Change the ownership of the ‘\/var\/www\/html\/habari\/’ directory:<\/p>\n Create Apache virtual host for your website. First create \u2018\/etc\/httpd\/conf.d\/vhosts.conf\u2019 file with the following content:<\/p>\n and create the virtual host:<\/p>\n Restart the Apache web server for the changes to take effect:<\/p>\n Now, open your favorite web browser and point it to 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 Habari<\/strong> for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS<\/span>.<\/strong> 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":" Habari is a free and open source publishing platform and application framework with a modular, object-oriented Core. In this guide … <\/p>\nssh root@IP<\/pre>\n
yum -y update<\/pre>\n
yum install httpd<\/pre>\n
systemctl start httpd\r\nsystemctl enable httpd<\/pre>\n
yum -y install php php-pdo php-common php-mbstring php-gd php-mysql<\/pre>\n
yum install mariadb mariadb-server<\/pre>\n
systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\n
mysql_secure_installation<\/code> script to secure the database server and set your MariaDB root password.<\/p>\n
mysql -u root -p\r\n\r\nCREATE DATABASE habari;\r\nCREATE USER 'habariuser'@'localhost' IDENTIFIED BY 'PASSWORD';\r\nGRANT ALL PRIVILEGES ON `habari`.* TO 'habariuser'@'localhost';\r\nFLUSH PRIVILEGES;\r\nexit<\/pre>\n
wget http:\/\/habariproject.org\/dist\/habari-0.9.2.zip<\/pre>\n
mkdir -p \/var\/www\/html\/habari\r\nyum -y install unzip\r\nunzip habari-0.9.2.zip -d \/var\/www\/html\/habari\/<\/pre>\n
chown -R apache:apache \/var\/www\/html\/habari\/<\/pre>\n
vim \/etc\/httpd\/conf.d\/vhosts.conf\r\n\r\nIncludeOptional vhosts.d\/*.conf<\/pre>\n
mkdir \/etc\/httpd\/vhosts.d\/\r\nvim \/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\/habari\/\"\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\/habari\/\">\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<p\/re><\/pre>\n
http:\/\/yourdomain.com<\/code> to run the web installer. You will have to choose your database type and enter the necessary information to complete the installation.<\/p>\n