Academia JavaEE Workspace in MacOS: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 1: Line 1:
==Java==
sudo rm -rf /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/
/usr/libexec/java_home -v1.8.0_241
/usr/libexec/java_home -v1.8.0
<source lang="bash">
export JAVA_HOME=`/usr/libexec/java_home -v1.8.0`
</source>
==PostgreSQL==
==PostgreSQL==
===Install===
===Install===

Revision as of 10:24, 5 January 2021

Java

sudo rm -rf /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/
/usr/libexec/java_home -v1.8.0_241
/usr/libexec/java_home -v1.8.0
export JAVA_HOME=`/usr/libexec/java_home -v1.8.0`

PostgreSQL

Install

brew services stop postgresql
brew uninstall postgresql

rm -rf ~/Library/LaunchAgents/homebrew.mxcl.postgresql*
rm -rf  /usr/local/var/postgres*

brew install postgres
brew services start postgresql
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
brew services list
createdb $USER

Schema

CREATE DATABASE academia;
CREATE USER academia WITH ENCRYPTED PASSWORD 'academia';
GRANT ALL PRIVILEGES ON DATABASE academia TO academia;
psql academia < academia.sql