Home > Back-end >  Under Linux by tomcat to access a file path
Under Linux by tomcat to access a file path

Time:10-19

A Linux server log directory, to access interface, with Apache implementation before, now check need to upgrade your Apache security holes, but the road to install like to obtain buddhist scriptures, all kinds of files, all kinds of error, hasn't been done, and then decided to use tomcat to implement this function,

Because the war is not a regular deployment package, so need to configure a little dot, of course also thank baidu is simple - ha ~ ~


Here's implementation steps:

1. Download and install tomcat, this is not here,

The tar XVF apache tomcat - 8.0.15. Tar

PS: my system is, in fact, solaris, if the suffix is tar gz directly with tar is decompression, complains that the tar: directory checksum error, decompression by two-step gzip - d XXX. Tar. Gz get tar suffix bag, then tar XVF XXXX. The tar,



2. Enter the conf/catalina/localhost, create an XML file, the name is you want to access the project name, I built a neagentlog XML, not under my tomcat catalina, built a,



3. Vi neagentlog. XML, written in one line & lt; The Context the docBase="/data/neagent_log" reloadable="true"/& gt; ,/data/neagent_log is my log file path, save the file,



4. Vi/conf/web. XML files, find & lt; Init - param> Item will be

Listings

False

The false to true, save,

5. Enter the bin directory, in catalina. Add the CATALINA_HOME=sh/export/home/fuxueli/apache tomcat -- 8.0.15, namely the tomcat directory path,

6. Under the bin directory./startup. Sh start tomcat, see if there are any more error log, where has an error, check for errors, empowerment without permission,

7. Visit http://xx.xx.xx.xx:8080/neagentlog by interface can be normal open,

Do ~ ~ ~


PS: tomcat need JAVA environment, if there is no need to download and install the JDK, and then the configuration PATH, JAVA_HOME, the CLASSPATH environment variable, and the JDK version, matching and tomcat to low version will update in time, do not quote Unsupported major, minor errors such as version 51.0, after the loading in JAVA - version verification, if you can see the installed version information indicates the installation is complete,

CodePudding user response:

CodePudding user response:

You can put the install JDK they command
  • Related