macOS 下git+ Java + Maven + MySql 开发环境

/ 默认分类 / 没有评论 / 60浏览

Git

JDK

# JDK 1.8
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export JRE_HOME
export PATH
export CLASSPATH
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk

IntelliJ IDEA

Maven

MAVEN_HOME=/Users/youmeek/my_software/work_software/maven3.3.9
PATH=$PATH:$MAVEN_HOME/bin
export MAVEN_HOME
export PATH

MySQL 5.7

[mysql]
default-character-set = utf8mb4


[mysqld]
symbolic-links=0
log-error=/var/log/mysql/error.log
default-storage-engine = InnoDB
collation-server = utf8mb4_unicode_520_ci
init_connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4
lower_case_table_names = 1
max_allowed_packet = 50M
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
启动MySQL服务
sudo /usr/local/MySQL/support-files/mysql.server start

停止MySQL服务
sudo /usr/local/mysql/support-files/mysql.server stop

重启MySQL服务
sudo /usr/local/mysql/support-files/mysql.server restart
sudo rm -rf /usr/local/mysql
sudo rm -rf /Library/PreferencePanes/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*