Hackademic / hackademic

the main hackademic code repository
GNU General Public License v3.0
318 stars 117 forks source link

Documentation and wiki updates #62

Open northdpole opened 10 years ago

northdpole commented 10 years ago

We need some good soul to extract the documentation of the functions to a wiki page and create some pages describing how to install and use the platform

gameFace22 commented 9 years ago

https://github.com/Hackademic/hackademic/pull/108 This could be a good start?

kurtcoke commented 9 years ago

Here it is. Sent to one of the leaders aswell:

Instructions:

# apt-get update && apt-get upgrade
# apt-get install apache2
# mkdir /var/www/hackademic-challenge

Just for interest sake. Its often good to use a very random directory location for your apache webroot. This will make it harder for users to upload a php shell if they find a bug in your web application.

# apt-get install git

Now as a non root user run git clone of the hackademic project's git repo.

# su me
$ git clone https://github.com/Hackademic/hackademic.git

Now as root user

# cp -R /home/me/hackademic/* /var/www/hackademic-challenge/
# chmod -R 765 /var/www/hackademic-challenge/*
# chown www-data:www-data /var/www/hackademic-challenge/*
# apt-get install php5 mysql-server

Run mysql secure install

# mysql_secure_installation 

See if php is working. Create a php info page.

# echo "" >> /var/www/info.php

Go to http://ip/info.php IP. If it works then continue. See wiki on info on locking down php. Remember to disable phpinfo function.

Change apache's document root directory

# vi /etc/apache2/sites-available/default

Change this line

DocumentRoot /var/www/

To look like this:

DocumentRoot /var/www/hackademic-challenge/

Restart apache service to reload configuration

# service apache2 reload

As non root user:

$ mysql -u root -p
mysql> create database hack_demic_db;
mysql> GRANT ALL PRIVILEGES ON hack_demic_db.* TO 'hack_demic_user'@'localhost' IDENTIFIED BY 'ususn3832Kh0-' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit;

Navigate to your IP and the install will start.

http://yourip

If you are running the application on your desktop machine and not in a virtual machine, then look into running apache only on localhost or blocking incoming requests to port 80 with Iptables.

pchaigno commented 9 years ago

I think we should keep the README.md small and easily readable. Maybe we should add these detailed instructions for Ubuntu in the Wiki?

kurtcoke commented 9 years ago

If you are going to do that then you should atleast give a high level explanation of how to install it on the README.md and tell people "For detailed instructions click on this link on installation instructions on our wiki". At the moment your project README.md is very vague and doesn't make it easy for people to just download and install it.

kurtcoke commented 9 years ago

I see the line that I showed on how to write <?php phpinfo(); ?> to a file does not show the php code on github's markdown so just see if you can fix that when you add it to the readme. Would appreciate it if you guys give me credit somewhere on your wiki for the detailed instructions. Here is what a good readme looks like with a link to good install instructions: https://github.com/Netflix/Scumblr and here are the install instructions: https://github.com/Netflix/Scumblr/wiki. Take my suggestions I'm just trying to help make this project's documentation more readable.

pchaigno commented 9 years ago

If you are going to do that then you should atleast give a high level explanation of how to install it on the README.md and tell people "For detailed instructions click on this link on installation instructions on our wiki".

Of course ;)

I see the line that I showed on how to write <?php phpinfo(); ?> to a file does not show the php code on github's markdown so just see if you can fix that when you add it to the readme.

Sure. We'll put it in form before publishing it.

Would appreciate it if you guys give me credit somewhere on your wiki for the detailed instructions.

I'm thinking about making a file with the name of the contributors. Something like this. I'll add you to it of course.