{"id":4055,"date":"2019-08-24T09:55:06","date_gmt":"2019-08-24T06:55:06","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4055"},"modified":"2024-03-12T07:35:26","modified_gmt":"2024-03-12T04:35:26","slug":"install-automad-cms-on-debian-10-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-automad-cms-on-debian-10-ubuntu-18-04\/","title":{"rendered":"Install Automad CMS on Debian 10\/Ubuntu 18.04"},"content":{"rendered":"\n
In this guide, we are going to learn how to install Automad CMS on Debian 10 \/Ubuntu 18.04. Automad<\/a> is a file-based content management system and template engine written in PHP. It stores all content in human readable text files instead of the database and thus a site created with Automad is fully portable, easy to install and can be version controlled by using Git or Mercurial.<\/p>\n\n\n\n Automad is written in PHP and thus it requires a web server with PHP and PHP extensions installed in order to run. Here is a list of the minimum system requirements;<\/p>\n\n\n\n Run the commands below to update and upgrade your system packages.<\/p>\n\n\n\n Once the system update is done, proceed to install the required PHP and PHP modules. Automad, as of this writing requires PHP 7.4+ as of this writing, as per the system requirements page<\/a>.<\/p>\n\n\n\n PHP 7.2 is the default PHP version available on the default Ubuntu 18.04 repositories while PHP 7.3 is the default PHP versions on Debian 10.<\/p>\n\n\n\n Thus, to install PHP 7.4 on Ubuntu 18.04\/Debian 10;<\/p>\n\n\n\n Add the third party PPA repositories that provides PHP 7.4 packages;<\/p>\n\n\n\n Ubuntu 18.04:<\/p>\n\n\n\n Debian 10:<\/p>\n\n\n\n Re-update the package cache;<\/p>\n\n\n\n Then run the command below to install PHP and the required extensions as well the Apache web server.<\/p>\n\n\n\n Verify the version of PHP installed;<\/p>\n\n\n\n Ubuntu 18.04<\/p>\n\n\n\n Debian 10 Buster<\/p>\n\n\n\n The output of both commands should be same;<\/p>\n\n\n\n Apache web server is set to run and enabled to run on system boot.<\/p>\n\n\n\n To confirm is Apache is set to run on system boot, run the command below.<\/p>\n\n\n\n If the output is There are different ways in which you can install Automad; using Composer<\/a>, Docker<\/a> or manual download.<\/p>\n\n\n\n We use manual method in this guide.<\/p>\n\n\n\n Run the command below to download the Automad CMS installation files to the web root directory you defined in the Automad CMS Apache configuration file above.<\/p>\n\n\n\n Installing Automad CMS is as simple as unzipping the download files to Automad CMS web root directory.<\/p>\n\n\n\n Extract Automad CMS Files<\/p>\n\n\n\n Check the contents;<\/p>\n\n\n\n Automad Files are under the automad-master<\/strong> directory.<\/p>\n\n\n\n Create Apache configuration file for Automad CMS with the following content;<\/p>\n\n\n\n Save the configuration file and quit and check configuration syntax.<\/p>\n\n\n\n If all is well, you should get Syntax OK<\/strong>.<\/p>\n\n\n\n Next, disable Apache default site and enable Automd CMS site<\/p>\n\n\n\n Enable Apache Rewrite module;<\/p>\n\n\n\n Set the user and group ownership of the Automad CMS files to web server www-data<\/strong>.<\/p>\n\n\n\n Restart Apache2<\/p>\n\n\n\n You can now access your Automad CMS site via http:\/\/<your-defined-domain-name><\/strong>.<\/p>\n\n\n\n To create Automad CMS user account, enter the Automad CMS dashboard, http:\/\/<domain>\/dashboard<\/strong>.<\/p>\n\n\n\n Fill in the username and password and download the user registration form and copy it under the \/config<\/strong> directory within your Automad CMS project directory.<\/p>\n\n\n\n For example, in my case the accounts.php<\/strong> file is downloaded to ~\/downloads directory. To preserver the permissions, copy the file as www-data<\/strong>.<\/p>\n\n\n\n Once you have the accounts form in place, login to Automad CMS via http:\/\/automadcms.example.com\/dashboard<\/strong><\/p>\n\n\n\n And there you go. You get to Automad CMS admin dashboard.<\/p>\n\n\n You have successfully installed Automad CMS on Debian 10\/Ubuntu 18.04. You can now explore it. Enjoy.<\/p>\n\n\n\n Read more about Automad CMS on;<\/p>\n\n\n\n Automad CMS User Guide<\/a><\/p>\n\n\n\n Related Tutorials;<\/p>\n\n\n\n Install WonderCMS with Nginx on Debian 10<\/a><\/p>\n\n\n\nInstalling Automad CMS on Debian 10\/Ubuntu 18.04<\/h2>\n\n\n\n
Prerequisites<\/h3>\n\n\n\n
\n
Run System Update<\/h3>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
Install PHP and Required PHP Modules<\/h3>\n\n\n\n
add-apt-repository ppa:ondrej\/php --yes &> \/dev\/null<\/code><\/pre>\n\n\n\n
apt -y install lsb-release apt-transport-https ca-certificates <\/code><\/pre>\n\n\n\n
wget -qO \/etc\/apt\/trusted.gpg.d\/php.gpg https:\/\/packages.sury.org\/php\/apt.gpg<\/code><\/pre>\n\n\n\n
echo \"deb https:\/\/packages.sury.org\/php\/ $(lsb_release -sc) main\" > \/etc\/apt\/sources.list.d\/php.list<\/code><\/pre>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
apt install php7.4 php7.4-zip php7.4-curl php7.4-mbstring php7.4-gd php7.4-xml php7.4-xmlrpc php7.4-soap -y<\/code><\/pre>\n\n\n\n
php -v<\/code><\/pre>\n\n\n\n
php -v<\/code><\/pre>\n\n\n\n
PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:19) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v3.4.0, Copyright (c) Zend Technologies\n with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies<\/code><\/pre>\n\n\n\n
systemctl status apache2<\/code><\/pre>\n\n\n\n
\n\u25cf apache2.service - The Apache HTTP Server\n Loaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; vendor preset: enabled)\n Drop-In: \/lib\/systemd\/system\/apache2.service.d\n \u2514\u2500apache2-systemd.conf\n Active: active (running) since Wed 2022-02-23 18:30:23 EAT; 3s ago\n Process: 14290 ExecStop=\/usr\/sbin\/apachectl stop (code=exited, status=0\/SUCCESS)\n Process: 14295 ExecStart=\/usr\/sbin\/apachectl start (code=exited, status=0\/SUCCESS)\n Main PID: 14312 (apache2)\n Tasks: 6 (limit: 2317)\n CGroup: \/system.slice\/apache2.service\n \u251c\u250014312 \/usr\/sbin\/apache2 -k start\n \u251c\u250014316 \/usr\/sbin\/apache2 -k start\n \u251c\u250014317 \/usr\/sbin\/apache2 -k start\n \u251c\u250014318 \/usr\/sbin\/apache2 -k start\n \u251c\u250014321 \/usr\/sbin\/apache2 -k start\n \u2514\u250014322 \/usr\/sbin\/apache2 -k start\n\nFeb 23 18:30:23 cms.kifarunix-demo.com systemd[1]: Stopped The Apache HTTP Server.\nFeb 23 18:30:23 cms.kifarunix-demo.com systemd[1]: Starting The Apache HTTP Server...\nFeb 23 18:30:23 cms.kifarunix-demo.com systemd[1]: Started The Apache HTTP Server.\n<\/code><\/pre>\n\n\n\n
systemctl is-enabled apache2<\/code><\/pre>\n\n\n\n
enabled<\/code><\/strong>, otherwise, enable it to run on boot by running;<\/p>\n\n\n\n
systemctl enable apache2<\/code><\/pre>\n\n\n\n
Download Automad CMS Installation Files<\/h3>\n\n\n\n
wget -qO automad-master.zip https:\/\/codeload.github.com\/marcantondahmen\/automad\/zip\/refs\/heads\/master<\/code><\/pre>\n\n\n\n
Install Automad CMS on Debian\/Ubuntu<\/h3>\n\n\n\n
apt install zip -y<\/code><\/pre>\n\n\n\n
unzip -q automad-master.zip -d \/var\/www\/html\/<\/code><\/pre>\n\n\n\n
ls \/var\/www\/html\/<\/code><\/pre>\n\n\n\n
automad-master<\/strong> index.html<\/code><\/pre>\n\n\n\n
Configure Apache For Automad CMS<\/h3>\n\n\n\n
\ntee \/etc\/apache2\/sites-available\/automadcms.conf << 'EOL'\n<VirtualHost *:80>\n ServerAdmin webadmin@kifarunix-demo.com\n DocumentRoot \/var\/www\/html\/automad-master\n ServerName cms.kifarunix-demo.com\n\n <Directory \/var\/www\/html\/automad-master>\n Options FollowSymlinks\n AllowOverride All\n Require all granted\n <\/Directory>\n\n ErrorLog ${APACHE_LOG_DIR}\/error.log\n CustomLog ${APACHE_LOG_DIR}\/access.log combined\n\n<\/VirtualHost>\nEOL\n<\/code><\/pre>\n\n\n\n
apachectl configtest<\/code><\/pre>\n\n\n\n
a2dissite 000-default.conf<\/code><\/pre>\n\n\n\n
a2ensite automadcms.conf<\/code><\/pre>\n\n\n\n
a2enmod rewrite<\/code><\/pre>\n\n\n\n
chown -R www-data: \/var\/www\/html\/automad-master\nchmod -R 755 \/var\/www\/html\/automad-master<\/code><\/pre>\n\n\n\n
systemctl restart apache2<\/code><\/pre>\n\n\n\n
Accessing Automad CMS<\/h3>\n\n\n\n
<\/figure>\n\n\n\n
Create Automad CMS User Account<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
sudo -u www-data cp ~\/accounts.php \/var\/www\/html\/automad-master\/config\/<\/code><\/pre>\n\n\n\n
Login to Automad CMS Site<\/h3>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure><\/div>\n\n\n