-
-
Notifications
You must be signed in to change notification settings - Fork 165
First Time Setup
If you are interested in writing code for WeBWorK you need to first get WeBWorK installation running, either on your own server or on a virtual machine. The easiest way to install WeBWorK on a local laptop is to use the app Docker
as described in https://github.com/openwebwork/webwork2/wiki/Docker-newbie-instructions.
This can also be done using the automated installation script at https://github.com/aubreyja/ww_install by running the commands:
wget --no-check-certificate https://raw.github.com/aubreyja/ww_install/master/install_webwork.sh
bash install_webwork.sh
Now answer all of the questions asked by the script, including where you want to store your webwork repository, the database password, the site name, etc... Report any issues you have to aubreyja's github repository.
The install_webwork.sh
method may be more appropriate to set up a public WeBWorK installation that will serve many people. Alternatively you can manually install WeBWorK using the (somewhat outdated) instructions at http://webwork.maa.org/wiki/Get_WeBWorK.
Next you will need to set up your own github repository and add it as a remote to your WeBWorK installation.
- Start by clicking the fork button on the upper right hand side of this page.
- Your WeBWorK installation currently has the openwebwork github repository set up as a remote named origin. First go to the directory where you installed WeBWorK. Add your remote by using the commands
cd /opt/webwork/webwork2
git remote add personal https://github.com/<github username here>/webwork2.git
cd /opt/webwork/pg
git remote add personal https://github.com/<github username here>/pg.git
This assumes you installed webwork in /opt/webwork
. You may have decided to put it elsewhere.
Note: If you installed WeBWorK manually using clone from your personal repository, then your personal repository will be named origin. You would then add the openwebwork repository using a similar command as above. You can then rename your branches using git branch rename <old branch name> <new branch name>
.
3. Recommended: This step is optional but recommended. As described in Coding and Workflow, all new code for WeBWorK should be written on feature branches. We don't recommend keeping local copies of the develop and master branches around since you shouldn't be making commits to those. If you want to work with a fresh copy of develop you can make a feature branch as follows
git checkout -b <feature branch name>
Alternatively, you can checkout a "headless" version of develop to play around on using
git checkout origin/develop
This branch is temporary but can be made into a permanent branch by using git checkout
.
Finally, you might consider deleting your master branch, just to be safe.
git branch -D master