Academia JavaEE Workspace in MacOS: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 24: Line 24:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
brew services list
brew services list
createuser $USER
createuser $USER
createdb $USER
createdb $USER

Revision as of 11:50, 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
brew cleanup

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

createuser $USER
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

Redis

brew services stop redis
brew uninstall redis
brew cleanup

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

brew install redis
brew services start redis
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
vim /usr/local/etc/redis.conf
brew services list

Workspace

mkdir -p $HOME/chorke
mkdir -p /opt/dev/$USER/chorke/academia
chown $USER:$USER -R /opt/dev/$USER

export ACADEMIA_WSS="$HOME/chorke/academia"
ln -s /opt/dev/$USER/chorke/academia $ACADEMIA_WSS
ls -lah $HOME/chorke
vim ~/.bash_profile

Git SCM

cd ~/.ssh/
ssh-keygen -t rsa -b 4096 -C "[email protected]"
mv id_rsa.pub git_academia_chorke_org_rsa.pub
mv id_rsa git_academia_chorke_org_rsa

vim config
: <<'END_COMMENT'
Host git.academia.chorke.org
     HostName git.academia.chorke.org
     PreferredAuthentications publickey
     IdentityFile ~/.ssh/git_academia_chorke_org_rsa
     User git
END_COMMENT
git config --global user.name "FULL NAME"
git config --global user.email "[email protected]"