CentOS7: Coding VM Setup

New VM

  • Container: RedHat x64
  • Video Memory: 128M
  • System Memory: 1G
  • HDD: 20G
  • Opitical:
    • CentOS-7-x86_64-Everything-1804.iso
    • CentOS-7-x86_64-Minimal-1708.iso

 


CentOS7 Install

check centos.org for referencing usage conventions

https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-filesystem-var.html

List Available Install Groups

yum group list

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: dallas.tx.mirror.xygenhosting.com
 * epel: mirror.compevo.com
 * extras: mirror.trouble-free.net
 * updates: reflector.westga.edu
epel                                                                                                                   12584/12584
Error: No matching Packages to list
[setup@c7-dev bin]$ yum group list
Loaded plugins: fastestmirror, langpacks
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: dallas.tx.mirror.xygenhosting.com
 * epel: fedora-epel.mirror.lstn.net
 * extras: mirror.trouble-free.net
 * updates: reflector.westga.edu
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Cinnamon Desktop
   MATE Desktop
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Educational Software
   Electronic Lab
   Fedora Packager
   General Purpose Desktop
   Graphical Administration Tools
   Haskell
   Legacy UNIX Compatibility
   Milkymist
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
   TurboGears application framework
   Xfce
Done

Install Development Tools

yum group install "Development Tools"

 

 

 


JDK8

cd /usr/lib/jvm
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz"
tar -xvzf jdk-8u171-linux-x64.tar.gz

alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_171/bin/java 2
alternatives --config java
sudo alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.181-2.6.14.8.el7_5.x86_64/jre/bin/java)
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64/jre/bin/java)
   3           /usr/lib/jvm/jdk1.8.0_171/bin/java

Enter to keep the current selection[+], or type selection number: 3

Add Alternatives for jar & javac

alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_171/bin/jar 2
alternatives --config jar
alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_171/bin/javac 2
alternatives --config javac

Create Environment Variables

export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_171

printenv JAVA_HOME

/usr/lib/jvm/jdk1.8.0_171

export PATH=$PATH:/usr/lib/jvm/jdk1.8.0_171/bin

/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/setup/.local/bin:/home/setup/bin:/usr/lib/jvm/jdk1.8.0_171/bin

 


Eclipse

Download Eclipse

https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/oxygen/3a/eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz&mirror_id=492

 

Extract to /usr/local/ & create symbolic link for easier system-wide access

tar -xvzf eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz -C /usr/local/
# ln -s /usr/local/eclipse/eclipse /usr/bin/eclipse

Create Desktop launcher

# nano /usr/share/applications/eclipse.desktop

Name=Eclipse
Comment=Eclipse IDE
Type=Application
Encoding=UTF-8
Exec=/usr/bin/eclipse
Icon=/usr/local/eclipse/icon.xpm
Categories=GNOME;Application;Development;
Terminal=false
StartupNotify=true

 

sudo chmod 777 /usr/bin/eclipse

 

 


 

 

 


 

 

 


printenv
XDG_SESSION_ID=2
HOSTNAME=c7-dev
SELINUX_ROLE_REQUESTED=
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=192.168.0.203 50620 22
SELINUX_USE_CURRENT_RANGE=
OLDPWD=/usr/lib/jvm/jdk1.8.0_171
SSH_TTY=/dev/pts/1
USER=setup
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
MAIL=/var/spool/mail/setup
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/setup/.local/bin:/home/setup/bin
PWD=/usr/lib/jvm/jdk1.8.0_171/bin
JAVA_HOME=/usr/lib/jvm/jdk1.8.0_171
LANG=en_US.UTF-8
SELINUX_LEVEL_REQUESTED=
HISTCONTROL=ignoredups
SHLVL=1
HOME=/home/setup
LOGNAME=setup
XDG_DATA_DIRS=/home/setup/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
SSH_CONNECTION=192.168.0.203 50620 192.168.0.80 22
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/1000
_=/usr/bin/printenv

 


 

 

 


 

 

 


 

 

 


 

Tags