Installing wordpress on Linux using Bitnami

We already installed the individual LAMP(apache server, mysql server, php) stack for working with wordpress on linux(ubuntu) environment.

You don’t have to see the whole staircase. Just take the first step 

In case we want to make our life bit easier, we can install the above LAMP stack with one push button using Bitnami.

How to install?

1. Open the > applications > wordpress > local install > download the package(which is by default selected as linux, based on the OS configuration of your PC)

local install bitnami linux

2.Change the permission on downloaded .run file as below
chmod a+x ./ 
launch the run file as ./
 giving permission on .run file in linux
3.Select the default options through the installer package

installation of bitnami for linux
Note:- Do remember the username and password that are used in the setup.(It’ll be used for wp-admin login to wordpress)

admin acccount for wordpress in bitnami
4.After installation is complete >finish and  browser will launch the bitnami page on default port

5.Click on the link to access wordpress or open the URL :-
 access wordpress on bitnami
6.You can configure the default port, check the phpmyadmin from the manager window.
manager for bitnami on linux

Do more configurations:-
1.Open the location where bitnami is installed, wp-bitnami/apps/wordpress/htdocs/
This is the place where all the wordpress files are present, edit this to create new themes, plugins, change configurations.

For Example1, 
a)open the htdocs folder in code editor lets say sublime
b)wp-content/ — create a new folder say child and with file style.css
c)write the below comments into style.css file
Theme Name: Child of Twenty Seventeen
Template: twentyseventeen

working with htdocs file in wordpress

d)Check that corresponding theme is shown in appearances/themes from URL of the wordpress

child theme in wordpress created using style.css

Example2:-Place new theme/plugins downloaded from internet, 
htdocs/wp-content/plugins/ —place it here

Keep Learning and keep exploring :)

Enable auto save feature in Sublime editor

Problem:- How to add auto-save functionality in Sublime-Text?


Using auto-save package.

How to install this?
1)Open package Control in sublime (Ctrl+Shift+p)

open install package control sublime
2)Search and select install option 

3)Search auto-save and select it 

4)Enable auto-save

Press Command + Shift + P again and search for AutoSave. Here, there are 3 options:(select the one that you want to enable)

  • Toggle AutoSave: all files
  • Toggle AutoSave: current file only
  • Toggle AutoSave Backup: current file only
    enable auto save in sublime editor

Install and Configure MySql on Linux?

Frank Herbert
Installation for mysql is similar to installing apache server and php on Ubuntu. 
Step1:- Open terminal window and type the below command(install mysql-server)

sudo apt-get install mysql-server


Adding root password in installing mysql
  • Add root password in the dialog box after installation. 
  • Incase any pop up comes during installation just accept the default and continue the installation process.

Step2:- Install workbench(IDE) to work with MySql
sudo apt-get install mysql-workbench

Step3:- Start mysql workbench
a)Type the below command in terminal
b)Open the default localhost instance and add “root” password.

Launch localhost in mysql

Note:- You can add workbench to launcher and open it from terminal as well from launcher.

Step4:- Create schema(database) in workbench.
a)Databases > New
b)Add schema name, select collation value say “utf8” > Apply > Close

Add new schema in workbench

c)Now we can create our tables inside the database.

So now we have Apache, MySQL, and PHP running on Linux, the complete LAMP stack. 


Install and configure PHP on ubuntu?

“Without new experiences, something inside of us sleeps. The sleeper must awaken.” Frank HerbertFrank Herbert t

Step1:- Open terminal window and type the below command(install php)

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

We have used extra parameters for configuring php to use apache server that we already installed and also to connect with mysql. So we dont do any configurations manually 

Step2:- Verify the installation of PHP
We need to create sample php script inside the root of apache server and open it in the apache server
a) cd to apache root path, cd /var/www/html/
b) Create test.php file, sudo nano test.php
c)Add the basic phpinfo function call into file, save and exit (ctrl+x > y > enter) the nano editor
create php script inside apache root folder

d) Start apache server (sudo apachectl start) and check the test.php file(open localhost/test.php) 

launch php file in server

Step3:- Configure php settings 
a)Lets say we want to enable php logs, we need to open php.ini file 
sudo nano /etc/php/7.0/php.ini
b)Search display_errors in php.ini file and turn it to on
ctrl+w(for searching in nano)

change php.ini file
c)Restart the apache server
sudo apachectl restart
d)Check that settings are changed by checking the browser

php.ini file configured in server

Install and configure Apache server on Ubuntu?

Quick recipe to install and configure apache server?
Step1:- Update the package manager and install apache2
Execute the below commands in terminal:- 

  • sudo apt-get update
  • sudo apt-get install apache2

sudo – super user
apt-get, for latest package

Step2:- Edit the apache configuration file

  • sudo nano /etc/apache2.conf

edit apache config file

Scroll to the end and add,  ServerName localhost
ctrl +x (for exiting the editor) , press y and enter

Step3:-Check that server is running or not

  • sudo apachectl stop

Step4:- Start the apache server

  • sudo apachectl start

Step5:- Open browser with localhost, and see our server is running and launch a index.html file(note, we have changed our port to 403)

index page on launching apache server

Note:- This index.html file which apache server showed above can be located in /etc/apache2/var/www/html

Errors:- Incase default port 80 is already used you will get the below error on starting apache server?
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

Solution:- Change the port value inside /etc/apache2/apache2.conf say to different port 403, now restart the apache server and open localhost:403, it will launch the server

Keep Learning and Keep Sharing 🙂

Install MySql
Install PHP 

Tips and Tricks for working with Robot Framework – Part-1

If you are still looking for that one person who will change your life, take a look in the mirror.

Problem1:- How i can generate random test data in Robot framework?

Solution:- Use FakerLibrary

Install :- 
pip install robotframework-faker

Note:- Include FakerLibrary in settings as “Library FakerLibary”

Example:- To generate random number we can use code as below:-

generate random value in robotframework

Problem2:- How to generate random value within given range?

Solution:- Using Random keyword

${randomValue} Evaluate random.randint(0, 5000) modules=random

Generate random value in robot framework

Problem3:- How to take screenshot on failures in Robot Framework?

Solution:- Using Screenshot library
1. Include the library in settings like Library Screenshot path_of_Directory 
2. Capture the screenshot on failure

Screenshot in robot framework

Problem4:- How to refresh browser in Robot Framework?
1. Use “Reload” keyword
2. Use “Execute JavaScript” 

Refresh in browser using robot framework

More ways to Refresh?

Learn Robot Framework
Learn Java

How to use/configure Google Maps API in your application?

Requirement:- We need to implement google maps in our application, how we can configure that.
Note:- We can use the below approach to generate API key(lat and lng values) and need to install dedependency for adding google api in Vue.js project.

Step1:-Generate maps Key to use Google API
 a) Click the “GET A KEY” button
 b) Create the project/or use existing project
create map api project
 c) Enable API and we are done with key creation

create new project in google map api

Step2: Using Google guide and copy the html code into index.html file

 a)Replace the API key generated in above steps as below
 b)Run the index.html file and we are done.
change map key in api
Note:- In run results of Step2, we got some random place in Australia but we don’t want this.

Step3:- Generate co-ordinates for your map location that you want to show on maps
 a) Using Geocoder to generate our co-ordinates(lat, long)
 b)Enter address that you want your map should point to > click geocode it
generate lat and lng values

 c)Copy the latitude and longitude values 
 d)Change these values in your index.html > save > run
change lat and lng in map api of google

Step4:-Change the map type
 a)Change the MapTypeid
 mapTypeId :google.maps.MapTypeId.HYBRID
NOTE:- By default its RoadMap

Step5:- Change the zoom level of the map
a) we will use map.getZOom() method to define the zoom level.
Zoom the map and go to browser console and check the value of map.getZoom() 
Use the same value in index.html file
b)we’ll change map.getCenter() method to align the map in center.

How to disable draggle and scroll properties for map?
 Use draggable:false and scrollwheel:false

How to create pop up for the marker on map?

How to add animation effect to marker?

Importance syntax rules when working with JAVA

Lets learn some of the basic and critical rules that we should know as JAVA developers.

Being aware of a single shortcoming within yourself is far more useful than being aware of a thousand in someone else.

1. Name of Class should start with uppercase letter.
MyFirstClass rather than myfirstclass

2.Methods and variables of class should start with lower case (camel case)
myMethod is valid rather than MyMethod

3.Name of Class, variables and methods (all known as identifier) should always begin with alphabet or underscore.
_myMethod is valid rather than 12myMethod

Note:- Java code will still work if we dont follow the above rules but its not recommended.

4.In built keywords of Java cannot be used as name of identifiers.
while is invalid variable name as its defined keyword in java

5.All constant values should be defined in Uppercase letter.
public static final String UFTHELP = “Learn Technology”;

6.Each line of code should end with semicolon (;)
MyClass obj = new MyClass();

7.Most important, JAVA is case sensitive.
Example all the below variables are different for java:-
firstName, FIRSTNAME, FirstName

Learn Java

Creating Rest API using Sails framework?

What is Sails?

Sails is framework built over Express framework of Nodejs which automatically generates structure of rest api. It have numerous other features like supports MVC, connets to any database, supports most of the front end frameworks and many more

2. Install Sails  npm install -g sails ( installing sails package globally)

Creating our rest api project :-
Step1:- Create Sails project (with no frontend as we are showing api example)
sails new –no-frontend

Step2:- It will automatically create our template folders

sails framework folder structure

Inside api folder > controller is where we have our endpoints defined,
api > models, we create the defination for our resoureces that we would be serving
What is the meaining of folder inside sails project?

Step3:- Lets create a sensor resource with sensor endpoints
sails generate api sensor
Step4:-Check now our controllers and models folders contains the newly generateid resources named as SensorController.js and Sensor.js

Step5:- Define attributes property under api>models>sensor.js
say it be “sensorname”: “string”

Step6:-Run the sails app
sails lift

select any option from 1,2,3 of databse options when prompt asks

sails lift command

Step7:- Check the app in localhost:1337/sensor in browser
it will give empty list as we havent defined anything

Step8:- Sails have autogenerated end points thus open localhost:1337/sensor/create?sensorname=Airsensor

Step9:- Check that sensorname is getting added to localhost:1337/sensor
sails results in localhost