Ubuntu

Automate Website setup on Ubuntu

Now, before we delve into how you can automate website on Ubuntu, let’s first shed light on some facts about Ubuntu that are unknown to most of the tech geeks out there. So, without further ado, let’s start with the basics:

Ubuntu is based on free single software platform and is open source. It is issued by Canonical Ltd and they also offer you commercial support. There is a fact related to the origin of its name that it is named after the Southern African philosophy. The literal meaning of Ubuntu happens to be ‘Human-ness’. It can be loosely translated as ‘humanity to others’ or ‘I am what I am because of who we all are’.

So basically unity as being human is used as the default user interface for the desktop view. Ubuntu is Debian-based Linux operating system which runs on your PCs, tablets, and smartphones. It happens to be the most popular server Linux distribution operating system which runs on cloud hosting environments. The main purpose of it is to help in making the converged computing a reality such as one system, one experience but multiple form factors.

Now that we are done with the basics, let’s directly jump on how to setup website automation on Ubuntu. So let’s get started with the process:

This Automation Supported For LAMP Environments

You need to enable MySQL root login without typing the credentials.

Enable MySQL root client file “.my.cnf” on the root home directory. This will enable the script to run without any issue on your website.

Here is a sample example of that:

vi /root/.my.cnf

[client]

user = root

password = your_password

 

FTP Server Installation

If you require FTP server, you can follow the step mentioned below to install it and our script also supports it.

Install MySecureShell for the purpose of Secure File Transfer Protocol(SFTP) which supports our script while you follow the steps mentioned below:

apt-key adv –keyserver pool.sks-keyservers.net –recv-keys E328F22B

add-apt-repository ‘deb http://mysecureshell.free.fr/repository/index.php/ubuntu/12.04 testing main’

apt-get update && apt-get install mysecureshell

apt-key adv --keyserver pool.sks-keyservers.net --recv-keys E328F22B

 

The mentioned steps below are the feature of the script that I am sharing for your ease of use:

– Then it will  Create Apache Vhost (VirtualHost) and then Enable it.

– After that it will Create new user for MySQL.

– For your new site it will  Create New Database.

– Next things it will Create New Web Directory. Create SFTP/SSH User and jailed it onto the new website directory.

Now all the credentials will be located on your new web root/directory.

 

For Your convenience, I am mentioning the link here: https://dl.dropboxusercontent.com/u/75125577/blog/website_setup.sh

NOTE: From where you want to execute the script, you MUST edit the path in the script I have provided.

Cheers! And feel free to share your feedback by leaving a comment in the comments section below!

Syed Ejaz Ahmed Hashmi

Syed Ejaz Ahmed Hashmi

Senior DevOps Engineer at Arpatech
Syed Ejaz has a vast experience in Linux systems and Cloud Base environments. He is currently a Senior DevOps Engineer at Arpatech, holding responsibilities of managing servers on cloud worldwide, with a strong understanding of DevOps mythology and practices. He always keeps himself up to date with latest technologies and trends. You can follow him on Twitter at @jazi2006 or contact him through e-mail syed.ejaz[at]arpatech.com
Syed Ejaz Ahmed Hashmi

Latest posts by Syed Ejaz Ahmed Hashmi (see all)

Arpatechops - Managed Ecommerce Hosting Solutions
ArpatechOps bring you E-commerce
Managed Hosting and Application
Support services.

FEATURED SERVICE

Social

  • Facebook Linkdedin Twitter