Skip to content

CentOS Jetty Gradle Nginx, CentOS Java web application deployment

Suddenly sudden whim, decided to make friends and do BBS lost to the server. So it began, took two or three hours to finally have the results.

Just 512M VPSlike almost a bit, vulnerable, and then let us begin.

Don’t know much about Java, but I only need to be concerned with the gradle and jetty is enough, finally found, I don’t need to care about the jetty, only need to care about JDK+Gradle


A plan to use openJDK, but is like almost no configuration, so they came to the evils of the Oracle website, also let us miss the SUN.

Download address

Agreed to after, download the RPM version of the JDK, in 64, or 32 bit set

Next is the requirement and setting the JAVA_HOME environment variable. (reprinted retained Phodal’s Blog Phodal’s zenthink)


rpm -ivh jdk*.rpm

To set environment variables

vim /etc/profile

Check your JDK PATH, then modify the.



source /etc/profile

Confirm whether JAVA_HOME set the environment variables, output

echo $PATH

My results are shown as follows.


Centos Gradle

Gradle is a class like build system of Maven and Ant, written using the Groovy build script, can build dependency management and multi project is very convenient. Gradle set Ant flexible and powerful and Maven dependency management function and practice in a body, is a more efficient construction tools.

Compared with Maven and Ant XML build tool based on Gradle, due to the use of the Groovy language syntax of DSL build script based on the script writing, clear and easy to understand, but also more convenient maintenance (if you are familiar with Groovy language).

Download Gradle

Address :

Install this, I use a simple method to jump in the past.

unzip gradle*.zip


ln -s PATH/gradle/bin/gradle /bin/gradle


Gradle try


Because nginx had a little problem, like almost no successful agent. And then to test the method using modified iptables




Add to

-A INPUT -p tcp -m tcp --dport 8976 -j ACCEPT

Then the modified build.gradle httpPort 8976

sed -i 's/8080/8976/' build.gradle|grep httpPort

Don’t forget

service iptables restart

Finally, the method is ugly, but you can achieve

git fetch origin
git reset --hard origin/master
sed -i 's/8080/8976/' build.gradle|grep httpPort

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitchFree Download

Leave a Reply

Your email address will not be published. Required fields are marked *