Shell into you EC2 instance and cd to the root of the web storage (assumes a standard Amazon Linux instance)
ssh -i your_key_file.pem ec2-user@your_ec2_url
Download the dokuwiki source base (this is just an example, chances are the actual URL is different. Figure this out yourself!)
Unpack the thing
tar xvfz dokuwiki-c5525093cf2c4f47e2e5d2439fe13964.tgz
This will have generated a folder called 'dokuwiki'.
BEFORE YOU RUN INSTALL.PHP DO THIS!
Firstly, on Amazon Linux the web server runs as user 'apache'. At minimum you'll want to chgrp/chown the dokuwiki folder. You can check this by running
ps aux | grep “http”. Note that php's “get_current_user” seems to display something related to file permissions. TBH, I'm at a loss to know. I used it for testing and it returned 'ec2-user' until I chown'd the /var/www/html folder then it returned 'apache'. I'm not going down that rabbit hole.
chown -R apache dokuwiki
chgrp -R apache dokuwiki
If you do not do the above you'll get a ton of “permissions” problems (files and folders not writable) when you run install.php and you'll end up discovering exactly what I'm documenting here!!!
Then go to a browser and go to…
Follow the instructions.
Using the shell remove the install.php folder for sanities sake.