By accident, I suddenly thought about it and decided to drop the bbs with my friends on the server. So it took two or three hours to get the result. It's just 20284 m of VPS & amp; it's a little bit difficult, and let's get started. I don't know much about java, but I just need
By accident, I suddenly thought about it and decided to drop the bbs with my friends on the server. So it took two or three hours to get the result.
It seems that the m vps is a little bit difficult. let's start.
I don't know much about java, but I just need to care about gradle and jetty. I finally found that I don't need to care about jetty, but I just need to care about JDK + Gradle.
CentOS JDK
In the first place, I planned to use openJDK, but it seemed that I was not properly configured. so I came to the official website of Oracle, and let's Miss SUN.
Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
After you agree, download the rpm JDK, depending on 64-bit or 32-bit.
Next, we need to set the JAVA_HOME environment variable. (Reprinted and retained Phodal's Blog Phodal's zenthink)
CentOS JDK
rpm -ivh jdk*.rpm
Set environment variables
vim /etc/profile
Check your jdk path and modify it.
JAVA_HOME=/usr/java/jdk1.7.0_45JRE_HOME=/usr/java/jdk1.7.0_45/jrePATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexport JAVA_HOME JRE_HOME PATH CLASSPATH
Application
source /etc/profile
Check whether JAVA_HOME is set and the output environment variable is correct.
echo $PATH
My results are as follows:
/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/jdk1.7.0_45/bin:/usr/java/jdk1.7.0_45/jre/bin:/root/bin
Centos Gradle
Gradle is a building system similar to Maven and Ant. it uses Groovy to write build scripts, which can easily perform dependency management and multi-project construction. Gradle integrates Ant's flexibility and power, as well as Maven's dependency management functions and practices. it is a more efficient building tool.
Compared with XML-based build tools such as Maven and Ant, Gradle uses the DSL syntax based on Groovy to write build scripts, making the scripts clear and easy to understand, it also becomes easier to maintain (if you are familiar with the Groovy language ).
Download Gradle
Address: http://www.gradle.org/downloads
After installing this, I jumped over in a simple way.
Unzip gradle *. zip
Link
ln -s PATH/gradle/bin/gradle /bin/gradle
Then
Try gradle
Run
Because nginx encountered a small problem, it seems that no proxy is successful. So we use the iptables modification method to test
Path
/etc/sysconfig/iptables
Vim
Add
-A INPUT -p tcp -m tcp --dport 8976 -j ACCEPT
Then, modify the httpPort on build. gradle to 8976.
sed -i 's/8080/8976/' build.gradle|grep httpPort
Don't forget
service iptables restart
The last method is ugly, but it can be implemented.
git fetch origingit reset --hard origin/mastersed -i 's/8080/8976/' build.gradle|grep httpPort