Homebrew安装和Mac使用

软件安装

1、Homebrew安装
 
ruby环境:
curl -sSL https://get.rvm.io | bash -s stable
 
官网方式:
 
替换及重置Homebrew默认源方法一:
    替换brew.git:
    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
 
    替换homebrew-core.git:
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
 
替换及重置Homebrew默认源方法二:
    cd "$(brew --repo)" && git remote set-url origin https://git.coding.net/homebrew/homebrew.git
    cd $home && brew
 
替换及重置Homebrew默认源方法三:
    ruby brew_install
 
    brew_install文件
 
安装到homebrew的软件位置为: /usr/local/Cellar/
配置文件位置: /usr/local/etc
 
2、Redis安装
 
安装:
    brew search redis
    brew install redis@4.0
    echo 'export PATH="/usr/local/opt/redis@4.0/bin:$PATH"' >> ~/.bash_profile
    brew services start redis@4.0
 
修改redis配置文件:
    Macintosh HD⁩ ▸ ⁨usr⁩ ▸ ⁨local⁩ ▸ ⁨etc⁩  ▸ ⁨ redis.conf
 
3、Mysql安装
 
homebrew安装mysql:
    brew search mysql
    brew install mysql@5.7
    echo 'export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"' >> ~/.bash_profile
    brew services start mysql@5.7
 
普通安装:
    下载mysql-8.0.16-macos10.14-x86_64.dmg
    cd /usr/local/bin
    ln -fs /usr/local/mysql-8.0.16-macos10.14-x86_64/bin/mysql mysql
     /usr/local/mysql/bin/mysql -u root -p
常用命令:
    mysql -u root -p
    show databases;
    use mysql;
    show tables;
    quit;
 
 
4、Maven安装
 
在MAC指定文件夹打开终端:
 
普通安装:
    下载maven
    sudo tar -xzvf apache-maven-3.6.1-bin.tar -C ~/maven
    vim ~/.bash_profile追加内容
        export M2_HOME=$HOME/maven/apache-maven-3.3.9
        export PATH=$PATH:$M2_HOME/bin
    source ~/.bash_profile
    mvn -v
 
5、Idea破解
 
获取注册码:
修改hosts文件:
sudo vim /etc/hosts
 
离线安装插件:
    IDEA-->Setting-->Plugins--> 按钮"Install plugin from disk..."
    
6、JDK安装
 
 
安装位置:Macintosh HD⁩ ▸ ⁨资源库⁩ ▸ ⁨Java⁩ ▸ ⁨JavaVirtualMachines⁩
 
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH:
export JAVA_HOME
export CLASSPATH
export PATH
 
7、RabbitMQ安装
 
brew install rabbitmq
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile
brew services start rabbitmq
密码:guest 账号:guest
 
8、Zookeeper安装
 
 
brew install zookeeper
brew services start zookeeper
 
9、Node安装
 
brew install node
npm -v
node -v
npm install -g cnpm --registry=https://registry.npm.taobao.org
 
10、Vue安装
cnpm install webpack -g
cnpm install --global vue-cli
vue -V
 

MacOS快捷键口

⌘ + X剪切
⌘ + C 复制
⌘ + V粘贴
⌘ + option + V移动
⌘ + W关闭当前窗口
⌘ +Q 退出
⌘ + option + esc 强制退出软件
⌘ + Z撤销
⌘ + A全选
⌘ + delete删除
⌘ + 空格 切换输入法
⌘ + tab 切换窗口
 
MacOS触碰板使用
 
posted @ 2019-07-30 16:32  AmyZheng  阅读(5590)  评论(0编辑  收藏  举报