In this post, you will learn How to install ForkCMS on Ubuntu 22.04
ForkCMS is a free and open-source content management system (CMS), that comes with a user-friendly and simple web interface. It comes with many powerful tools that can make your website look more beautiful and appealing to users. It’s a lightweight CMS and easy to use CMS which is based on Symfony. It is open-source and comes with many themes and apps like Banners, Guestbook and support many third-party extensions available to use.
Requirements :
- LAMP Stack
- FQDN (Fully Qualified Domain Name)
- Ubuntu 18.04 or more (This tutorial is mainly tested on Ubuntu 22.04)
- Root Access
Step 1 : Update your server :
First step is to update your server and which will look for newer packages and security releases for you distribution :
apt-get update -y
apt-get upgrade -y
Step 2 : Install LAMP Stack
ForkCMS is based on PHP and uses MariaDB as it’s database Backend, So we will need to quickly configure a LAMP Stack. Run the following command to install :
apt-get install apache2 mariadb-server -y
Add the PPA Key to install PHP7+ :
apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php
apt-get install php7.4 libapache2-mod-php7.4 php7.4-xml php7.4-cli php7.4-zip php7.4-common php7.4-sqlite php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd wget unzip -y
mysql_secure_installation
Copy the steps as shown in the picture or text :
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
![](https://unixcop.com/wp-content/uploads/2022/10/image-5-1.png)
mysql -u root -p
CREATE DATABASE forkdb;
CREATE USER forkuser@localhost IDENTIFIED by ‘forkpassword’;
GRANT ALL PRIVILEGES ON forkdb.* TO forkuser@localhost;
FLUSH PRIVILEGES;
QUIT
Step 3 : Install ForkCMS
We have now everything installed for ForkCMS, Now we can simply download the files from the official repository or their website mirror, Run the following command to install ForkCMS :
wget https://www.fork-cms.com/frontend/files/releases/forkcms-5.11.1.tar.gz
tar -xvzf forkcms-5.11.1.tar.gz
Give permissions :
chown -R www-data:www-data /var/www/html/forkcms/
chmod -R 755 /var/www/html/forkcms/
Create a vHost file for the site :
nano /etc/apache2/sites-available/forkcms.conf
Paste the following content (Change the example dot com to your own domain ) :
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/forkcms
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/html/forkcms/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
a2ensite forkcms.conf
a2enmod rewrite
systemctl restart apache2
Access your site at http://yourwebsiteurl//, You will be automatically redirected to the installation page :
![](https://unixcop.com/wp-content/uploads/2022/10/image-62-1024x682.png)
2. Select whatever options you wish to enable :
![](https://unixcop.com/wp-content/uploads/2022/10/image-63-1024x675.png)
3. Enter Database Details created earlier :
![](https://unixcop.com/wp-content/uploads/2022/10/image-64-1024x664.png)
4. Create administrator password :
![](https://unixcop.com/wp-content/uploads/2022/10/image-65-1024x684.png)
5. You can visit your site :
![](https://unixcop.com/wp-content/uploads/2022/10/image-66-1024x755.png)
Conclusion :
You have installed ForkCMS on your Ubuntu 22.04 Machine. This tutorial assumes you are root!