Select Page
C Programming Tutorial Part 2 – Preprocessors

C Programming Tutorial Part 2 – Preprocessors

In the first part of our ongoing C programming tutorial series, we briefly touched on the preprocessing stage. In this tutorial, we will discuss it in a little more detail so that you have a basic idea about it before learning other C programming aspects.

Preprocessing is usually the first stage of program compilation, where-in anything beginning with a ‘#’ gets processed. Let’s take a basic example code.

#include 

int main (void)
{
    printf("n Hello World n");
    return 0;
}

Yes, this is the same piece of code we used in the first part of this article series. Here, it’s the first line that begins with a hash ‘#’. In layman’s terms, the line ‘#include ‘ makes sure the content of header file ‘stdio.h’ are included in this program during compilation.

So what happens in the preprocessing stage is, this line gets replaced with the actual content of the header file. Here’s how the code looks after the preprocessing stage:

C Code File

So you can see, everything above the few lines of code we wrote (look at the bottom of the screenshot) is the contents of stdio.h. Now, I won’t go in details of how I managed to see the code after preprocessing, but this was to give you a clear idea on what happens during preprocessing.

Moving on, lines that include a header file aren’t the only ones that begin with a hash (#). There’s also something called Macros that also begin with #. So it’s important to discuss them here (at least their basics).

A Macro is nothing but a name (usually in capital letters) that refers to a piece of code. Macros are defined using the ‘#define’ directive. Here’s an example:

#include 
#define PRINT_HELLO_WORLD printf("n Hello World n");
int main (void)
{
    PRINT_HELLO_WORLD
PRINT_HELLO_WORLD
    return 0;
}

So we defined a macro PRINT_HELLO_WORLD with value printf(“n Hello World n”); . Now, wherever we’ll use this macro name in the code, it will get replaced with its value during the preprocessing stage. Here’s the code after pre-processing:

C Program Macro

So you see that both occurrences of the macro were replaced by its value at the pre-processing stage. Of course, there are several other details related to macros that you should know about in order to successfully use them. We will discuss those details in a Macro dedicated part of this tutorial series.

Moving on, the third type of lines beginning with # are #ifdef and #endif. These are used for conditional compilation. To give you a quick idea, there are times when you’d not want a part of code to get compiled based on a certain condition, it’s in cases like these, these directives are used.

Here’s an example:

#include 
#define PRINT_HELLO_WORLD printf("n Hello World n");

int main (void)
{
#ifdef CONDITION
    PRINT_HELLO_WORLD
#endif
    PRINT_HELLO_WORLD
    return 0;
}

In the code above, since ‘CONDITION’ isn’t defined anywhere, so the first occurrence of ‘PRINT_HELLO_WORLD’ will be omitted from code at the preprocessing stage only. Here’s the proof:

Code condition

So you can see only one printf statement after the preprocessing stage.

Conclusion

In this tutorial, we discussed preprocessing to give C programming beginners a basic idea of what happens during this stage. Now, move on to part 3 to learn further about C programming basics.

How to Install InvoicePlane with Nginx on CentOS 7

How to Install InvoicePlane with Nginx on CentOS 7

InvoicePlane is a free and open source invoicing application. Its source code can be found on this Github. This tutorial will show you how to install InvoicePlane on a fresh CentOS 7 system.

Requirements

  • WebServer (Apache, NGINX). This tutorial will use Nginx.
  • MySQL version 5.5 or greater or the equivalent version of MariaDB.
  • PHP version 7.0 or greater with the following PHP extensions installed and activated:
  • php-gd
  • php-hash
  • php-json
  • php-mbstring
  • php-mcrypt
  • php-mysqli
  • php-openssl
  • php-recode
  • php-xmlrpc
  • php-zlib
  • A server running CentOS 7.
  • A non-root user with sudo privileges.

Initial steps

Check your CentOS system version:

cat /etc/centos-release
# CentOS Linux release 7.6.1810 (Core)

Set up the timezone:

timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'

Update your operating system’s packages:

sudo yum update -y

Install required packages:

sudo yum install -y vim wget curl git bash-completion unzip

Step 1 – Install PHP and required PHP extensions

InovicePlane web application requires PHP version 7.0.0 or greater. Default CentOS repositories contain older version of PHP, and thus we will need to set up a third-party repository to install a newer PHP version. We will use Webtatic repository.

Setup the Webtatic YUM repo:

sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install PHP, as well as the necessary PHP extensions:

sudo yum install -y php72w php72w-cli php72w-fpm php72w-common php72w-gd php72w-json php72w-mbstring php72w-mcrypt php72w-mysql php72w-xmlrpc php72w-recode

Check the PHP version:

php --version

# PHP 7.2.12 (cli) (built: Nov 11 2018 14:54:16) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Start and enable PHP-FPM service:

sudo systemctl start php-fpm.service
sudo systemctl enable php-fpm.service

Step 2 – Install MariaDB

Install MariaDB database server:

sudo yum install -y mariadb-server

Check the MariaDB version:

mysql --version
# mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1

Start and enable MariaDB service:

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Run mysql_secure installation script to improve MariaDB security and set the password for MariaDB root user:

sudo mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none):
Set root password? [Y/n]: Y
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Log into MariaDB shell as the user root:

mysql -u root -p
# Enter password

Create a MariaDB database and user that you will use for your installation of InvoicePlane, and remember the credentials:

CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

Exit from MariaDB shell:

quit

Step 3 – Install NGINX

Install Nginx web server:

sudo yum install -y nginx

Check the NGINX version:

nginx -v
# nginx version: nginx/1.12.2

Start and enable Nginx service:

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

Configure NGINX for InvoicePlane. Run sudo vim /etc/nginx/conf.d/invoiceplane.conf and populate the file with the following configuration:

server {
    listen 80;
    listen [::]:80;

    server_name example.com;

    root /var/www/invoiceplane;

    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ .php$ {
        fastcgi_index index.php;
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass 127.0.0.1:9000;
    }
}

Test the NGINX configuration:

sudo nginx -t

Reload NGINX:

sudo systemctl reload nginx.service

Step 4 – Install InvoicePlane

Download the latest stable version of InvoicePlane and extract the archive:

sudo mkdir -p /var/www
cd /var/www
sudo curl -O -J -L https://invoiceplane.com/download/v1.5.9
sudo unzip v1.5.9.zip
sudo rm v1.5.9.zip
sudo mv ip invoiceplane

Navigate to /var/www/invoiceplane folder:

cd /var/www/invoiceplane

Make a copy of the ipconfig.php.example file and rename the copy to ipconfig.php:

sudo cp ipconfig.php.example ipconfig.php

Open the ipconfig.php file and add your URL in it:

sudo vim ipconfig.php
# Something like this
IP_URL=http://example.com

Change ownership of the /var/www/invoiceplane directory to nginx:

sudo chown -R nginx:nginx /var/www/invoiceplane

Run sudo vim /etc/php-fpm.d/www.conf and set the user and group to nginx. Initially, they will be set to apache:

sudo vim /etc/php-fpm.d/www.conf
# user = nginx
# group = nginx

Run sudo vim /etc/php.ini and set date.timezone:

date.timezone = Region/City

Restart the PHP-FPM service:

sudo systemctl restart php-fpm.service

Run the InvoicePlane installer from your web browser and follow the instructions:

http://example.com/index.php/setup

Once the installation has finished, you may log into InvoicePlane using the email address and password you have chosen during the installation.

If you want to secure your installation, you may disable the setup. To do so, replace the line DISABLE_SETUP=false with DISABLE_SETUP=true in your ipconfig.php file.

Step 5 – Complete the InvoicePlane setup

InvoicePlane is now installed and configured, it’s time to access their web installation wizard.

Open your web browser and type the URL http://example.com. You will be redirected to the following page:

InvoicePlane web installer

Now, click on the Setup button. You should see the following page:

Choose language

Next, choose the language and click on the Continue button. You should see the following page:

Prerequisite check successful

Next, click on the Continue button. You should see the following page:

Database setup

Here, provide your database details and click on the Try Again button. You should see the following page:

Database has been set up.

Now, click on the Continue button. You should see the following page:

Create user

Now, click on the Continue button. You should see the following page:

Installation complete

Now, provide all the required details, then click on the Continue button. Once the installation is completed, you should see the following page:

Log into InvoicePlane

Now, click on the Login button to access InvoicePlane administration.

How to Install PageKit CMS on Ubuntu 18.04 LTS

How to Install PageKit CMS on Ubuntu 18.04 LTS

PageKit is a free, open source and lightweight CMS that can be used to create beautiful websites. Pagekit comes with a clean and intuitive interface that allows you to focus on what matters most, managing your content. It provides a configurable dashboard that shows all the statistics related to your site at one place. You can easily manage the pages, menus, and widgets using Pagekits’ drag and drop control panel. Pagekit does not require any special hardware requirements. It can be installed on servers with a small amount of RAM.

In this tutorial, we will learn how to install PageKit CMS with Apache web server on Ubuntu 18.04 LTS.

Requirements

  • A server running Ubuntu 18.04.
  • A non-root user with sudo privileges.

Getting Started

Before starting, you will need to update your system with the latest version. You can do this by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is updated, restart the system to apply the changes.

Install Apache, MariaDB and PHP

PageKit runs on the web server, written in PHP language and use MariaDB to store their data. So, you will need to install Apache web server, MariaDB server, PHP and other PHP libraries to your server. You can install all of them by just running the following command:

sudo apt-get install apache2 mariadb-server php7.2 libapache2-mod-php7.2 php7.2-common php7.2-sqlite php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip wget unzip -y

After installing all the required packages, you will need to edit php.ini file and make some changes:

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

Make the following changes:

memory_limit = 300M
allow_url_fopen = On
upload_max_filesize = 200M
max_execution_time = 400
date.timezone = Asia/Kolkata

Save and close the file. Then, restart Apache and MariaDB service and enable them to start on boot time by running the following command:

sudo systemctl restart apache2
sudo systemctl restart mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb

Configure MariaDB for PageKit

By default, MariaDB is not hardened. So you will need to secure it first. You can secure it by running the following command:

sudo mysql_secure_installation

This command will set a root password, remove the anonymous user, disallow remote root login, and remove the test database as shown below:

    Enter current password for root (enter for none):
    Set root password? [Y/n]: N
    Remove anonymous users? [Y/n]: Y
    Disallow root login remotely? [Y/n]: Y
    Remove test database and access to it? [Y/n]:  Y
    Reload privilege tables now? [Y/n]:  Y

Once the MariaDB is secured, log in to MariaDB shell:

mysql -u root -p

Enter your root password when prompt. Then, create a database and user for PageKit with the following command:

MariaDB [(none)]> CREATE DATABASE pagekitdb;
MariaDB [(none)]> CREATE USER pagekit;

Next, grant privileges to the PageKit database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON pagekitdb.* TO 'pagekit'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;

Next, exit from the MariaDB console with the following command:

MariaDB [(none)]> exit

Download PageKit

First, you will need to download the latest version of PageKit CMS from their official website. You can download it with the following command:

wget https://pagekit.com/api/download/latest -O pagekit.zip

Once the download is completed, unzip the downloaded file to the Apache web root directory with the following command:

sudo unzip pagekit.zip -d /var/www/html/pagekit

Next, give proper permissions to the pagekit directory with the following command:

sudo chown -R www-data:www-data /var/www/html/pagekit/
sudo chmod -R 777 /var/www/html/pagekit/

Next, you can proceed to configure Apache for PageKit.

Configure Apache for PageKit

Next, you will need to create an Apache virtual host file for PageKit CMS. You can do this by creating pagekit.conf file as shown below:

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

Add the following lines:


     ServerAdmin [email protected]
     DocumentRoot /var/www/html/pagekit
     ServerName example.com

     
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     

     ErrorLog ${APACHE_LOG_DIR}/pagekit_error.log
     CustomLog ${APACHE_LOG_DIR}/pagekit_access.log combined

Save and close the file. Then, enable PageKit virtual host file with the following command:

sudo a2ensite pagekit

Next, enable Apache rewrite module and restart Apache web server to apply all the changes:

sudo a2enmod rewrite
sudo systemctl restart apache2

Access PageKit CMS

PageKit CMS is now installed and configured. It’s time to access PageKit web installer wizard.

Open your web browser and type the URL http://example.com. You will be redirected to the following page:

PageKit Installer

Now, click on the Arrow button. You should see the following page:

Choose Language

Here, select your language and click on the NEXT button. You should see the following page:

Connect Database

Here, provide your database name, database username and password. Then, click on the NEXT button. You should see the following page:

Setup site in PageKit

Here, provide your site title, admin username and password. Then, click on the INSTALL button. You should see the following page:

Log in

Now, provide your admin login details and click on the LOGIN button. You should see the PageKit CMS default dashboard in the following page:

PageKit Dashboard

Congratulations! you have successfully installed PageKit CMS on Ubuntu 18.04 server. I hope you can now easily edit the website to create a modern looking website for your business. Feel free to ask me if you have any questions.

Linux type Command Tutorial for Beginners (with Examples)

Linux type Command Tutorial for Beginners (with Examples)

On the Linux command line, you’ll come across several types of utilities. Some are an alias, while others are built-in tools and even functions. So, how do you check these types? Well, there exists a command ‘type‘ that offers you this information. In this tutorial, we will discuss the ‘type’ command using some easy to understand examples.

But before we do that, it’s worth mentioning that all examples here have been tested on an Ubuntu 18.04 LTS machine.

Linux type command

As already mentioned in the introduction above, the type command in Linux displays information about command type. Following is its syntax:

type [-afptP] name [name ...]

And here are some Q&A-styled examples that should give you a better idea on how the type command works.

Q1. How to use type command?

It’s simple, just execute ‘type’ with the command line tool name as input and -t as the command line option. For example,

type -t cp

This command produced the following output:

file

Similarly, if the tool name is an alias, then the type command clearly tells that. For example, the following command:

type -t ls

produced this output:

alias

Here’s how the tool’s man page explains the -t option:

-t	output a single word which is one of `alias', `keyword',
    	`function', `builtin', `file' or `', if NAME is an alias, shell
    	reserved word, shell function, shell builtin, disk file, or not
    	found, respectively

For this, execute the type command sans any option. Here’s an example:

How to make type print location of tools

Use the -a command line option for this. Here’s an example:

type -a ls

This command produced the following output on my system:

ls is aliased to `ls --color=auto'
ls is /bin/ls

Q4. How to make type search even if input is an alias?

By default, if you input an alias (like ‘ls’ on some systems), the type command doesn’t produce location in output. For example:

type ls

Here’s the output:

ls is aliased to `ls --color=auto'

However, if you want, you can force ‘type’ to search for location even if the input is an alias. This can be done using the -P command line option.

-P      force a PATH search for each NAME, even if it is an alias,
       	builtin, or function, and returns the name of the disk file
    	that would be executed

How to make type search even if input is an alias

Conclusion

The type command doesn’t have a steep learning curve. Many of the options it provides we’ve discussed in this tutorial. Once you’re done testing these, head to the ‘type’ command man page to learn more about it.

How to Install Anchor CMS on CentOS 7

How to Install Anchor CMS on CentOS 7

Anchor is a lightweight open source blog CMS written in PHP. Anchor’s source code is hosted on GitHub. This tutorial will show you how to install Anchor CMS on a CentOS 7 system.

Requirements

Make sure your server meets the following requirements.

  • MySQL 5.6 or greater (MySQL 5.7 recommended)
  • PHP 5.6 or greater with the following PHP extensions: (curlmcrypt, gd, mbstring, pdo_mysql or pdo_sqlite)
  • Apache or Nginx. In this tutorial we will use Nginx.
  • CentOS 7 operating system.
  • A non-root user with sudo privileges.

Initial steps

Check your CentOS system version:

cat /etc/centos-release
# CentOS Linux release 7.5.1804 (Core)

Set up the timezone:

timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'

Update your operating system’s packages:

sudo yum update -y

Install some useful packages if they are not already installed:

sudo yum install -y vim wget curl git unzip bash-completion

Step 1 – Install PHP and necessary PHP extensions

Anchor CMS requires PHP version 5.6 or greater. Default CentOS repositories contain an older version of PHP, and thus we will need to set up a third-party repository to install a newer PHP version. We will use Webtatic repository.

Setup the Webtatic YUM repo:

sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install PHP, as well as the necessary PHP extensions:

sudo yum install -y php72w php72w-cli php72w-fpm php72w-common php72w-mbstring php72w-curl php72w-mysql php72w-sqlite3 php72w-gd php72w-mcrypt php72w-dom

Check the PHP version:

php --version

# PHP 7.2.12 (cli) (built: Nov 11 2018 14:54:16) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Start and enable PHP-FPM service:

sudo systemctl start php-fpm.service
sudo systemctl enable php-fpm.service

Step 2 – Install MariaDB and create a database for Anchor CMS

Anchor supports MySQL/MariaDB and SQLite databases. Default CentOS repository contains an unsupported version of MariaDB. Because of that, we will use the official MariaDB repository that contains a newer version of MariaDB.

Create MariaDB YUM repository for CentOS:

sudo vim /etc/yum.repos.d/MariaDB.repo

Copy and paste the following text into it:

# MariaDB 10.2 CentOS repository list - created 2017-12-11 23:19 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name=MariaDB
baseurl=https://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

After the file is in place, install MariaDB by running:

sudo yum install -y MariaDB-server MariaDB-client

Check the MariaDB version:

mysql --version
# mysql  Ver 15.1 Distrib 10.2.19-MariaDB, for Linux (x86_64) using readline 5.1

Start and enable MariaDB service:

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Run mysql_secure installation script to improve MariaDB security and set the password for MariaDB root user:

sudo mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none):
Set root password? [Y/n]: Y
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Log into MariaDB shell as the user root:

mysql -u root -p
# Enter password

Create a MariaDB database and user that you will use for your installation of Anchor CMS, and remember the credentials:

CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

Exit from MariaDB shell:

quit

Step 3 – Install and configure Nginx

Install Nginx web server:

sudo yum install -y nginx

Check the Nginx version:

nginx -v
# nginx version: nginx/1.12.2

Start and enable Nginx service:

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

Run sudo vim /etc/nginx/conf.d/anchor.conf and populate the file with the following configuration:

server {
    listen 80;

    server_name example.com;
    root /var/www/anchor;

    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php;
    }
    
    location ~ .php$ {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

}

Test Nginx configuration:

sudo nginx -t

Reload Nginx:

sudo systemctl reload nginx.service

Step 4 – Download and install Composer

To successfully install Anchor, we will need to install Composer, the dependency manager for PHP applications:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

php composer-setup.php

php -r "unlink('composer-setup.php');"

sudo mv composer.phar /usr/local/bin/composer

Check the Composer version.

composer --version
# Composer version 1.8.0 2018-12-03 10:31:16

Step 5 – Download and install Anchor CMS

Create a document root directory:

sudo mkdir -p /var/www/anchor

Change ownership of the /var/www/limesurvey directory to [jour_user]:

sudo chown -R [your_user]:[your_user] /var/www/anchor

Navigate to document root:

cd /var/www/anchor

Download the latest release of Anchor CMS by using Composer:

composer create-project anchorcms/anchor-cms .

Change ownership of the /var/www/anchor directory to nginx:

sudo chown -R nginx:nginx /var/www/anchor

Create the directory/var/lib/php/session and set ownership to nginx.

sudo mkdir -p /var/lib/php/session && sudo chown -R nginx:nginx /var/lib/php

Run sudo vim /etc/php-fpm.d/www.conf and set the user and group to nginx. Initially, they will be set to apache:

sudo vim /etc/php-fpm.d/www.conf
# user = nginx
# group = nginx

Restart the PHP-FPM service:

sudo systemctl restart php-fpm.service

Step 6 – Complete the Anchor CMS setup

Open your web browser and type the URL “http://example.com”. You will be redirected to the following page:

Anchor CMS web installer

Click on the “Run the installer” button, to initiate Anchor CMS web installer. After, language and timezone page should appear:

Select Language and Time zone

Select the settings that you want and click on the “Next Step” button to proceed to the database configuration page:

Database settings

Enter your database details, and click on the “Next Step” button to proceed to site metadata configuration page:

Site Metadata

You can set site name or site description here, or leave the defaults and change it later via Anchor backend interface. Click on the “Next Step” button for the next step which is setting your first account:

Create admin account

After setting up your first account, click on the “Complete” button to finish the installation process.

Once you have completed the install, make sure to delete install folder for security purposes.

sudo rm -rf /var/www/anchor/install

Links

C Programming Language – Introduction

C Programming Language – Introduction

C is a procedural programming language that was designed by American computer scientist Dennis Ritchie. The language – which first appeared in 1972 – was developed by Ritchie in association with Bell Labs. Despite being close to 50 years old, the C programming language has not lost its relevance in the modern day computer software development scene. It’s still used in time and speed critical areas like OS and firmware development (to name a few).

Several of the newer languages like C++, Java, PHP, and more are based on C. And that’s the reason students are still advised to get proficient in C in order to have good command on any of the newer languages based on C. So keeping this importance in mind, we will kick-start a series of tutorials where we will be discussing the basics of the C programming language.

Please note that we’ll be using Linux for all our examples and explanation. Specifically, we’ll be using Ubuntu 18.04 LTS.

Basic C program

To begin with, let’s take a look at a simple C program.

#include 

int main (void)
{
    printf("n Hello World n");
    return 0;
}

So you can see the program begins with a #. In C programming language, any line that begins with a # is dealt by preprocessor at the first stage of compilation of the program. We won’t go in to the specifics of compilation stages, but for the time being, keep in mind that the first thing that will happen during compilation of this program is that the line beginning with # will get replaced by whatever is there in the stdio.h header file.

Then comes the next line: ‘int main (void)’. This is basically beginning of a function called ‘main’ which returns an integer (int) value and accepts nothing (void). It’s worth mentioning here that every C program that you’ll see consists of one or more functions. The ‘main’ function is the one where the execution starts once the program is run. While all other functions get called from within main or other functions (meaning you have control over their calling sequence), main itself gets called as the first function from within the system.

Moving on, then you see a curly bracket ( { ). This basically defines the beginning scope of a function. Of course, towards the end, you’ll see a reverse curly bracket ( } ), which defines the end of scope of the function. All the instructions inside these brackets are treated as part or body of the function.

Here, there are two lines of code in the body of the ‘main’ function. The first is ‘printf(“n Hello World n”);’. Printf is a system library function that prints formatted strings on STDOUT. For now, just keep in mind that it prints anything you supply within double quotes (” “) except escape sequences (like ‘n’, which is translated into a newline). The second line of the body is ‘return 0’. It basically marks the end of the ‘main’ function and sends ‘0’ as the result to the function that called ‘main’.

So all in all, we should expect this program to print ‘Hello World’ in output.

Compile and execute C program

Now that we have understood a simple C program, lets go ahead and execute it. So the first step would be save the code in a file named, say, hello-world.c. You can use the Vim editor to do this. Once you save the code in hello-world.c, make sure you have the gcc tool installed on your Linux system. If not, you can download and install (at least on Ubuntu) using the following command:

sudo apt install gcc

Gcc is basically a GNU compiler for the C programming language. Once it’s there on your system, just use it in the following way to compile the hello-world.c program:

gcc -Wall hello-world.c -o hello

Here, -Wall is a gcc command option that enables a lot of compilation time warnings that the compiler would otherwise not throw. The other option you see is -o, which is used to specify an output file name. So in this case, we want the output file to be named ‘hello’.

As you run the command mentioned above, you’ll see a file named ‘hello’ will be produced. It’s an executable file. you can run it in the following way:

./hello

For example, when I executed this command, the following output was produced:

Hello World Program in C Programming Language

So you can see, ‘hello world’ was produced in the output.

Conclusion

In this article, we learned the very basics of C programming language using a demo program. Now that we know how to write, compile and execute a C program, we will step into other aspects in the next article. Stay tuned.

How to Install ProcessWire CMS on Ubuntu 18.04 LTS

How to Install ProcessWire CMS on Ubuntu 18.04 LTS

ProcessWire is a free and open source PHP-based content management system and content management framework. It is a simple, flexible and powerful CMS built to save you time and work the way you do. ProcessWire provides easy to use web interface that enables you to publish websites easily. It is specially designed for ease of use that allows you to create powerful and dynamic content websites.

Features

  • Role-based access control system.
  • Web-based graphical installer.
  • Provides fully modular plugin architecture and powerful template system.
  • Multi language support.
  • Supports rich text editing.
  • Drag-and-drop file and image uploads and editing functions.

In this tutorial, I will explain how to install ProcessWire with Apache web server on Ubuntu 18.04 LTS.

Requirements

  • A server running Ubuntu 18.04..
  • A non-root user with sudo privileges.

Getting Started

Before starting, you will need to update your system with the latest version. You can do this by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is updated, restart the system to apply the changes.

Install Apache, MariaDB and PHP

First, you will need to install Apache web server, MariaDB server, PHP and other PHP modules to your server. You can install all the packages by just running the following command:

sudo apt-get install apache2 mariadb-server unzip wget php7.2 php7.2-mysql php7.2-curl php7.2-json php7.2-cgi libapache2-mod-php7.2 php7.2-xmlrpc php7.2-gd php7.2-mbstring php7.2 php7.2-common php7.2-xmlrpc php7.2-soap php7.2-xml php7.2-intl php7.2-cli php7.2-ldap php7.2-zip php7.2-readline php7.2-imap php7.2-tidy php7.2-recode php7.2-sq php7.2-intl -y

Once all the packages are installed, open php.ini file and make some changes:

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

Make the following changes:

memory_limit = 300M
upload_max_filesize = 200M
max_execution_time = 400
date.timezone = Asia/Kolkata
sudo systemctl restart apache2
sudo systemctl restart mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb

You can now check the status of MariaDB service with the following command:

sudo systemctl status mariadb

Output:

? mariadb.service - MariaDB 10.1.34 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-12-01 22:46:13 UTC; 9h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 1317 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 1313 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
  Process: 935 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemc
  Process: 931 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 819 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 1164 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 27 (limit: 2323)
   CGroup: /system.slice/mariadb.service
           ??1164 /usr/sbin/mysqld

Dec 01 22:45:54 ubuntu1804 systemd[1]: Starting MariaDB 10.1.34 database server...
Dec 01 22:46:05 ubuntu1804 mysqld[1164]: 2018-12-01 22:46:05 140324667522176 [Note] /usr/sbin/mysqld (mysqld 10.1.34-MariaDB-0ubuntu0.18.04.1) 
Dec 01 22:46:13 ubuntu1804 /etc/mysql/debian-start[1318]: Upgrading MySQL tables if necessary.
Dec 01 22:46:13 ubuntu1804 systemd[1]: Started MariaDB 10.1.34 database server.

Configure MariaDB

By default, MariaDB installation is not secured. So, you will need to secure it first. You can secure it by running the following command:

sudo mysql_secure_installation

Answer all the questions as shown below:

    Enter current password for root (enter for none):
    Set root password? [Y/n]: N
    Remove anonymous users? [Y/n]: Y
    Disallow root login remotely? [Y/n]: Y
    Remove test database and access to it? [Y/n]:  Y
    Reload privilege tables now? [Y/n]:  Y

Once the MariaDB is secured, log in to MariaDB shell:

mysql -u root -p

Provide your root password. Then, create a database and user for ProcessWire with the following command:

MariaDB [(none)]> CREATE DATABASE processdb;
MariaDB [(none)]> CREATE USER process;

Next, grant privileges to the ProcessWire database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON processdb.* TO 'process'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;

Next, exit from the MariaDB console with the following command:

MariaDB [(none)]> exit

Download and Install ProcessWire

You can download the latest version of ProcessWire from Git repository using the following command:

wget https://github.com/processwire/processwire/archive/master.zip

After downloading, unzip the downloaded file with the following command:

unzip master.zip

Next, copy the extracted directory to the Apache web root directory with the following command:

sudo cp -r processwire-master /var/www/html/processwire

Next, give proper permissions to the processwire directory with the following command:

sudo chown -R www-data:www-data /var/www/html/processwire/
sudo chmod -R 777 /var/www/html/processwire/

Configure Apache for ProcessWire

Next, you will need to create an Apache virtual host file for ProcessWire. You can do this by running the following command:

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

Add the following lines:


     ServerAdmin [email protected]
     DocumentRoot /var/www/html/processwire
     ServerName example.com

     
          Options +FollowSymlinks
          AllowOverride All
          Require all granted
     

     ErrorLog ${APACHE_LOG_DIR}/processwire_error.log
     CustomLog ${APACHE_LOG_DIR}/processwire_access.log combined

Save and close the file, when you are finished. Then, enable Apache virtual host file and rewrite module with the following command:

sudo a2ensite processwire.conf
sudo a2enmod rewrite

Finally, restart Apache service to apply all the changes:

sudo systemctl restart apache2

Access ProcessWire

Open your web browser and type the URL http://example.com. You will be redirected to the ProcessWire Welcome page:

ProcessWire Installer

Now, click on the Get Started button. You should see the following page:

Site Installation Profile

Select Classic site installation profile and click on the Continue button. You should see the following page:

Compatibility Check

After validating all the requirements, click on the Continue To Next Step button. You should see the following page:

Database setup

Timezone and file permissions

HTTP Host Name

Here, provide your database details like, hostname, database name, database username and password, Timezone. Then, click on the Continue button. You should see the following page:

Test Database configuration

Admin account setup

Cleanup

Here, provide your Admin login URL, admin username and password. Then, click on the Continue button. Once the installation completed successfully, you should see the following page:

Setup completed

Now, click on the Login To Admin button. You should see the following page:

Admin Login

Provide your admin username and password. Then, click on the Login button. You should see the ProcessWire default dashboard in the following page:

Admin dashboard

Install WordPress 5 with Apache on Debian 9

Install WordPress 5 with Apache on Debian 9

This tutorial will show you how to install and configure the latest version of WordPress 5 on top of a LAMP stack in Debian 9 – Stretch. WordPress, without a doubt, is one of the most popular open-source Content Management System or CMS used in these days for internet publishing, which powers more than 60 million websites worldwide, whether small blogging sites or notable huge name brands. Based on PHP and MySQL engine, WordPress is often associated with LAMP collection, either installed on dedicated servers or virtual private servers or on shared web-hosting providers. LAMP acronym describes a collection of software, aka software bundle, which usually consists of Linux Open Source kernel, regardless of the chosen distribution, Apache HTTP server, which is one of the most popular open-source web server in internet due to its stability, flexibility and performance, PHP server-side interpreted programming language and MariaDB relational database management system (RDBMS), which one of the most popular database software, forked and simultaneously developed by the open-source community from original MySQL.

Requirements

  • A clean installation of Debian 9 operating system on a virtual private server or a virtual machine or directly on a dedicated bare-metal machine.
  • SSH remote access in case of a VPS or a remote server or direct console access
  • At least a static IP Address for a network interface configured on the server
  • In case the webpage should be publicly available in internet you would need a registered public domain name with proper DNS records configured. During this tutorial, we’ll be using the example.com as the example domain and a static IP address from private space, in NAT, behind the main router. The domain will be accessible from the internet by port forwarding the Apache 80 and 443 ports from the router side to internal self-hosted virtual machine LAN.

Install LAMP Software Bundle

The first thing you want to do before starting to install all LAMP components is to log in to Debian 9 server and perform an up-to-date procedure for all system components, such as kernel upgrades, package updates or security patches, by issuing the following commands with root privileges.

apt-get update
apt-get upgrade
apt-get dist-upgrade

In the next step, you should set up the name of your machine by replacing the hostname variable with your own descriptive name by running the below command. Be aware that you might need to reboot the system in order to apply the new hostname accordingly.

hostnamectl set-hostname hostname.yourdomain.com

You should also install the following utilities which will come in handy later for various troubleshooting problems.

apt install net-tools sudo wget curl bash-completion

After the machine hostname has been applied, login again with root privileges and install Apache HTTP server, which is, by default, pre-compiled into a binary package and provided by Debian 9 repositories.

apt install apache2

Next, install the latest version of PHP language interpreter and all required modules needed for Apache web server in order to deploy WordPress CMS by issuing the following command.

apt install libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-xml php7.0-curl php7.0-mbstring php7.0-mcrypt php7.0-xmlrpc

The last component missing now in order for LAMP stack to be complete is MariaDB database server. Execute the following command to install MariaDB server alongside with PHP module required to access the database from Apache HTTP server.

apt install php7.0-mysql mariadb-server mariadb-client

After MariaDB database has been installed, start the daemon and secure the database my running mysql_secure_installation script as illustrated in the below excerpt. Mainly answer with yes on all question the script prompts you. Also, make sure you choose a strong password for root account. Be aware that MySQL root account is not identical will Linux root account. The first is used only to manage the MariaDB database and the second is the superuser account in every Linux system. These accounts never overlap in a system.

systemctl start mariadb
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
 
In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
 
Enter current password for root (enter for none):
OK, successfully used password, moving on...
 
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
 ... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
 ... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
 ... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

We’re not done with securing MariaDB database yet. By default, you can log in to MariaDB from localhost with the database root account without being asked for a password. To prevent possible security issues, login to the database with root user and issue the following commands.

mysql -u root -p
MariaDB> use mysql;
MariaDB> update user set plugin='' where User='root';
MariaDB> flush privileges;
MariaDB> quit

 Remove plugin from MySQL root user

Now, test the database by trying to log in with root account without the password. You should be denied access to MariaDB database.

In the next step, we’ll enable and configure TLS and rewrite modules for Apache web server, which by default are disabled. Run the below commands to enable both modules.

a2enmod rewrite ssl
a2ensite default-ssl.conf

Then, open Apache configuration files for both enabled sites and add the following block below the DocumentRoot directive as illustrated in the following screenshot.

nano /etc/apache2/sites-enabled/000-default.conf
nano /etc/apache2/sites-enabled/default-ssl.conf

 In both configuration files add the following block of code:

    
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Require all granted
   

 Grant access to /var/www/html directory and allow overrides

In apache default-ssl.conf TLS configuration file you can also add the below content, if not existing, in order to improve security of Apache SSL protocol. These lines of code should fix common SSL vulnerabilities.

SSLProtocol all -SSLv2 -SSLv3
# Add SSL Cipher in one long line
SSLCipherSuite          ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
SSLHonorCipherOrder     on
SSLOptions +StrictRequire
 
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains"
Header always set X-Frame-Options DENY
Header always set X-Content-Type-Options nosniff

Set strict SSL settings in apache2

If the lines illustrated in the above excerpt already exist in the Apache SSL configuration file, make sure you modify them to look as described above. In order to apply these settings, enable the Apache headers module and restart the service by executing the following commands:

a2enmod headers
systemctl restart apache2.service

For a production website, it should be mandatory to enable Apache TLS module because WordPress CMS generates mostly dynamic content via PHP gateway and also handles the authentication process for its internal users. Using TLS technology guarantees that the transferred information is encrypted at both ends and that the connection is secured. A third-party or a man-in-the-middle can intercept traffic but can not decrypt the content, because the information is not delivered in plain text.

After you’ve made all the above changes, test Apache configuration in order to detect potential syntax errors and if everything is ok then restart LAMP daemons in order to reflect all changes made so far and enable the services system-wide by issuing the following commands.

apache2ctl -t
systemctl restart apache2.service mariadb.service
systemctl enable apache2.service mariadb.service

Finally, check if Apache and MariaDB services have opened ports in listening state by issuing netstat command and filter the output using egrep By now, Apache web server should have ports 80 and 443 (corresponding to HTTP and https protocols) generally exposed and MariaDB should be only binding on localhost:3306 socket. Use the -n flag against netstat command to suppress displaying service names.

netstat -tlp| egrep 'http|mysql'

 Check if MariaDB is started

To make sure your web server is accessible from the internet via HTTP and HTTPS protocols open a browser and navigate to your domain name. Browsing via HTTPS protocol, a certificate error will be displayed in the browser. This is because Apache default TLS configuration file is configured to use Self-Signed Certificates. You should accept the TLS error and continue navigating to the default web page as illustrated below.

http://www.yourdomain.com 

Apache2 test page

https://www.yourdomain.com 

Apache 2 test page in SSL mode

In case you cannot visit your domain default web page from the internet you should first verify if some firewall rules in the system are blocking the requests or make sure the proper ports on the router are forwarded into your internal LAN in case the server sits behind a NAT-ed network. You might also want to check the DNS records in your domain registrar panel and make sure they point to your WAN IP and if the records finished propagating on the internet.

In order to test if PHP is working as expected on the server side, create a PHP php in /var/www/html/ system path, which is the default web document root path of Apache web server, issuing the below command and navigate to the following URI from browser to get the result: http://www.yourdomain.com/info.php

echo '' > /var/www/html/info.php

 PHP info test page

Install WordPress 5.0

Now that the LAMP stack is fully configured, the installation of WordPress CMS is relatively straightforward. First, log in to MariaDB database and create an installation database for WordPress and a user with the proper password for installing and managing WordPress CMS, by issuing the below commands. Feel free to replace the database name and database credentials to match your own requirements.

mysql -u root -p
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress-user'@'localhost' IDENTIFIED BY 'wordpress-pass';
FLUSH PRIVILEGES;

 Create WordPress MySQL database and Database User

Next, download the latest WordPress tarball from the official website using wget utility and extract the compressed archive with tar utility. Copy the installation files to Apache web server document root path by issuing the below commands. Also, make sure you remove the default index.html webpage.

cd /tmp
wget http://wordpress.org/latest.tar.gz
tar xfz latest.tar.gz
cp -rf wordpress/* /var/www/html/
rm /var/www/html/index.html

 Download and unpack WordPress on your server

Modify the permissions of Apache webroot path as described below in order to grant web server www-data group full write permissions to the installation directory. This configuration will allow Apache web server to create or modify files and directories under this specific system path. The most important ones would be the uploads directory and .htaccess file, which can be used to control and extend Apache functionality.

chmod -R 775 /var/www/html/
chgrp -R www-data /var/www/html/
ls -al /var/www/html

 WordPress files

Now, that everything is in place, let’s start to install WordPress. The installation process will be performed from the browser. Open a browser and visit your domain via HTTPS protocol. On the first screen of the installation hit on Let’s go button to start the installation.

 WordPress web installer

In the next installation screen, add the name of the database, the database access credentials and the database host you’ve created earlier for WordPress installation and hit the Submit button to continue. The configuration of the database will be saved in /var/www/html/wp-config.php You can manually modify the file at a later date for special WordPress purposes.

Database settings

On the next screen click on Run the install button and fill your website title, the website admin credentials, and email address. A strong password should be automatically generated by the installation scripts. You can choose to save this password or provide your own strong password. When you’ve finished, hit Install WordPress button to complete the installation process.

Run installation

WordPress site information

Finally, after the installation successfully completes, log in to WordPress dashboard with the credentials created during the installation process and start managing your own website.

 WordPress Installation Success

WordPress admin login

Log into WordPress backend.

WordPress Backend

WordPress Admin Dashboard.

Editing a post in the new WordPress Gutenberg Editor.

WordPress 5.0 Frontend with new TwentyNineteen Theme.

Congratulations! You’ve successfully installed the latest version of WordPress CMS on top of LAMP software bundle in Debian 9, codename Stretch.

Virtual machine image download of this tutorial

This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual machine image uses the following login details:

SSH / Shell Login

Username: administrator
Password: howtoforge

This user has su rights.

Username: root
Password: howtoforge

WordPress Login

Username: admin
Password: howtoforge

MySQL Login

Username: root
Password: howtoforge

The IP of the VM is 192.168.1.100, it can be changed in the file /etc/network/interfaces. Please change all the above passwords to secure the virtual machine.

Codero Selected by Microsoft to Participate in Azure SQL Database Managed Instance Pilot

Codero Selected by Microsoft to Participate in Azure SQL Database Managed Instance Pilot

OVERLAND PARK, KS – Codero Holdings, Inc. (Codero), a pace-setter in controlled internet hosting and era enablement, has been selected via Microsoft as one in every of a choose staff of Datacenter Optimization Companions to pro-actively reinforce and organize Azure SQL Database Controlled Example as a part of a pilot program. Controlled Example is a brand new useful resource kind in SQL Database that streamlines the migration of SQL Server workloads and combines the most efficient of SQL Server with all of the advantages of an absolutely controlled database provider. This pilot is designed to boost up SQL Server migrations to Azure SQL Database Controlled Example, the optimum vacation spot within the cloud for companies that experience efficiency and latency IO necessities.

Shoppers who migrate to a controlled example will obtain back-end control from Microsoft — together with OS patches, redundancy, and top availability promises — whilst Codero supplies pro-active, top class control to make sure every corporate’s database assists in keeping up with organizational expansion and ever-changing calls for.


As a player within the Microsoft Azure Cloud Answer Supplier Program, Codero’s workforce is qualified to control Azure-based products and services, having already migrated 1,000-plus servers to Azure in 2018.

“We are well versed and experienced in architecting, optimizing, and managing Azure environments, and we’re ready to help customers achieve such an improvement in their database performance, reliability, and ROI that they notice a big difference in their day-to-day operations,” Codero Leader Income Officer Ric Riddle stated. “It’s an honor that Microsoft has selected us as a trusted pilot participant, and we look forward to making lifetime believers out of many new SQL Managed Instance customers in the months ahead.”

As IT control turns into tougher for time- and resource-strapped in-house IT groups, firms are migrating to controlled answers for techniques they have got historically hosted on-premise, together with SQL Server. Azure SQL Database Controlled Example is extremely suitable with on-premise SQL Server in order that migration and onboarding are more straightforward and not more time eating.

As soon as migrated, shoppers enjoy as much as 30 occasions progressed throughput and latency and as much as 100 occasions quicker queries and reviews with in-memory applied sciences, consistent with Microsoft. The cloud-based fashion additionally brings dynamic scalability and as much as 406 p.c ROI as opposed to on-premise or hosted databases.

To get began with migration or be told extra about Azure SQL Database Controlled Example controlled via Codero, chat with a consultant at http://www.codero.com.

About Codero
Codero is helping shoppers and companions thrive within the cloud. A era enabler that facilitates the adoption and use of complex and customized cloud answers, Codero supplies controlled, devoted, and hybrid multi-cloud products and services, sponsored via remarkable customer support. The corporate provides a various portfolio of totally controlled choices from naked steel servers inside of its personal information facilities to customized cloud and era answers. Codero serves over 3,500 shoppers international.

A2 Hosting Announces Proprietary Plugin Compatible with WordPress 5

A2 Hosting Announces Proprietary Plugin Compatible with WordPress 5

ANN ARBOR, MI – A2 Web hosting, a dedicated supplier of high-performance shared internet hosting, WordPress Web hosting, and extra, as of late introduced that its A2 Optimized Plugin can be appropriate with WordPress 5.

WordPress Five first entered beta in October, and is slated for a complete free up within the very close to long term, WordPress Five includes a entire redesign and reimagining of the WordPress Editor. The replace additionally comprises enhancements to the WordPress Relaxation API, improvements to the customized theme and web page construction revel in, and an total extra intuitive revel in.


With an eye fixed on simplicity, A2 Web hosting supplies a internet hosting surroundings that meets WordPress necessities through default. In different phrases, there’s no tinkering required in your finish to get your web page up and working easily (and with higher safety).

The A2 Optimized plugin is designed to assist customers simply optimize their WordPress websites for pace, safety, and function. To that finish, it’s designed to routinely configure W3 Overall Cache, optimizing your web site with minimum effort in your phase. Those gear and utilities will help A2’s purchasers in construction the most productive web site conceivable, permitting them to concentrate on content material and branding quite than optimization.

The plugin is obtainable without cost, with further options to be had to A2 Web hosting consumers.

“At A2 Hosting, we always strive to offer the best experience imaginable for our clients,” explains Brad Litwin, Advertising Supervisor at A2 Web hosting. “To that end, our shared environment meets WordPress’s recommended hosting environment by default, and we offer a comprehensive set of Managed WordPress hosting solutions. Our experts are also constantly testing the ideal WordPress configuration, tweaking it to offer the fastest page loads, best performance, and highest security possible.”

“Providing webmasters with a seamless upgrade to the most game-changing version of WordPress yet is one more aspect of our commitment to excellence, and one more way our plugin can enhance our clients’ WordPress experience,” he continues. “Clients are free to enjoy all the versatility WordPress has to offer, without the technical challenges it can present – to focus on building their site, writing content, and promoting their brand while we manage the rest.”

A2 Web hosting, Inc. is a high-performance internet hosting corporate positioned in Ann Arbor, MI. A2 Web hosting supplies their consumers with ultra-reliable answers and 24/7/365 US-based reinforce from their Guru Workforce staff. Since 2003, A2 Web hosting has introduced cutting edge, inexpensive and developer pleasant web site internet hosting for private homepages as much as full-service answers for companies of all sizes, founded in all places. Each and every A2 Web hosting provider is hosted on their fine-tuned SwiftServer Web hosting platform. Consumers looking for an extra pace spice up can host on A2 Web hosting’s Turbo Servers that includes web page load speeds as much as 20X quicker in comparison to competing hosts.

To be informed extra about A2 Web hosting, discuss with https://www.a2hosting.com

About WordPress
WordPress began in 2003 with a unmarried little bit of code to improve the typography of on a regular basis writing and with fewer customers than you’ll be able to rely in your hands and feet. Since then it has grown to be the biggest self-hosted running a blog instrument on the planet, used on tens of millions of websites and noticed through tens of tens of millions of other people each day. WordPress began as only a running a blog machine, however has developed for use as a complete content material control machine and so a lot more via the usage of 1000’s of plugins, widgets, and subject matters. WordPress is proscribed simplest through your creativeness.