Ubuntu Basic Environment

Source: Internet
Author: User

I. Preamble

Here's a record of installing the Ubuntu system, as well as the things that are commonly used inside, jdk,idea,maven,svn,git and so on, because these actions are not often manipulated, so here's a record to make it easy for newbies or forget to look.

Second, JDK installation

1. About the installation of Ubuntu, I do not introduce here, with a USB flash drive mode, version is 14.1, directly from the official website down, I 8G memory, with the 64-bit system, of course, some basic commands are not introduced here.

2.JDK installation, I use the JDK8, first to download the official website as 1.8.xxx.tar.gz, I put in the program file of their own establishment

Unzip with TAR-ZXVF, get jdk1.8.0_40 file.

Website address: http://www.oracle.com/technetwork/java/javase/downloads/index.html

3. Set up the Java_home environment, there are two ways, a direct set into the system, one is related to the current login user, I use the second type here, with the console: sudo gedit/etc/prifile, enter your account password, at the end of the popup file is not added

#set Java Environment, the environment path remember to change to its own directory export java_home=/home/xx/program/jdk1.8.0_40  export jre_home=${java_home}/ JRE  export classpath=.:${java_home}/lib:${jre_home}/lib  export path=${java_home}/bin: $PATH

Of course, you have to set up something to use, it's easy to set up for multiple JDK here, there's only one ~.~, console input

# This 3 lines of code separately input sudo update-alternatives--install/usr/bin/javac javac/usr/lib/jvm/jdk1.8.0_40/bin/javac sudo Update-alternatives--config JAVA sudo update-alternatives--config javac

And then you execute the javer-version, and the output is okay.

Third, install IDE tools idea, this tool feels more comfortable than eclipse, my version is idea 14

: http://www.jetbrains.com/idea/

1. Unzip the file TAR-ZVXF Ideaiu-14.0.3.tar.gz/xx/program unzip the location of your choice.

2. Go to the installation directory you just installed: CD idea-iu-139.1117.1/bin, then execute./idea.sh.

By the way, Idea 14 is chargeable, although I don't support piracy, but you know it. Find a key generator, the attachment I will upload, take to use on the line.

Iv. MAVEN Installation

Many projects are now MAVEN-related, including the integration of idea, so it's best to install this before using the IDE.

: http://maven.apache.org/download.cgi

1. Decompression: TAR-ZVXF apache-maven-3.2.5-bin.tar.gz, Location choice

2. Also set environment variables: sudo gedit/etc/profile is not added after opening

#set maven environmentm2_home=/home/xx/program/apache-maven-3.2.5export maven_opts= "-xms256m-xmx512m" Export PATH=$ M2_home/bin: $PATH

3. For this to take effect, you can use the command of the JDK above, and of course there is another one:. /etc/profile

4. If console input: Mvn-version get normal version information, it succeeds.

In addition, if Google does not go, you need to change the host file, configure some network IP, their own search for the hosts Google 2015 can be found, or with my red apricot recommended, free 10 days: Http://honx.in/VMWWmM6vD3FssczA

Iv. installation of SVN

Direct command here: sudo apt-get install subversion

Basically installed, you can use idea Checkout project, use the time to remember with their own Mavan directory.

Five, git GitHub installation

Address Description: http://rogerdudler.github.io/git-guide/index.zh.html

Cool push: Http://www.tuicool.com/articles/MJvuua

1. Next git, command:

sudo apt-get install Git-core

2. Set your github name and email

git config--global user.name = "User name or user id" git config--global user.email = "Mailbox"

3. Create your Public key

Ssh-keygen-c ' [email protected] '-t RSA

4. Test connectivity

ssh-v [email protected]

5. Add your public key to GitHub's SSH key, open the public key, and copy it.

Cat ~/.ssh/github.pub

6. Fill in the File->setting-<github inside your idea

Host:github.comlogin: Your e-mail password: password

7. Checkout or import project to GitHub

From Idead->vcs->checkout or Import->share. GitHub or create a local import->created git repository first

This is the basic installation OK, you can free pull push.

Of course you can link to here Open Source: http://git.oschina.net/

Configuration address: http://my.oschina.net/lujianing/blog/194069

Six, jetty and Tomcat plug-in installation, here I am using the Maven plugin, directly paste configuration bar

<!--specific parameters you want to set--  
 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId> tomcat7-maven-plugin</artifactid> <version>2.2</version> <configuration> <path>/ agent</path> <uriEncoding>utf-8</uriEncoding> <port>${app.port}</port> <SERVER&G t;tomcat</server> <warFile>${app.warFile}.war</warFile> <systemProperties> <SYSTEMPR Operty> <name>JAVA_OPTS</name> <value>-xms256m-xmx768m-xx:+useconcmarksweepgc-xx:max      Permsize=256m-xx:newratio=6-xx:+cmsclassunloadingenabled-xx:+cmspermgensweepingenabled </value> </systemProperty> </systemProperties> </configuration></plugin> 
<!----> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactid>jetty-ma          Ven-plugin</artifactid> <version>8.1.8.v20121106</version> <configuration> <stopKey>stop</stopKey> <stopPort>5599</stopPort> <reload>manual</reloa          d> <webAppConfig> <contextPath>/</contextPath> </webAppConfig> <scanIntervalSeconds>5</scanIntervalSeconds> <connectors> <connector Implem entation= "Org.eclipse.jetty.server.nio.SelectChannelConnector" > <port>80</port> & lt;maxidletime>60000</maxidletime> </connector> </connectors> </configu            ration> <dependencies> <dependency> <groupId>net.alchim31</groupId> <artifactiD>livereload-jvm</artifactid> <version>0.2.0</version> </dependency> </dependencies> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid > <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> & lt;configuration> <skipTests>${skipTests}</skipTests> </configuration> </plug In>

More information can be found in:

http://www.infoq.com/cn/news/2011/04/xxb-maven-7-plugin/

Http://maven.apache.org/plugins/index.html

    • This article is from: Linux Tutorial Network

Ubuntu Basic Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.