Main /
MathapediaResourcesIntorEdward wrote: "I've had the pleasure of co-advising with Babak a master's project by Dan Lynch (cc'd here) that has resulted in a truly beautiful web authoring tool that could be an extremely helpful addition to our open source course content tools. You can see a brief video demonstration here:" https://mathapedia.com "The tool is based on Latex, HTML5, and JS, is on github (search for LaTeX2HTML5), and is BSD licensed." Dan is willing to give a demo and have a discussion with anyone interested next Wednesday morning, January 16, at 11am. Dan is very open to interacting with both developers and content authors. It might be really interesting, for example, to develop some circuits documents and/or exercises for our MAS-IC program (Brian: anybody else working on that who might be interested in this? If so, please forward this invitation.) "Dan showed me some of the JavaScript source code today, and it looks quite well architected, so extending it seems quite viable to me..." "Christopher: I know you are flat out overbooked, but when there is some breathing room, it would be good to replicate Dan's web server, which is based on nginx (and uses some javascript and database capabilities). Dan is currently running the mathapedia server above on a VM in the cloud." "If you are interested and can come to this, please let me know.." Installation 1/08/13Dan wrote: "The most important is to get nginx, nodejs, and MySQL running. The two that matter most are nginx/nodejs versions: nginxDan says that nginx v0.8.54 is installed, but the most recent version is 1.3.10. cd ~/tools wget http://nginx.org/download/nginx-0.8.54.tar.gz tar -zxf nginx-0.8.54.tar.gz cd nginx-0.8.54 ./configure Need pcreyum install pcre ./configure Still failed, so I tried: ./configure --with-pcre=/usr/lib64 which worked, but then make failed :-( cd ~/tools wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gz tar -zxf pcre-8.32.tar.gz cd pcre-8.32 mkdir /opt/local ./configure --prefix=/opt/local Build again: cd ~/tools/nginx-0.8.54 ./configure make make install nodejs v0.8.11Installed from http://nodejs.org/dist/v0.8.11/ Most recent version is 0.8.16 Download and untar in /usr/local: wget http://nodejs.org/dist/v0.8.11/node-v0.8.11-linux-x64.tar.gz cd /usr/local tar -zxf node-v0.8.11-linux-x64.tar.gz ln -s node-v0.8.11-linux-x64 node cd bin ln -s ../node/bin/* . Check that nodejs works by creating a file: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, "127.0.0.1"); console.log('Server running at http://127.0.0.1:1337/'); and then doing wget http://127.0.0.1:1337 Note that sisyphus is running a firewall, see http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Hudson for my notes about messing with sisyphus' firewall. Installation 1/14/2013pulling the repo downcd /var /www git clone https://github.com/pyramation/LaTeX2HTML5.git Dan: (STATUS: I've done this) installing the npm packages.so I can run these globally (they are for the build and monitoring): npm install -g forever npm install -g bbb Dan: (STATUS: NOT DONE this is where I had some problems, but I'm still writing all the steps so we have some direction the problem is root doesn't have npm, but d needs permission to make this directory: /usr/local/lib/node_modules) Christopher: (STATUS: As root, the above directory has been created. Also, Dan has root via sudo) The rest is a part of the repo and can be installed more easily:cd /var/www/LaTeX2HTML5 npm install Dan: (STATUS: I've done this) Setting up nginx config filesis there a domain we can use? I can just create the config for this once we have a domain. Dan: (STATUS: will do as soon as we have a domain and all the above steps are complete) Create a mysql userDan: (STATUS: not done, do you have a root for this?) otherwise, if you need root access to mysql, can you create a new user like so: GRANT ALL PRIVILEGES ON latex2html5_db.* TO latex2html5@localhost IDENTIFIED BY 'skateboard321' WITH GRANT OPTION; Finish the mysql installationcd /etc/rc3.d ln ../init.d/mysqld S36mysqld /etc/init.d/mysqld start /usr/bin/mysql_secure_installation The mysql root password is in [root@sisyphus rc3.d]# ls -l /var/lib/mysql/.my.cnf -rw------- 1 mysql root 39 Jan 14 19:33 /var/lib/mysql/.my.cnf To grant permissions to the above account: /usr/bin/mysql --user=root -p mysql then enter: GRANT ALL PRIVILEGES ON latex2html5_db.* TO latex2html5@localhost IDENTIFIED BY 'skateboard321' WITH GRANT OPTION; Installation continued (1/16/2013)As root, reference /usr/local/bin/npm install -g forever /usr/local/bin/npm install -g bbb Create the latex2html_db as the latex2html5 user. Probably mysql mysql -u latex2html5 -p latex2html5_db < mathapedia_db.sql Note that the mathapedia_db.sql is not open source, it contains course material. Edit nginx.conf in /usr/local/nginx/conf February 6 work.
To start upcd /var/www/LaTeX2HTML5 npm start Then go to http://source.eecs.berkeley.edu foreverAs a non-root user Deploying cd /var/www/LaTeX2HTML5 bbb release RELEASE=1 forever start server/app.js To stop: Need to do a custom checkout for node_modulescd node_modules git clone https://github.com/pyramation/jugglingdb git checkout c4a8a6ff2a061704970def0fbdd255a3979060ca |