Build tiny development environment under Linux

Source: Internet
Author: User
Tags gz file svn

A friend in Linux compiled tiny error, I compile under Windows is OK, but does not explain the problem. So just want to build a Linux under the compilation environment to verify, the actual construction process encountered some problems-mainly NTLM ISA proxy server problem. Because the whole process is more complex, so write this blog, the need for friends just use it. Step 1: Build a Linux environment considering all aspects of Fedora, I chose Fedora to create a virtual machine in vsphere, and then it was finished, and there was nothing to say.

Step 2: Since you often connect or upload files from Windows via SSH, set up automatic SSH systemctl enable Sshd.service
STEP3: Installing the JDK and configuring the environment variable tiny framework requires jdk1.5 and jdk1.6 two JDK, considering that if you install a high version of Web Server, you also have jdk1.7 installed
JDK has bin and rpm two formats
The bin format increases execution permissions by chmod +x Xxxx.bin, and then./xxxx.bin to perform the installation
RPM format, which needs to be installed via the RPM command, simply rpm-i xxxx.rpm
The setting of environment variables, if all users are working, is configured in/etc/profile, if only the current user is working, that is. Bash_profile, if you are playing, you can put in/etc/profile, if it is a formal environment, Keep it a little more appropriate in the. bash_profile
?

1
2
3
4
5
6
Java_home=/opt/jdk1.6.0_33
Jdk_home= $JAVA _home
Jre_home= $JAVA _home/jre
Classpath=. Java_home/libjre_home/lib
Export Java_home jdk_home jre_home CLASSPATH
Path= $PATH:/opt/apache-maven-3.1.0/binjava_home/binjava_home/jre/bin



After modifying the profile, to make it work, one is to restart the computer, or the simple point is:
Source/etc/profile or source. bash_profile
STEP4: Installing Maven
This is very simple, download the Apache-maven-3.1.0-bin.zip file, and then
Unzip Apache-maven-3.1.0-bin.zip
It can be solved. Then add its bin file to the PATH environment variable.
Because the tiny framework requires JDK 1.5 and JDK1.6, it modifies the local warehouse location in its settings.xml and sets the constants for the two versions of the JDK Javac.
Local warehouse, I am so configured:

1 <localRepository>/opt/MavenRepository</localRepository>



Of course, the/opt/mavenrepository file needs to be read and written to everyone.
Add two profiles, of course, a profile is also possible, the main purpose is to set two properties:

1
2
3
4
5
6
7
8
9
10
11
<profile><span></span> <id>JAVA5</id>
<properties>
<JAVA_1_5_JAVAC>/opt/jdk1.5.0_22/bin/javac</JAVA_1_5_JAVAC>
</properties>
</profile>
<profile>
<id>JAVA6</id>
<properties>
<JAVA_1_6_JAVAC>/opt/jdk1.6.0_33/bin/javac</JAVA_1_6_JAVAC>
</properties>
</profile>



Of course, you have to turn them on at the end:

1
2
3
4
5
<activeProfiles>
<activeProfile>JAVA5</activeProfile>
<activeProfile>JAVA6</activeProfile>
...
</activeProfiles>



OK, at this point, at the command line, enter the following command to try and have the correct output:

1 Mvn-version



Correct, it should be similar to the following output:

1
2
3
4
5
6
7
[email p Rotected] conf]$ mvn-version
Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 10:15:32+ 0800)
Maven home:/opt/apache-maven-3.1.0
Java version:1.6.0_33, Vendor:sun Microsystems Inc.
Java home:/opt /jdk1.6.0_33/jre
Default locale:zh_cn, platform encoding:utf-8
OS name: "Linux", Version: "3.11.10-301.fc20.x86 _64 ", Arch:" AMD64 ", Family:" Unix "



OK, this is the time to prove that both Java and MAVEN are installed properly.
Sometimes, in the/usr/bin directory, there will be java,javac and other commands that are linked to the system's default jre7, even if
sudo rm/usr/bin/java*
This will change the JDK as soon as you modify the Java_home constant.
Step5:ntlmaps installation because my machine is behind the ISA (can be directly online or in the back of the ISA can skip directly), so the internet is very inconvenient, I choose the solution is to install ntlmaps-0.9.9, this installation is very simple, is a tar.gz file, after downloading:
TAR-ZXVF ntlmaps-0.9.9.tar.gz will be all right.
But this stuff is written in Python, there is no way to install a Python run environment, I use the ActivePython, download and install it.
Ntlmaps configuration, but also relatively simple, I check the data, found that http://blog.csdn.net/five3/article/details/7744516 is the best written. Do it basically OK, the front I see some people write, not detailed, the following configuration, using the default way, the result is not alive, replaced by the following only OK:

1
2
3
Lm_part:1
Nt_part:1
ntlm_flags:07820000



The next step is to set up the proxy:
To increase the proxy settings on the network settings:
localhost:5865
Add the following to the/etc/profile:

1
2
Export Http_proxy=http://username:[email protected]:5865
Export Https_proxy=https://username:[email protected]:5865



Username, password These two change your own oh.
Then source/etc/profile make it effective, normal, use Firefox to try to start. Yum should not be available at this time because the Yum agent is also configured

1 sudo vi/etc/yum.conf



Then add or modify the contents of the proxy:
?

1 Proxy=http://username:[email protected]:5865



OK, this time, Yum should be ready to use.
STEP6: Install SVN by installing SVN input below command
sudo yum-y install subversion
If it works, the installation will be successful.
Next, set up the proxy for subversion:
Location of the settings file: $HOME/.subversion/servers

The specific sections that need attention are as follows:
[Global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
Http-proxy-host = localhost
Http-proxy-port = 5865
Http-proxy-username = Username
Http-proxy-password = password
Note that the username and password above will be changed to your own.
STEP7: Download Tiny source code: SVN checkout Https://svn.code.sf.net/p/tinyorg/code/trunk Tinyorg-code
STEP8: Compiling

1
2
CD Tinyorg-code/sources/framework
MVN install-dskiptests



Then is the long wait, might as well make a cup of tea, listen to a music, rest. If your machine and network are good enough, it's almost 10 minutes.
Step9:idea or Eclipse installation idea is a tar.gz package, just put it out.
Eclipse can go to the software, search eclipse to choose the installation, then give eclipse to install the common plug-in subclipse,m2eclipse and so on, you can import the project like under Windows to start.

Build tiny development environment under Linux

Related Article

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.