Develop an SSH sample framework AppFuse2.1JavaWeb application in Ubuntu11.04

Source: Internet
Author: User
I just migrated the app that originally developed AppFuse2.1 under Windows 7 to Ubuntu11.04, enabling Maven3.0.3 and EclipseGalileo to develop source code and deploy the WAR package to tomcat6. Ubuntu is a Linux Desktop System with a market share of more than 50%. It is completely free of charge. Through nearly a week's experience, the desktop experience is more dazzling than Windows 7, which has been in use for half a year. Unb

I just migrated the app that was originally developed with AppFuse 2.1 in Windows 7 to Ubuntu 11.04, so that the source code can be developed using Maven 3.0.3 and Eclipse Galileo in the Ubuntu environment, deploy the WAR package on Tomcat 6. Ubuntu is a Linux Desktop System with a market share of more than 50%. It is completely free of charge. Through nearly a week's experience, Ubuntu's desktop experience is more dazzling than Windows 7, which has been in use for half a year. Unbuntu is most attractive to me for its Ubuntu Software Center Function, which allows you to easily search for and install some useful free Software. I will discuss it one by one below. Now we will briefly describe the migration steps.

1. Install Ubuntu 11.04 on a Windows 7 laptop
1.1. Download the Ubuntu 11.04 ISO file. Link:/home/ben/dev/bensarchetypes/appfuse21eosc/eclipse
1.2. Use the Universal USB Installer to create a self-starting USB flash drive from the above ISO file
1.3. Clear useless Windows 7 files and clear disk fragments
1.4. In Windows 7, use the disk management tool to compress the disk and leave disk space for Ubuntu.
1.5. Use the above self-boot USB flash drive to start the computer
1.6. Install Ubuntu 11.04 as prompted
1.7. After Ubuntu is installed, install Smart Common Input Method (SCIM) for Chinese Input.

2. Install the AppFuse 2.1 Application Development Environment on Ubuntu
2.1. Install JDK. Download the jdk-6u25-linux-i586.bin self-installation file from the Oracle website, copy it to the/opt/dev/sdks directory of Ubuntu, modify the permission to make it executable, and then run the file to complete JDK installation. The command is as follows:
Sudo chmod a + rw jdk-6u25-linux-i586.bin
Sudo./jdk-6u25-linux-i586.bin
2.2. Install MySQL Server. In the Ubuntu Software Center, find mysql and install MySQL 5.1.54-1ubuntu4 (mysql-server ). After installation, run the following command to check the installation result:
Sudo service mysql start
Mysql-u root-p
2.3. install Tomcat. Find tomcat in the Ubuntu Software Center and install Tomcat 6.0.28-10ubuntu2 (tomcat6)
2.4. Install Maven. Download the apache-maven-3.0.3-bin.zip file and decompress it:
Cd/opt/dev/tools
Unzip apache-maven-3.0.3-bin.zip

3. Configure environment variables on Ubuntu
Modify ~ /. Bashrc file, add the following statement, so that each time you open a terminal, the environment variable will be automatically set.
SDKS_HOME =/opt/dev/sdks; export SDKS_HOME
TOOLS_HOME =/opt/dev/tools; export TOOLS_HOME
JAVA_HOME = $ SDKS_HOME/jdk1.6.0 _ 25; export JAVA_HOME
MAVEN_HOME = $ TOOLS_HOME/apache-maven-3.0.3
PATH = $ JAVA_HOME/bin: $ MAVEN_HOME/bin: $ PATH; export PATH

4. Place the packages dependent on AppFuse 2.1 to the Maven local repository
Unzip the file appfuse-dependencies-2.1.0.tar.gz (http://static.appfuse.org/nightly/) ~ /. M2/repository

5. Set the MySQL root Password
In the pom. xml file, Set Is the root password you set when installing MySQL

6. Stop the Tomcat 6 Service
Because it conflicts with the Jetty server port 8080 used below.
Sudo service tomcat6 stop

7. Compile and run
Mvn clean jetty: run
If everything goes well, after the jetty server is started, enter htt: // localhost: 8080/in the browser to access the AppFuse 2.1 application.

8. Install Eclipse
Use Ubuntu software Center, find eclipse, and install

9. Set the M2_REPO environment variable in Eclipse to let Eclipse know the local Maven repository
Window> Preferences. Select Java> Build Path> Classpath Variables and add the M2_REPO environment variable to point ~ /. M2/repository

10. Install m2eclipse in Eclipse to obtain Maven support in Eclipse.
Help> Install New Software> Work with> http://m2eclipse.sonatype.org/sites/m2e/

11. Let Eclipse know that you have installed JDK
Modify/etc/eclipse. ini and add the following two lines on-vmargs.
-Vm
/Opt/dev/sdks/jdk1.6.0 _ 25/bin

12. Install Hibernate Tools
Help> Install New Software> Work with> http://download.jboss.org/jbosstools/updates/stable/galileo/

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.