Track Configuration Management
For this configuration management tutorial, a drupal vps server you need considerable or basic knowledge in/of open source CVS such as Git. GIT is highly recommended with content management system (CMS) such as Drupal 7 and 8 and phpmyadmin.
Installing Git on Linux VPS Server Distributions
Many Linux distributions allow developers to install Git via a collection of packages. Therefore based on preference, some Git packages are commonly installed whilst others are rarely recommended.
For instance, if you need to transfer your projects from Arch, or SVN or CVS to Git, it is necessary to install the following packages:
Git-cvs Git-arch Git-svn
In addition, some packages allow developers to visualize project history, browse repositories in a web browser or graphical application and display a Git repository in a browser window. These packages allow the above functions
Git-gui Gitk Git-web
Moreover they are packages available for sending Git patches via electronic mail and sharing repositories through anonymous download request:
Git – email Git-daemon-run
Therefore, to install Git Packages as a root user on a Linux distribution, you can use the following command:
sudo apt-get install git git-doc gitweb / git-email git-svn gitk
You can also include other packages apart from the following recommended packages. For fedora users, to install Git core tools or Git as a whole, just type in the following command:
sudo yum install git
And for debian users, use the emerge command to install Git
sudo emerge dev-util/git
Installing Git on Windows
For windows users, there are two ways of installing Git. First, windows users can install Git alongside with Cygwin as a package or install Git as a standalone via mysisgit installer
If you want to install Git as package in Cygwin, just browse to http://Cygwin.com , download the exe program and install it afterwards. You may use the default settings throughout.
Installing mysisgit on Windows
Another alternative to get Git on your windows machine is to download and install mysisgit by browsing to https://gitforwindows.org/
There you can easily download a standalone Git installer on your windows machine.
Tip: For a list of Git most common sub-commands such as merge, pull, and just type Git and a list of Git subcommands appears:
Tip: Furthermore, if you want a daunting list of Git subcommands, type the following command:
git help --all
Now that we have Git installed on both Linux and Windows, let’s move on to download and install Drupal, an open-source content management system with similar features like Wordpress but entirely free.
Tip: You can use commit in Git and to record changes in your Drupal configuration management.
In this tutorial we will be installing Drupal 8. Drupal 8 has features similar to previous versions of Drupal with exception of the ‘configuration management’.
Configuration management is a new feature introduced in Drupal 8 which allows us to manage configuration settings in Drupal. This new feature allows Drupal developers to stores configuration settings (and changes) in files instead of databases.
In order to know how to manage configuration settings and track configuration management in Drupal, we need to download and install Drupal core files
You need a decompressing utility such as 7zip for windows to bring it back to its original state.
Decompressing the file will create a folder on your computer with files and directories back to its original state.
Afterwards move the folder to htdocs under the Xammp directory which is the root directory of your web server.
Next, navigate to the sites/default directory. Usually, Drupal uses default.settings.php file to store the default configuration settings. As the starting point for our Drupal, rename it as settings.php.
Finally, in the sites/default directory, create and name a new directory or folder as Files. Drupal stores uploaded files and images in the Files directory.
Now before we can set up Drupal installer, we need to create a database and a user account for the Drupal database. Open the web browser and browse to: http://localhost/phpmyadmin/
Click on the database tab at the top and type the name of the database below the Create database
Afterwards, click on the create button on your right. Don’t create any tables. Just click on the user accounts tab at the top and click on the Add new User account to create a user account for the database you just created previously. The following appears after you have clicked on the User accounts tab:
Next, type in the following credentials and click in the box near the Check All to grant global privileges to the user account.
Finally, you can now start your Drupal configuration by browsing to: http://localhost.
The next following configuration steps are self-explanatory so there is no need to practically emphasize on it.
Drupal version 8 stores configuration settings in the sites directory. During Drupal installation, Drupal adds a new directory to sites/default /files directory known as the config_HASH. HASH refers to a long string of numbers and letters.
Inside the config directory, there are two other directories known as the:
Active Directory Staging Directory
Both Active Directory and Staging Directory contain just a README.TXT file with no configuration during the Drupal installation.
To start using Configuration Management to keep track of your Configuration changes, all you have to do is export your current configuration and place it inside the staging directory.
Afterwards, Go to /admin/config/development/configuration/full/export
use the Export button to download an archive of your site configuration
You can save the archive inside: sites/default/files/config_HASH/staging folders of your Drupal source files and extract the contents of the archive
Finally you can track changes by making commits to every configuration changes similar to the one below like. Commit messages vary among developers.
First make a directory/folder for your project:
mkdir ~/myproject cd ~/myproject echo "This is my first project" > index.html
Afterwards you specify your "myproject" as a repository by adding the command:
This git init command makes git to recognize your project directory as repository.
Before you make commits you need to configure your git settings such as your name and email so git can identify you as the owner of the repository.
config user.name "Mike Dev" config user.email "firstname.lastname@example.org"
Finally add the index.html file to the repository and use the command git commit to make commits with regards to drupal configuration changes or settings
git add index.html git commit
You can track your configuration management by reverting to your commits by the command:
Tags: phpmyadmin, Drupal, Configuration Management, Git, Version Control
This work is licensed under a
Creative Commons Attribution-