• Compute
    Compute

    Configure a popular Linux OS or use popular developer Tools

  • Cloud hosting
    Cloud hosting

    Host a VPS in the Cloud in seconds

  • Collaborate, CMS, CRM`s
    Collaborate, CMS, CRM`s

    Collaborate with these popular CMS, CRM & collaboration tools

  • Database & E-Commerce
    Database & E-Commerce

    Create a database or an E-Commerce environment in seconds

How To: Install Anchor CMS on your Ubuntu Linux VPS

Modified on Fri, Jul 29, 2022 at 2:38 AM



Table of Contents


PreparationClick Here
InstallationClick Here
ConclusionClick Here



Preparation Steps

We'll be starting with a freshly deployed Ubuntu 18.04 VPS in this example, so we'll begin by updating and upgrading the system via SSH.

sudo apt update && sudo apt upgrade -y


sudo useradd -m anchor
sudo usermod -aG sudo anchor
sudo passwd anchor
su - anchor


Next we'll install all of our dependencies and php-mcrypt. This has to be done in this order due to mcrypt being removed from PHP 7.2.

# Install apache2, mariadb for mysql, composer, and software properties common

sudo apt install apache2 mariadb-server software-properties-common composer
sudo add-apt-repository ppa:ondrej/php
sudo apt update

# Install gcc, make, autoconf, libc-dev, pkg-config for php7.2-dev

sudo apt install gcc make autoconf libc-dev pkg-config
sudo apt install php7.2-dev

# Install mcrypt library

sudo apt install libmcrypt-dev

# Install mcrypt

sudo pecl install mcrypt-1.0.1

# Install the rest of the php dependencies

sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mysql php7.2-xmlrpc php7.2-gd php7.2-xml php7.2-cli php7.2-curl php7.2-zip php7.2-mbstring

Once everything is installed, we're going to modify the PHP configuration file next.

sudo nano /etc/php/7.2/apache2/php-ini

We'll include the following changes:

memory_limit = 256M
upload_max_filesize = 200M
max_execution_time = 360

Now we'll setup MySQL/MariaDB:

sudo mysql_secure_installation

Afterward, we will log in and create out database for AnchorCMS:

mysql -u root -p
# Tell mariadb to use mysql

use mysql;

# Create a database

create database ancms_db;

# Create a database user

create user anc_mana;

# Grant privileges to our user

grant all privileges on ancms_db.* to 'anc_mana'@'localhost' identified by 'your-password';

# Flush the privileges

flush privileges;

# Exit mariadb

quit;



Installation


We'll start by navigating to /var/www/html, changing the owner and permissions of the folder, and then using composer to create our project.

# Navigate to www/html

cd /var/www/html

# chown this folder and its contents to the current user

sudo chown -Rv www-data:$USER .

# set proper permissions for the current user

sudo chmod -Rv g+rw .

# Use composer to create our anchorcms

composer create-project anchorcms/anchor-cms

# Move our finished project

sudo mv anchor-cms anchor


Once this is complete, we'll reset the permissions so that apache can operate normally:

# Now let's reset our permissions for apache

sudo chown -R www-data:www-data /var/www/html/anchor/
sudo chmod -R 755 /var/www/html/anchor/

Now we will move on and create our anchor apache site configuration file and fill it in:

# Create our apache2 anchor site config file

sudo nano /etc/apache2/sites-available/anchor.conf

# Insert these lines into the new file

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/anchor
ServerName example.com

<Directory /var/www/html/anchor/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/anchor_error.log
CustomLog ${APACHE_LOG_DIR}/anchor_access.log combined

</VirtualHost>

Lastly we need to enable the site, enable apache's rewrite module, and restart apache:

sudo a2ensite anchor
sudo a2enmod rewrite
sudo systemctl restart apache2

Now, navigate to your VPS IP address, or domain name if you have already pointed an A record at the VPS. You should be greeted with a page similar to what is pictured below:


From here on, follow the prompts on this page and you will have successfully installed Anchor CMS on your Ubuntu Linux VPS.


Conclusion


For more information regarding Anchor CMS, please refer to the official documentation located at: https://anchorcms.com/docs/



Join our Private Discord Chat to chat with, as well as find community assistance from other Verified SkySilk Users: https://invite.gg/SkySilk  


CLICK TO DEPLOY AN UBUNTU LINUX VPS

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article