Build nginx + scala + play2.0 runtime environment in ubuntu

Source: Internet
Author: User
Ubuntu builds nginx + scala + play2.0 to run the environment to learn scala for a while, recently used scala to do a community: & lt; ahref & quot; http://www.cn-scala.com & quot; title & quot; http://www.cn-scala.com & quot; & gt; & lt;/a & gt;, started to buy ubuntu to build nginx + scala + play 2.0 runtime environment to learn scala for a while, recently I used scala to build a community: I started to buy a vps with a memory of 512, but the compilation failed. the jvm prompts that I cannot allocate space for objects ,? Why ?? Pocket? G. After three hours of fighting, the configuration was successful and recorded by the way. 1. install nginx and mysqlI will not elaborate on a lot of online compilation items. you can google it. 2. install JDK Note: ubuntu users must replace OpenJDK with sunJDK.  [Ubuntu user]01 sudo add-apt-repository ppa: ferramrobert to/java02 # if the preceding command prompt is: command not found, enter the following command: sudo apt-get install python-software-properties03 www.2cto.com 04 sudo apt-get update05sudo apt-get install sun-java6-jre sun-java6-plugin06sudo apt-get install sun-java6-jdk07 08update-alternatives -- config java09 # select jdk, after you enter the preceding command, three options are displayed, select 2nd options 10 Selection Path Priority Status11 limit 12*0/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode13 1/usr/lib/jvm/java-6-openjdk/ jre/bin/java 1061 manual mode14 2/usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode [Non-ubuntu users]Bytes
Modify the/etc/profile file 1 export JAVA_HOME =/usr/local/jdk1.7.0 _ 052 www.2cto.com export CLASSPATH =.: $ JAVA_HOME/jre/lib/rt. jar: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar3export PATH = $ PATH: $ JAVA_HOME/bin 3. download the playframework file[Cc lang = "c"] http://www.playframework.org/ [/Cc] 3.1 install scala. you do not need to install it if you only run play2.0. 1 http://www.scala-lang.org/ # Download debin package, if you install openjdk may appear missing janic2 www.2cto.com dpkg-I scala-2.9.2.deb 3.2, install sbt https://github.com/harrah/xsbt/wiki/Getting-Started-Setup I installed ubuntu through the installation method. do not forget to download it. Otherwise, the system will prompt that the sbt package cannot be found. http://apt.typesafe.com/repo-deb-build-0002.deb1dpkg -I repo-deb-build-0002.deb2 apt-get update3 apt-get install sbt installation process may take some time, after the completion of the test into the scala directory test sbt 4, start play2.0 project 1play2start-Dhttp. port = 9000 5, nginx set proxy 01 www.2cto.com server02 {03 listen 80; 04 server_name * .cn-scala.com cn-scala.com; 05 06 location/static {07 root/static/public; 08} 09 location/{10 proxy_pass http://127.0.0.1:9000;11 Proxy_set_header Host $ host; 12 proxy_set_header X-Real-IP $ remote_addr; 13} 14} author Bing Yuxin
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.