mac notebook installation java environment and idea settings

Series Article Directory



Install java environment

It is not suitable to switch from windows to notebooks, so some setting parameters have to be reset. This article is only for macbook notebooks and computers with m1 chips, but it should be applicable to all versions above.
insert image description here


1. Install jdk

Refer to this article , which is similar to that of windows, but it should be noted that the command part
will not be repeated here

2. Download and install IntelliJ IDEA

Download and install on the official website, pay attention to download and install on the official website, and then activate the registration code here to activate
the registration code

3. Install maven

Go to the official website to download: Click this
to configure environment variables

 vi ~/.bash_profile

Add this, of course, it says that it is downloaded to usr/local, which is a hidden folder. Generally, the default download location is fine. Don’t hide the folder. Of course, if you want to find the hidden directory, the shortcut key: command+shift
+
g
insert image description here

export M3_HOME=/usr/local/maven/apache-maven-3.6.3
export PATH=$M3_HOME/bin:$PATH

Execution takes effect

source ~/.bash_profile

Here you need to set the setting.xml file of maven,
and ask mt directly for the latest one. Just get this latest one

Or you can follow the instructions on the Internet, so I won’t repeat them here.

reference

Fourth, install git

git download link
insert image description here
Choose the installation method, because I don't have homebrew, so I just choose the file to install directly.
insert image description here
Just download it directly, but it should be noted that the downloaded version of git
insert image description here
should be as high as possible, and an error will be reported later because the git version is too low. Just
insert image description here
enter git --version in the terminal and the version number will appear.
insert image description here
Next are some commands for setting git, including setting global parameters and the like.
Give an example

git config --global user.name "liuxiaocong"
 git config –global user.name/user.email *******

If you click git directly in the idea, it will be automatically matched. Just search for it on your own website.

There are some pitfalls here: when git pulls, the ssh-key is clearly generated but the remote warehouse cannot be connected. Finally, there is a version problem, and a new encryption algorithm needs to be generated.

That is, I connected to the company's remote warehouse, but I can't download the code
ssh-keygen -t ed25519
when generating the key and replace it with this

Five, install tomcat

Go to the official website. Click here
to decompress the installation package to the specified directory, the unified path on the Internet is /usr/local

Configure environment variables to .bash_profile

export CATALINA_HOME=/usr/local/apache-tomcat-8.0.36
	export PATH=$PATH:$CATALINA_HOME/bin

In the IDEA configuration menu, find Build, Execution, Deployment->Application Servers to configure the main directory of tomcat, and apply it

6. Install the appenv configuration file

This is the worst SIP mechanism . I turned off the SIP mechanism of the computer: long press the shutdown button on this version of the computer. Then choose to enter that mechanism, but then the computer crashed for some reason,
but after I replaced it with a new computer, I still closed it, and later opened this mechanism
because some computers need to be authorized to install
the first step: Check whether the machine has a security mechanism => Enter csrutil status => in the terminal and the result shows System Integrity Protection status: enabled. The computer security mechanism is enabled. If System Integrity Protection status: disabled. is displayed, it means that the security mechanism of your computer is not enabled.

After entering the installation mode, you can enter commands to operate
1. Create a data directory in any folder (preferably not in the / directory): mkdir -p /Users/your username/data

2. Create a soft connection between the data folder and the /data folder in the previous step: sudo ln -s /Users/your username/data /data

3. Enter the /data folder: cd /data, create a webapps folder: mkdir webapps, enter the webapps folder: cd webapps

4. Create the appenv.test file:
the last file is set to, and there is a swim lane, but it is enough to set the key

env=test
deployenv=qa
zkserver=*********

7. Settings related to idea

The option+command+i of the computer is for subcontracting operation,
currently it is cotrol+command+a is a screenshot

1. Shortcut key setting

2. Naming the new class

reference

3. The size of the font, the size of the menu bar

4. How many windows can the tab in the frame have at most?

Can be set to 100

Guess you like

Origin blog.csdn.net/qq_41810415/article/details/131649541