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* |
| |
python | 2.7.8/3.4.1 | 2.7's already contained | |
jdk | 8u20 | http://www.oracle.com/technetwork/java/javase/downloads/index.html |
|
lua | 5.2.3 |
| |
mongodb | 2.6.4 |
| |
ncurses | 5.9 |
| |
gcc & g++ |
|
| use apt-get install** |
nginx | 1.7.6 |
| |
node.js | v0.10.32 |
| |
PCRE | 8.36 |
| |
perl | 5.20.1 | already contained | |
readline | 6.3 |
| |
ruby | 2.1.3 |
| |
termcap | 1.3.1 |
| |
zlib | 1.2.8 |
| |
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
su
apt-get install g++
·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.