Install DSpace 6.x on Ubuntu 18.04 -Step 1

Install Dspace 6.x prerequisite applications
Below is the the first steps on how to Install Dspace 6.x Digital Repository.
Open Applications > Accessories > Terminal and execute the following commands. Apply following commands,
sudo apt update
sudo apt upgrade
Install vim Editor, Java JDK, Postgresql, ant and Maven
sudo apt install vim openjdk-8-jdk ant maven postgresql
Login to PostgreSQL and create the database
sudo su postgres
createuser --username=postgres --no-superuser --pwprompt dspace
Enter a password for new role: [Enter a password e.g. dspace]
Shall the new role be allowed to create more new roles? (y/n) n
[Enter n and press enter button]
createdb --username=postgres --owner=dspace --encoding=UNICODE -T template0 dspace
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
exit
Open the following file,
sudo vim /etc/postgresql/9.6/main/pg_hba.conf
Add this line to the configuration file at the end:
local all dspace md5
save and close the file
Restart PostgreSQL :
sudo /etc/init.d/postgresql restart
Dspace DSpace 6.x installation Installation of DSpace maven openjdk-8-jdk Postgresql Ubuntu