Published September 19, 2018 by

Connect AWS RDS MySQL instance with phpMyAdmin

In this tutorial, we will learn how to connect AWS RDS MySQL server with phpMyAdmin.


Follow below steps to configure:


Step 1:
Install Apache Web Server
sudo apt-get update -y
sudo apt-get install apache2 -y
sudo systemctl start apache2.service
Verify that Apache was installed without errors by accessing it from your local browser. Enter http://SERVER_IP/

Step 2:
Install PHP
sudo apt-get install php -y
sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} 
sudo apt-get install libapache2-mod-php  -y
Step 3:
Restart Apache
systemctl restart apache2.service
Step 4:
Install and configure phpMyAdmin
cd /var/www/html/
Download phpMyAdmin from an authorized website using wget command
wget https://files.phpmyadmin.net/phpMyAdmin/4.7.3/phpMyAdmin-4.7.3-all-languages.zip
Unzip phpMyAdmin
unzip phpMyAdmin-4.7.3-all-languages.zip
Rename phpMyAdmin and go to phpMyAdmin folder
mv phpMyAdmin-4.7.3-all-languages phpmyadmin
cd phpmyadmin
Edit the configuration file for phpMyAdmin.
vim config.sample.inc.php
Below is a default file
/* Server parameters */ 
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Now, edit this file according to below file
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'RDS MYSQL ENDPOINT';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
Save file and Close.

You can get 'RDS MYSQL ENDPOINT' from AWS RDS console. 


Step 5:
Restart Apache
systemctl restart apache2.service
Step 6:
Open inbound port 3306 in RDS Security group for access MySQL to phpMyAdmin. you can give which IP where phpMyAdmin is installed in Security group.

Step 7:
Access phpMyAdmin from your local browser. Enter http://SERVER_IP/phpMyAdmin 
enter username and password of your RDS. and access it.
Read More
Published September 09, 2018 by

Git - Delete Branches

Below are some steps to clean branches from the git repository to remove the clutter.

Delete a Local branch

To delete the local branch in Git using the command, we can use one of the followings:

# git branch -d branch_name
# git branch -D branch_name

As you can see above, we have 2 different arguments, one with small case d and one with capital case D.

The -d option stands for –delete, which would delete the local branch. The -D option stands for –delete –force, which deletes the branch even if there are uncommitted changes.

Delete a remote branch

To delete a remote branch, we can use the following command:

# git push {remote_name} –delete {branch_name}

Above command can also be used if we want to delete git tags.
Read More
Published September 09, 2018 by

Check Code Quality in Jenkins

With Jenkins Checkstyle plugin we can generate a report of code quality.

Install Checkstyle Plugin in Jenkins

Go to Dashboard -> Manage Jenkins -> Manage Plugins and select Available tab. Find "Checkstyle" and install it.


Once a plugin is installed Click on Job Configure


In Post-build Actions add Publish Checkstyle analysis results.



Your pom file has to be configured to use this checkstyle report.

Click on Save.

Click on Build Now


If there are any errors and warnings, it will be shown and categorized.




Read More
Published September 09, 2018 by

Pull Source Code from Code Repository in Jenkins

In this tutorial, we learn How to Pull Source Code from the Code Repository in Jenkins Job. This option will enable Jenkins to monitor code repository and as soon as some changes are committed on the repository, Jenkins will initiate project build for the project.

Under project click Configure



Under Source Code Management choose your Code Repository and paste Repository URL.



Under Build Triggers tick on Poll SCM and specify a time interval for checking the repository for changes if you want else skip it. (this step is optional)

Click on Save.

Crontab format



Click Build Now


See job log in console output.


Read More