AMP AMP

How to install Baun CMS on Linux Debian 11.3

To Install Baun CMS On Linux Debian 11.3.

Introduction:

The Baun CMS is an open-source, lightweight, and extensible flat-file CMS written in PHP. It is ideal for small websites. A flat-file CMS system is characterized by simplicity, portability, security, speed, and version control.

Requirements for Baun CMS:

Apache

MySQL

PHP and its Modules

Installation Procedure:

Step 1: Check the version of the Debian by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Step 2: Download the Baun CMS package by using the below command

root@linuxhelp:~# wget https://github.com/BaunCMS/Baun/archive/1.3.2.zip
--2022-06-24 01:16:32--  https://github.com/BaunCMS/Baun/archive/1.3.2.zip
Resolving github.com (github.com)... 13.234.210.38
Connecting to github.com (github.com)|13.234.210.38|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/BaunCMS/Baun/zip/refs/tags/1.3.2 [following]
--2022-06-24 01:16:32--  https://codeload.github.com/BaunCMS/Baun/zip/refs/tags/1.3.2
Resolving codeload.github.com (codeload.github.com)... 13.127.152.42
Connecting to codeload.github.com (codeload.github.com)|13.127.152.42|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘1.3.2.zip’

1.3.2.zip                      [ <=>                                    ]  26.38K   141KB/s    in 0.2s    

2022-06-24 01:16:33 (141 KB/s) - ‘1.3.2.zip’ saved [27014]

Step 3: Extract the baun command by using the below command

root@linuxhelp:~# unzip 1.3.2.zip
unzip 1.3.2.zip
Archive:  1.3.2.zip
a9e698e9e16e8a9785b95bdc89eeee0c487d78ee
   creating: Baun-1.3.2/
  inflating: Baun-1.3.2/.gitignore   
  inflating: Baun-1.3.2/CHANGELOG.md  
  inflating: Baun-1.3.2/LICENSE      
  inflating: Baun-1.3.2/README.md    
  inflating: Baun-1.3.2/auto-install.php  
  inflating: Baun-1.3.2/baun         
   creating: Baun-1.3.2/cache/
 extracting: Baun-1.3.2/cache/.gitignore  
  inflating: Baun-1.3.2/composer.json  
  inflating: Baun-1.3.2/content/index.md  
   creating: Baun-1.3.2/public/

Step 4: Now list the files by using the below command

root@linuxhelp:~# ls
1.3.2.zip  Baun-1.3.2

Step 5: Now move the baun CMS directory to apache root directory by using the below command

root@linuxhelp:~# mv Baun-1.3.2 /var/www/baun

Step 6: Now set the ownership and permission to baun root directory by using the below command

root@linuxhelp:~# chown -R www-data.www-data /var/www/baun/
root@linuxhelp:~# chmod -R 755 /var/www/baun/

Step 7: Now configure the virtualhost for access the baun CMS by using the below command

root@linuxhelp:~# vi /etc/apache2/sites-available/baun.conf

<virtualhost *:80>
        Servername www.linuxhelp1.com
        Documentroot /var/www/baun
<directory /var/www/baun>
allowoverride all
allow from all
</directory>
</virtualhost>

Step 8: Now move into the baun directory and install the composer package by using the below command

root@linuxhelp:~# cd /var/www/baun

Step 9: Use the following command

root@linuxhelp:/var/www/baun# apt install composer
apt install composer
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  jsonlint php-composer-ca-bundle php-composer-semver php-composer-spdx-licenses
  php-composer-xdebug-handler php-json-schema php-psr-container php-psr-log php-react-promise
  php-symfony-console php-symfony-filesystem php-symfony-finder php-symfony-polyfill-php80
  php-symfony-process php-symfony-service-contracts
  co
After this operation, 3,963 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Generating autoload files
5 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Now run the composer file by using the below  command
root@linuxhelp:/var/www/baun# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
.
.
.
Writing lock file
Generating autoload files
5 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Step 10: Enter the Virtual Host

root@linuxhelp:nano /etc/hosts
127.0.0.1 www.linuxhelp1.com

Step 11: Now disable the default site access by using the below command

root@linuxhelp:/var/www/baun# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Step 12: Now enable the site access for baun CMS by using the below command

root@linuxhelp:/var/www/baun# a2ensite baun.conf
Enabling site baun.
To activate the new configuration, you need to run:
  systemctl reload apache2

Step 13: Now enable the rewrite module by using the below command

root@linuxhelp:/var/www/baun# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Step 14: Now restart the apache service by using the below command

root@linuxhelp:/var/www/baun# systemctl restart apache2

Step 15: Open browser and enter your hostname as shown in the below image

This the application of the baun CMS

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Install Baun CMS on Linux Debian 11.3. Your feedback is much welcome.

FAQ
Q
What is Composer?
A
Composer is dependency management in PHP. It allows you to declare libraries of your project and it will manage (install/update).
Q
How configure the virtual host for access to the Baun CMS?
A
The configuration location is # vi /etc/apache2/sites-available/baun.conf
Q
How to enable site access for Baun CMS?
A
The command is # a2ensite baun.conf
Q
What is the command to run the composer?
A
The command is # composer install
Q
What is the command to install the composer package?
A
The command is # apt install composer