Skip to main content

Setting up the Development Environment for Spring Web Projects

The Required Programs For Java Development Environment


JDK1.8.0_212
ref link:
or
sudo vi ~/.profile


Add following lines in end
export JAVA_HOME=/usr/bin/java
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
log out and login so that the PATH is set .
to check the path you have set .. check the JAVA_HOME variable
Always 
source ~/.profile
source ~/.bashrc  
echo $JAVA_HOME
which java
java -version
So that the pc knows any changes have occurred in the respective files.
which java command to find the location of the java  

mongoDB

curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.22.tgz
tar -zxvf mongodb-linux-x86_64-3.2.22.tgz
mkdir -p mongodb cp -R -n mongodb-linux-x86_64-3.2.22/ mongodb
export PATH=(mongodb_install_directory)/bin:$PATH
replace the path with the install directory.

mySQL

sudo su   (login to root)
mysql -u root -p  


give password


postgreSQL

/configure
make
su
make install
root# mkdir /usr/local/pgsql/data


gedit ~/bashrc
exprot LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH

MANPATH=/usr/local/pgsql/share/man:$MANPATH
export MANPATH


sudo vim ~/.profile


export PATH=/usr/local/pgsql/bin:$PATH
root# chown postgres /usr/local/pgsql/data

(The chown command is used to change the owner and group of files, directories and links. By default, the owner of a filesystem object is the user that created it. The group is a set of users that share the same access permissions)


  1. root# su - postgres   (in the root@adrian type in the following)
  2. postgres@adrian-pc:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
  3. sudo su - postgres  (optional.no need of when logged on as the root)
  4. postgres -D /usr/local/pgsql/data >logfile 2>&1 &
  5. psql -h /var/run/postgresql



Differences between .bashrc and .profile

  • bashrc will be executed after the system boot up and is for non-login shell. It is specific to bash
  • profile will be executed after the user login. It's for login shell and can be read by different shells
  • source bashrc can be used to update bashrc and bash profile can be used to update profile
  • profile has the stuff not specifically related to bash, such as environment variables (PATH etc)
  • bashrc has anything you'd want at an interactive command line. Command prompt, EDITOR variable, bash aliases etc
  • bashrc must not output anything
  • Anything that should be available only to login shells should go in profile
  • Anything that should be available to graphical applications must be in profile check the sequence of the 3 files hierachy

bash is like the windows batch file equivalent




Comments

Popular posts from this blog

Hackerank Q&A

HACKERANK SQL PROBLEMS. Question: Generate the following two result sets: Query an  alphabetically ordered  list of all names in  OCCUPATIONS , immediately followed by the first letter of each profession as a parenthetical (i.e.: enclosed in parentheses). For example:  AnActorName(A) ,  ADoctorName(D) ,  AProfessorName(P) , and  ASingerName(S) . Query the number of ocurrences of each occupation in  OCCUPATIONS . Sort the occurrences in  ascending order , and output them in the following format: There are a total of [occupation_count] [occupation]s. where  [occupation_count]  is the number of occurrences of an occupation in  OCCUPATIONS  and  [occupation]  is the  lowercase  occupation name. If more than one  Occupation  has the same  [occupation_count] , they should be ordered alphabetically Answer:   select ( case when occupation= "Doctor" then concat( name ...

git

git is a useful platform for software project management where it gives you speed and efficiency when handling larger or smaller projects. git keeps track of your workflow and editing ,branching , merging and debugging the code is granted to different users. git config git config –global user.name “[name]” git config –global user.email “[email address]” git init  initiates git git clone clones git project to the current directory git add adding files to the staging area. git commit git commit -m “[ Type in the commit message]” records the files in the staging area permanently in the history git diff shows the files differences which are not yet staged git diff –staged This command shows the differences between the files in the staging area and the latest version present. git diff [first branch] [second branch] git commit -a This command commits any files you’ve added with the git add command and also commits any files you’ve changed since ...

10-09-2019_Week3-Wednesday

Creating a WebAPP of Movies to show Actors and movies Home Page Tabs Movies Actors. Buttons Add movie > movie submit Form Add actor > Actor submit Form Databases/Submit Forms Movies Name Year Genere Actors Description Image Actors Name fname last name  Date of birth  Description