Homebrew: Difference between revisions
Jump to navigation
Jump to search
(→RBEnv) |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
export HOMEBREW_GITHUB_API_TOKEN=xxxx | export HOMEBREW_GITHUB_API_TOKEN=xxxx | ||
==RBEnv== | ==RBEnv== | ||
< | <syntaxhighlight lang="bash"> | ||
brew install rbenv | brew install rbenv | ||
rbenv init | rbenv init | ||
Line 71: | Line 36: | ||
rbenv install 2.7.2 | rbenv install 2.7.2 | ||
rbenv global 2.7.2 | rbenv global 2.7.2 | ||
</ | </syntaxhighlight> | ||
---- | ---- | ||
< | <syntaxhighlight lang="bash"> | ||
rbenv install --list |grep graalvm | rbenv install --list |grep graalvm | ||
rbenv install --list-all|grep graalvm | rbenv install --list-all|grep graalvm | ||
Line 79: | Line 44: | ||
du -sh ~/.rbenv/versions/truffleruby* | du -sh ~/.rbenv/versions/truffleruby* | ||
rbenv install truffleruby+graalvm-22.3.1 | rbenv install truffleruby+graalvm-22.3.1 | ||
</ | </syntaxhighlight> | ||
==Cocoapods== | ==Cocoapods== | ||
< | <syntaxhighlight lang="bash"> | ||
gem install cocoapods | gem install cocoapods | ||
#eval "$(rbenv init -)" | #eval "$(rbenv init -)" | ||
export LANG=en_US.UTF-8 | export LANG=en_US.UTF-8 | ||
pod --version | pod --version | ||
</ | </syntaxhighlight> | ||
==Derby== | ==Derby== | ||
< | <syntaxhighlight lang="bash"> | ||
brew services stop derby | brew services stop derby | ||
brew uninstall derby | brew uninstall derby | ||
Line 103: | Line 68: | ||
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.derby.plist | launchctl load ~/Library/LaunchAgents/homebrew.mxcl.derby.plist | ||
brew services list | brew services list | ||
</ | </syntaxhighlight> | ||
==MongoDB== | ==MongoDB== | ||
< | <syntaxhighlight lang="bash"> | ||
brew tap | grep mongodb | brew tap | grep mongodb | ||
xcode-select --install | xcode-select --install | ||
Line 132: | Line 97: | ||
brew services start mongodb-community | brew services start mongodb-community | ||
brew services list | brew services list | ||
</ | </syntaxhighlight> | ||
==PostgreSQL== | ==PostgreSQL== | ||
< | <syntaxhighlight lang="bash" highlight="8-10,12,16,26"> | ||
brew services stop postgresql | brew services stop postgresql | ||
brew uninstall postgresql | brew uninstall postgresql | ||
Line 167: | Line 132: | ||
createuser $USER | createuser $USER | ||
createdb $USER | createdb $USER | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="sql"> | ||
CREATE USER postgres SUPERUSER; | CREATE USER postgres SUPERUSER; | ||
CREATE DATABASE postgres WITH OWNER postgres; | CREATE DATABASE postgres WITH OWNER postgres; | ||
</ | </syntaxhighlight> | ||
==Redis== | ==Redis== | ||
< | <syntaxhighlight lang="bash"> | ||
brew services stop redis | brew services stop redis | ||
brew uninstall redis | brew uninstall redis | ||
Line 189: | Line 154: | ||
vim /usr/local/etc/redis.conf | vim /usr/local/etc/redis.conf | ||
brew services list | brew services list | ||
</ | </syntaxhighlight> | ||
==Knowledge== | ==Knowledge== | ||
< | {| | ||
| valign="top" | | |||
<syntaxhighlight lang="bash"> | |||
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" \ | |||
fetch --unshallow | |||
brew update | |||
brew doctor | |||
brew cleanup | |||
brew pin derby | |||
brew unpin derby | |||
brew list --pinned | |||
brew services run derby | |||
brew services stop derby | |||
</syntaxhighlight> | |||
| valign="top" | | |||
<syntaxhighlight lang="bash"> | |||
brew upgrade | |||
brew upgrade --cask | |||
brew doctor | |||
brew cleanup | |||
brew list | |||
brew list --cask | |||
brew deps --tree --installed | |||
brew services list | |||
brew services start derby | |||
brew services restart derby | |||
</syntaxhighlight> | |||
| valign="top" | | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
<syntaxhighlight lang="bash"> | |||
brew link --overwrite postgresql@12 | brew link --overwrite postgresql@12 | ||
brew services start postgresql@12 | brew services start postgresql@12 | ||
Line 206: | Line 211: | ||
ls -lah ~/Library/LaunchAgents/ | ls -lah ~/Library/LaunchAgents/ | ||
ls -lah /usr/local/opt/ | ls -lah /usr/local/opt/ | ||
</ | |||
brew uninstall --cask adoptopenjdk8 | |||
brew untap adoptopenjdk/openjdk | |||
brew install --cask temurin | |||
</syntaxhighlight> | |||
| valign="top" | | |||
| valign="top" | | |||
|} | |||
==References== | ==References== | ||
{| | |||
| valign="top" | | |||
* [https://github.com/rbenv/rbenv Groom your app’s Ruby environment with <code>rbenv</code>] | * [https://github.com/rbenv/rbenv Groom your app’s Ruby environment with <code>rbenv</code>] | ||
* [https://medium.com/@ihabshea/how-to-get-cocoapods-working-on-macos-big-sur-c09e5d6e4d51 CocoaPods working on MacOS Big Sur] | * [https://medium.com/@ihabshea/how-to-get-cocoapods-working-on-macos-big-sur-c09e5d6e4d51 CocoaPods working on MacOS Big Sur] | ||
* [[Linuxbrew|Homebrew » Linuxbrew]] | |||
* [https://brew.sh/#:~:text=Install%20Homebrew Install Homebrew] | * [https://brew.sh/#:~:text=Install%20Homebrew Install Homebrew] | ||
* [[HTTPie]] | |||
* [[JQ Tool]] | |||
* [[LuaJIT]] | |||
* [[Wrk]] | |||
| valign="top" | | |||
| valign="top" | | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
| valign="top" | | |||
| valign="top" | | |||
|} |
Latest revision as of 19:59, 13 May 2024
install homebrew or brew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" https://github.com/settings/tokens >> generate new token 1. Note >> HOMEBREW_GITHUB_API_TOKEN 2. Select scopes >> repo >> public_repo export HOMEBREW_GITHUB_API_TOKEN=xxxx
RBEnv
brew install rbenv
rbenv init
:'
# Load rbenv automatically by appending
# the following to ~/.bash_profile:
eval "$(rbenv init -)"
'
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
:"
Checking for `rbenv' in PATH: /usr/local/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20201118)
Counting installed Ruby versions: none
There aren't any Ruby versions installed under `/Users/shahed/.rbenv/versions'.
You can install Ruby versions like so: rbenv install 2.2.4
Checking RubyGems settings: OK
Auditing installed plugins: OK
"
#echo "gem: no-document" > ~/.gemrc
brew upgrade rbenv ruby-build
rbenv install --list
rbenv install 2.7.2
rbenv global 2.7.2
rbenv install --list |grep graalvm
rbenv install --list-all|grep graalvm
du -sh ~/.rbenv/versions/truffleruby*
rbenv install truffleruby+graalvm-22.3.1
Cocoapods
gem install cocoapods
#eval "$(rbenv init -)"
export LANG=en_US.UTF-8
pod --version
Derby
brew services stop derby
brew uninstall derby
brew cleanup
rm -rf ~/Library/LaunchAgents/homebrew.mxcl.derby*
rm -rf /usr/local/var/derby*
brew install derby
brew services start derby
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.derby.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.derby.plist
brew services list
MongoDB
brew tap | grep mongodb
xcode-select --install
brew tap mongodb/brew
brew tap
brew services stop mongodb-community
brew uninstall mongodb-community
brew cleanup
rm -rf ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community*
rm -rf /usr/local/var/mongodb*
brew install mongodb-community
brew services start mongodb-community
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
brew services stop mongodb-community
vim /usr/local/etc/mongod.conf
: <<'END_COMMENT'
net:
bindIp: 127.0.0.1,10.19.83.110
END_COMMENT
brew services start mongodb-community
brew services list
PostgreSQL
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
vim /usr/local/var/postgres/postgresql.conf
: <<'END_COMMENT'
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
END_COMMENT
vim /usr/local/var/postgres/pg_hba.conf
: <<'END_COMMENT'
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 10.19.83.1/24 trust
END_COMMENT
createuser -s postgres
createuser $USER
createdb $USER
CREATE USER postgres SUPERUSER;
CREATE DATABASE postgres WITH OWNER postgres;
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
Knowledge
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" \
fetch --unshallow
brew update
brew doctor
brew cleanup
brew pin derby
brew unpin derby
brew list --pinned
brew services run derby
brew services stop derby
|
brew upgrade
brew upgrade --cask
brew doctor
brew cleanup
brew list
brew list --cask
brew deps --tree --installed
brew services list
brew services start derby
brew services restart derby
|
|
| ||
brew link --overwrite postgresql@12
brew services start postgresql@12
brew services stop postgresql@12
brew uninstall postgresql@12
brew install [email protected]
brew services list
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
rm -rf /usr/local/var/postgres*
ls -lah ~/Library/LaunchAgents/
ls -lah /usr/local/opt/
brew uninstall --cask adoptopenjdk8
brew untap adoptopenjdk/openjdk
brew install --cask temurin
|
References
| ||