![]() ![]() Now, add CATALINA_HOME for future terminal sessions.Įcho 'export CATALINA_HOME=/Library/Tomcat/Home' > ~/.bash_profileĮcho 'export PATH="$CATALINA_HOME:$PATH"' > ~/.bash_profile.Create a CATALINA_HOME environment variable and add it to the PATH for your current terminal session.Įxport CATALINA_HOME=/Library/Tomcat/Home.bat files and give execute permissions to the shell scripts. Go into the bin folder, remove any Windows.Create a symbolic link called Home and point it to the new tomcat build.Change directories back to the /Library/Tomcat directory.Sudo mv output/build /Library/Tomcat/apache-tomcat-7.0.29 We want to move this build directory up to the /Library/Tomcat directory and rename it something more relevant.Once Ant completes successfully, it will have created a folder named build in the directory /Library/Tomcat/src/output.Run Ant on the current directory (which should be /Library/Tomcat/src/apache-tomcat-7.0.29-src).Now open the build.properties file in your preferred editor and add the following line to it to tell Ant which directory to download dependencies into:īase.path=/Library/Tomcat/src/src-downloads.Change directories into the new directory.Expand the tar.gz file you just downloaded into the current directory, this will create a new directory called apaache-tomcat-7.0.29-src.Download the Tomcat 7 source code into the current directory /Library/Tomcat/src.Sudo mkdir /Library/Tomcat & cd /Library/Tomcat Now, let's make some directories to download the Tomcat source code into.The following commands will set the variables for your current command-line (terminal) session:Īnd these commands will make sure these variables are available for future terminal sessions:Įcho 'export JAVA_HOME=/Library/Java/Home' > ~/.bash_profileĮcho 'export PATH="$JAVA_HOME/bin:$PATH"' > ~/.bash_profileĮcho 'export ANT_HOME=/usr/share/ant' > ~/.bash_profileĮcho 'export PATH="$ANT_HOME/bin:$PATH"' > ~/.bash_profile If no directory path is printed out for one, or both, of these, then follow the instructions below to set the JAVA_HOME and ANT_HOME environment variables. If you do, the following command should print out the directories that the variables are pointed to: See if you have the JAVA_HOME and ANT_HOME environment variables set.If, at any time, you need to know what your current directory is, type pwd (print working directory) into the the terminal. If you are using another terminal, it is up to you to adjust the commands to fit your terminal. Make sure that you are comfortable editing these files before you proceed and that you understand the consequences.Īll the commands below are intended to be executed in a terminal window and it is assumed that you are using the default bash terminal for Mac OS X. See this page on stack overflow for some information on which one you may want to edit. Your machine may require that you alter the ~/.bash_login file or the ~/.profile file instead. Some of the lines below require altering the ~/.bash_profile file. If you want to install a different version of Tomcat, please consult the Apache Tomcat documentation. These instructions also assume the latest release of Tomcat as of the time of this writing, which is version 7.0.29. If they are in different locations on your machine, please make adjustments accordingly. ![]() The instructions in this tutorial assume that Ant is located at /usr/share/ant and Java is located at /Library/Java/Home. You must have both Java and Apache Ant installed to complete this tutorial. If you are on a different version of OS X, please consult the documentation specific to your version prior to following this tutorial. Note that I am on Mac OS X Snow Leopard (version 10.5.8). It is up to you to execute the commands outlined in this tutorial and is stronglyĪdvised that if you do not understand the implications or repercussions one or more of the following The instructions below are to be followed at your own discretion and at
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |