User Tools

Site Tools


sysadmin:dokuwiki:dokuwiki_install_aws_ec2

This is an old revision of the document!


Install DokuWiKi on AWS EC2 Amazon Linux 2 AMI

  1. Launch a new t2.micro EC2 instance from Amazon Linux 2 AMI
  2. Allocation new Elastic IP
  3. Allocate the Elastic IP to newly create EC2 instance
  4. Using PuTTY SSH Client and PEM key login, SSH into in the new instance
  5. Run the following Linux shell command to update Amazon Linux 2:
    sudo yum -y update
  6. Run the following Linux shell command to install PHP 7.2:
    sudo amazon-linux-extras install -y php7.2
  7. Run the following Linux shell command to install Apache httpd, PHP XML Parser (required by DokuWiki) and Apache SSL Module:
    sudo yum -y install httpd php-xml mod_ssl
  8. Edit httpd.conf file by running sudo vi /etc/httpd/conf/httpd.conf Linux shell command with following contents:

    Replace «Private IP Address of EC2 Instance»
    Replace «Server Administrator Email address»
    Replace «Website DNS»

    httpd.conf
    Listen <<Private IP Address of EC2 Instance>>:80
    ServerAdmin <<Server Administrator Email address>>
    ServerName <<Website DNS>>:80
    <LocationMatch "/(data|conf|bin|inc|vendor)/">
         order allow,deny
         deny from all
         satisfy all
    </LocationMatch>
  9. Run the following Linux shell command to enable Apache httpd server to start at boot as well as immediately:
    sudo systemctl enable httpd
    sudo systemctl start httpd
  10. Run the following Linux shell commands to download and install DocuWiKi:

    For detailed installation procedure, refer to https://www.dokuwiki.org/install:amazone_ec2

    To generate «dokuwiki download file», Goto https://download.dokuwiki.org/ URL from any web browser, select necessary options and click Start Download button

    cd /var/www/html
    sudo wget https://download.dokuwiki.org/out/dokuwiki-<<.tgz
    sudo tar -zxvf dokuwiki-<<dokuwiki download file>>.tgz
    sudo rm -r dokuwiki-<<dokuwiki download file>>.tgz
    sudo chown -R apache dokuwiki
    sudo chgrp -R apache dokuwiki
    cd dokuwiki
    sudo mv * ../
    cd ..
    sudo rm -Rf docuwiki
    sudo chmod -R 0700 data
    sudo chmod -R 0700 conf
    sudo chmod -R 0700 inc
    sudo chmod -R 0700 vendor
sysadmin/dokuwiki/dokuwiki_install_aws_ec2.1602092756.txt.gz · Last modified: 2020/10/07 17:45 by vidyasb