【环境配置】Popush工程在Linux下的配置

Popush Deployment (Linux)

Deploy Result


Environment

Operating System: Linux Mint 17 (Qiana)Cinnamon 64bit

Cinnamon Version: 2.2.16

Linux Kernel: 3.13.0-24-generic

If You Don't Have a Linux yet

1.        First of all, choose a Linuxdistribution (Linux发行版), instruction:http://en.wikipedia.org/wiki/Linux_distribution

·Linux Mint is currently the most popular one, and particularly convenient forprogrammers. You can download it fromhttp://www.linuxmint.com/download.php


Linux Mint 17Qiana

*If you want to getthe most beautiful Linux, and do not care whether convenient, we suppose you touseElementary OS: http://elementaryos.org/

2.        After getting the iso file of Linux distribution, we'dstrongly recommand that you install it on aVirtual Machine instead of instantly on your computer. For VirtualMachines,VMware workstation is agood choice. Download it and add a Virtual Machine, and install your linux onit.

Downloads

Item

Version

Website

Remarks

gdb

7.8*

http://www.gnu.org/software/gdb/

 

python

2.7.8/3.4.1

https://www.python.org/downloads/

2.7's already contained

jdk

8u20

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

 

lua

5.2.3

http://www.lua.org/download.html

 

mongodb

2.6.4

http://www.mongodb.org/downloads

 

ncurses

5.9

ftp://invisible-island.net/ncurses/

 

gcc & g++

 

 

use apt-get install**

nginx

1.7.6

http://nginx.org/

 

node.js

v0.10.32

http://nodejs.org/download/

 

PCRE

8.36

ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

 

perl

5.20.1

https://www.perl.org/get.html

already contained

readline

6.3

ftp://ftp.gnu.org/gnu/readline/

 

ruby

2.1.3

https://www.ruby-lang.org/ja/downloads/

 

termcap

1.3.1

http://ftp.gnu.org/gnu/termcap/

 

zlib

1.2.8

http://www.zlib.net/

 

Popush

 

https://github.com/liuq880077/popush

 

*All these sources are .tar.gz files, extract them under Linux.

**Ctrl+Alt+T to open the Terminal, input these commands:

su
apt-get install g++

 "su" is the abbreviation of "super user", and youshould enter your password. After this, please follow the instructions on thescreen.

Installation

0. How to install a usual .tar.gz pack under Linux

         ·Extract thepack ("在此处展开")

         ·Open theterminal under the new folder ("在终端中打开")

         ·Type thesecommands:

su
./configure
make
make install

             
1.   Install g++
su
apt-get install g++

2. Install Nginx

         ·Copy thefolder of zlib-1.2.8 and pcre-8.36 to nginx-1.7.6

         ·Open theterminal

su
./configure -with-pcre=pcre-8.36 -with-zlib=zlib-1.2.8
make
make install

         ·Test: OpenFirefor/Chrome and turn to http://127.0.0.1, like this:

su
apt-get install g++

3. Install Node.js

         ·Test:

node
console.log("helloworld!");

4. Install GDB

         ·Installtermcap first

         ·Install GDB


         ·Test:

gdb -v

5. Install Ruby

         ·Test:

ruby -v

6. Install Lua

         ·Installreadline first

         ·Then installncurses

         ·Open thepath: lua-5.2.3/src , edit the file Makefile:

                   line105, 106:

linux:
	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"

         ·Open theTerminal:

make linux

         ·Back to thefolder lua-5.2.3 , type:

sudo make install

         ·Test:

lua -v

7. Install JDK

         ·Extract (andrename) to /usr/local/jdk

         ·Open theTerminal and type the commands:

sudo gedit ~/.bashrc

        ·(In thegedit) Add these text after the file:

export JAVA_HOME=/usr/local/jdk
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

         ·Open theTerminal:

source ~/.bashrc

         ·Test:

java -version

8. Install Mongodb

         ·It's adatebase

         ·Extract mongodb-linux-x86_64-2.6.4.tgz , and changethe new folder's name intomongodb

         ·Here openthe Terminal:

su
mv mongodb /usr/local/mongodb2
cd /usr/local/mongodb2/bin
mkdir -p /data/db/journal
chmod -R 777 /data/db/

         ·To start the Mongodb:

./mongod --quiet -journal -maxConns=1000 -rest --logpath /data/db/journal/mongodb.log

9. POPUSH!

         ·Move thefolder to /popush, open it

         ·In theTerminal:

sudo make deploy

         ·Change thefiles:

Run

1. Start the Mongodb

2. Start the Popush

3. Open the website of Popush

         ·Type localhost in your browser

         ·Test:

                   1.Register

                   2.Login

                   3.Add file "hello world.js"

                   4.Type console.log("Helloworld!"); and run

         ·Test otherprogramming languages like this

Problems

1. Cannot connect the server (无法连接至服务器)

         ·Restart allservices

2. Internal Error (内部错误)

         ·CheckMongodb

3. (In the Popush)Cannot create new file

         ·Replace thefolder mongojs and the file socket.io.js

4. (While running a code)Return error EACCES

         ·I couldn'tfind where the mistake is. After I restarted the Linux, the error fixed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值