Academia JavaEE Workspace in MacOS: Difference between revisions
Jump to navigation
Jump to search
Line 73: | Line 73: | ||
==Git SCM== | ==Git SCM== | ||
<source lang="bash"> | <source lang="bash"> | ||
ssh-keygen -t rsa -b 4096 -C "[email protected]" | ssh-keygen -t rsa -b 4096 -C "[email protected]" | ||
: <<'END_COMMENT' | |||
Generating public/private rsa key pair. | |||
Enter file in which to save the key (/home/user/.ssh/id_rsa): /home/user/.ssh/git_academia_chorke_org_rsa | |||
Enter passphrase (empty for no passphrase): | |||
Enter same passphrase again: | |||
Your identification has been saved in /home/user/.ssh/git_academia_chorke_org_rsa | |||
Your public key has been saved in /home/user/.ssh/git_academia_chorke_org_rsa.pub | |||
The key fingerprint is: | |||
SHA256:TXBbBINcPcVtdVFRjs/P+jaxMFAIwr3uqdlt8tmrLVQ [email protected] | |||
The key's randomart image is: | |||
+---[RSA 4096]----+ | |||
| .oo+*++o.+@| | |||
| .++ =o..o+| | |||
| + .....| | |||
| + . E o | | |||
| S . o o| | |||
| . . o o.| | |||
| . o o =| | |||
| o+.o+ +.| | |||
| o..+=o+ooo| | |||
+----[SHA256]-----+ | |||
END_COMMENT | |||
ls -lah ~/.ssh/ | |||
cat < ~/.ssh/git_academia_chorke_org_rsa.pub | |||
</source> | |||
<source lang="bash"> | |||
nano ~/.ssh/config | |||
: <<'END_COMMENT' | : <<'END_COMMENT' | ||
Host git.academia.chorke.org | Host git.academia.chorke.org | ||
Line 86: | Line 109: | ||
User git | User git | ||
END_COMMENT | END_COMMENT | ||
</source> | |||
<source lang="bash"> | |||
git config --global user.email "[email protected]" | |||
git config --global user.name "FULL NAME" | git config --global user.name "FULL NAME" | ||
git | ssh -vT git.academia.chorke.org | ||
</source> | </source> | ||
==References== | ==References== | ||
* [[PostgreSQL]] | * [[PostgreSQL]] |
Revision as of 17:52, 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
brew install java11 brew install maven brew install ant
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
ssh-keygen -t rsa -b 4096 -C "[email protected]"
: <<'END_COMMENT'
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): /home/user/.ssh/git_academia_chorke_org_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/git_academia_chorke_org_rsa
Your public key has been saved in /home/user/.ssh/git_academia_chorke_org_rsa.pub
The key fingerprint is:
SHA256:TXBbBINcPcVtdVFRjs/P+jaxMFAIwr3uqdlt8tmrLVQ [email protected]
The key's randomart image is:
+---[RSA 4096]----+
| .oo+*++o.+@|
| .++ =o..o+|
| + .....|
| + . E o |
| S . o o|
| . . o o.|
| . o o =|
| o+.o+ +.|
| o..+=o+ooo|
+----[SHA256]-----+
END_COMMENT
ls -lah ~/.ssh/
cat < ~/.ssh/git_academia_chorke_org_rsa.pub
nano ~/.ssh/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.email "[email protected]"
git config --global user.name "FULL NAME"
ssh -vT git.academia.chorke.org