Last active
November 11, 2015 06:10
-
-
Save genediazjr/9a1fc1df4ccd5ed41e7a to your computer and use it in GitHub Desktop.
Tomcat port 80 on Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get upgrade | |
apt-get install vim make g++ openjdk-7-jdk tomcat7 fastjar unzip | |
cd /usr/share/tomcat7/lib/ | |
----------------------------------------------------------------------------- | |
jar xf catalina.jar org/apache/catalina/util/ServerInfo.properties | |
server.info=Apache | |
jar uf catalina.jar org/apache/catalina/util/ServerInfo.properties | |
----------------------------------------------------------------------------- | |
vim /usr/share/tomcat7/bin/catalina.sh | |
----------------------------------------------------------------------------- | |
JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m | |
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m | |
-XX:MaxPermSize=256m -XX:+DisableExplicitGC" | |
----------------------------------------------------------------------------- | |
JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx512m | |
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m | |
-XX:MaxPermSize=256m -XX:+DisableExplicitGC" | |
----------------------------------------------------------------------------- | |
vim /etc/init.d/tomcat7 | |
----------------------------------------------------------------------------- | |
TOMCAT7_USER=root | |
TOMCAT7_GROUP=root | |
----------------------------------------------------------------------------- | |
vim /etc/default/tomcat7 | |
----------------------------------------------------------------------------- | |
TOMCAT7_USER=root | |
TOMCAT7_GROUP=root | |
AUTHBIND=yes | |
----------------------------------------------------------------------------- | |
Xmx128 | |
----------------------------------------------------------------------------- | |
vim /etc/tomcat7/server.xml | |
----------------------------------------------------------------------------- | |
<Server port="8005" shutdown="SHUTDOWN"> | |
<Connector port="80" | |
server="Apache" | |
protocol="HTTP/1.1" | |
connectionTimeout="20000" | |
URIEncoding="UTF-8" | |
redirectPort="8443" /> | |
----------------------------------------------------------------------------- | |
vim /etc/tomcat7/web.xml | |
----------------------------------------------------------------------------- | |
<error-page> | |
<error-code>500</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>501</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>502</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>503</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>504</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>505</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>400</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>401</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>402</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>403</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>404</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>405</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>406</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>407</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>408</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>409</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>410</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>411</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>412</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>413</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>414</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>415</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>416</error-code> | |
<location>/index.html</location> | |
</error-page> | |
<error-page> | |
<error-code>417</error-code> | |
<location>/index.html</location> | |
</error-page> | |
----------------------------------------------------------------------------- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment