1. Install the JDK before installing the SDK.
2 default location for jdk1.7 in Mac:/library/java/javavirtualmachines/jdk1.7.0_40.jdk/contents/home
Configuration java_home:
User directory under Opne. Bash_profile If you don't have this file, you can create a
You can learn about the configuration file under Mac
The./etc/profile file is globally shared and will be read by any user who logs on
/ETC/BASHRC (typically adds a system-level environment variable to this file) global (public) configuration, which is read by the bash shell, regardless of the way it is executed.
~/.bash_profile (typically add user-level environment variables to this file)
Configure the Environment:
maven_home=/users/taoyutong/documents/apache-maven-3.0.5
Java_home=/library/java/javavirtualmachines/jdk1.7.0_40.jdk/contents/home
Path= $MAVEN _home/bin: $PATH
paht= $JAVA _home/bin: $PAHT
Export Maven_home
Export Java_home
Export PATH
Save to exit.
Immediate effect requires execution: $ source. Bash_profile (This is the file name)
To configure Tomcat:
Go to User directory, edit. Bash_profile
CD ~/
Vim. Bash_profile
Add the following:
Export path= $PATH:/usr/local/apache-tomcat-8.0.9/bin
-Set permissions for startup.sh files
chmod 755/usr/local/apache-tomcat-8.0.9/bin/*.sh
-Start Tomcat
SH startup.sh
-Test
can use: http://localhost:8080
-Stop Tomcat
SH shutdown.sh
Add Administrative User: Vim/usr/local/apache-tomcat-7.0.55/conf/tomcat-users.xml
<role rolename= "Admin-gui"/>
<role rolename= "Admin-script"/>
<role rolename= "Manager-gui"/>
<role rolename= "Manager-script"/>
<role rolename= "Manager-jmx"/>
<role rolename= "Manager-status"/>
<user username= "admin" password= "admin" roles= "manager-gui,manager-script,manager-jmx,manager-status, Admin-script,admin-gui "/>
Install SDK Error: This program requires DISPLAY environment variable
Solution: Vim ~/.bash_profile Add export display=:0 Can
:
1, download dedicated Mac version of the jdk1.7, the address is as follows: Https://jdk7.java.net/download.html JDK-7U60-EA-BIN-B15-MACOSX-X86_64-16_APR_2014.DMG
2. Download the SDK index
Mac Configuration Java Development environment: jdk1.7 +sdk1.7+maven +tomcat