Mac system jdk and maven configuration and mysql configuration

  • Install the software on the mac and write it in markdown format.
  • { QQ, WeChat, email client, chrome git, sourcetree, java 7, idea15, office, sublime editor, mysql workbench, brew, nginx }
  • 1. Install jdk (there are many jdk on Baidu cloud, if the version is incompatible and cannot be installed, download other small versions from the new, such as )
  • Open i (. Use the touch command to create a .bash_profile file in the ~ directory (user directory),)
  • Then enter vi .bash_profile
  • Enter this text: JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/ Home (default jdk installation directory)
  • Use the :wq command in the vi editor to save and exit
  • Enter source .bash_profile to make environment variables work
  • You can echo $JAVA_HOME to see if the path you just configured is output. If the output is successful, it means that your environment variables have been configured.
  • 2. Install maven
  • a, use the open -e .bash_profile command to open the file, (pro test)
  • b, use vi to open the file, (not personally tested)
  • Write the following information in it
  • MAVEN_HOME=maven installation directory
  • PATH=$MAVEN_HOME/bin:$PATH
  • export MAVEN_HOME
  • export path
  • /*Pro test
  • Save the file and exit.
  • 2. Use the source .bash_profile command to make the modified environment variable configuration take effect,
  • Use the mvn -v command to test whether maven is successfully configured
  • */
  • /* Untested
  • After pressing the esc key, in the command state: wq exit vi
  • Vi common operations: esc returns to the normal state, i enters the editing state, :w saves the changes
  •   2. Find the ~/.m2/ directory, use the "cp source path copy path" command to copy the settings.xml file in the conf directory under the Maven root directory, (the settings file can be searched in the document center)
  •     And put the path in the local repository specified in the file */
  • If touch, open and other commands fail, run the command first
  • export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin to make the command take effect. The reason is that the command is invalid due to wrong environment variable configuration.
  • I
  • 3, idea configuration maven
  • The file—otherSetting—defalutSetting command searches for maven, sets the maven installation directory, and the location of the setting file
  • 4.Cloen project
  • Open http://code.hzchengzi.com/projects/PX to enter a project, there is a menu clone on the left, copy the http URL
  • (without sourcetree) when idea's own git opens idea, select git to clone a project
  • Open sourcetree Select Local Clone from URL, enter the copied URL to clone
  • My .bash_profile file content
  • M3_HOME=/software/apache-maven-3.2.2
  • JAVA_HOME=/library/java/javavirtualmachines/jdk1.7.0_79.jdk/Contents/home
  • PATH=$M3_HOME/bin:$PATH
  • PATH=$JAVA_HOME/bin:$PATH
  • export M3_HOME
  • export JAVA_HOME
  • export PATH



  • Chrome browser commonly used plug-in 
    JSON-handle
    Proxy SwitchyOmega
    Restlet Client





    configured variables are:
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
    PATH=$JAVA_HOME/bin:$PATH
    MAVEN_HOME=/Users/ zhangkun/work/softfile/apache-maven-3.3.9
    PATH=$MAVEN_HOME/bin:$PATH

    export JAVA_HOME
    PATH=/usr/local/mysql/bin:${PARH}

    export PATH



    If the terminal command is invalid after configuration, . bash_profile is configured for business trip and needs to be reconfigured.
    Enter export PATH=/bin:/usr/bin:/sbin:/usr/sbin to



    change the MySQL password:

    step1:
    Apple -> System Preferences -> Click mysql at the bottom in the pop-up page Close the mysql service (click stop mysql server)
    step2:
    Enter the terminal and enter: cd /usr/local/mysql/bin/
    Enter and log in with administrator privileges sudo su
    Enter the following command after pressing Enter to disable the mysql authentication function./mysqld_safe --skip-grant-tables &
    After pressing Enter, mysql will restart automatically (the status of mysql in the preferences will change to running)


    step3.
    Enter the command ./mysql and press
    Enter After that, enter the command FLUSH PRIVILEGES;
    after pressing Enter, enter the command SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your new password');


    Guess you like

    Origin http://43.154.161.224:23101/article/api/json?id=326096202&siteId=291194637