Skip to content

Installing LAMP and ChurchCRM on Azure

Robert Spencer edited this page Jun 13, 2024 · 5 revisions

Installing LAMP and ChurchCRM on Azure

  1. On Azure

    1. Click Virtual Machines
    2. Click Create Virtual Machines
    3. Select Ubuntu Server
    4. Select Ubuntu Server 24.04 or latest version and click Create
    • Name: LAMPServer
    • VM disk type: SSD
    • User name: lamp
    • Authentication type: Password
    • Password: ****
    • Resource group: Create new: LAMPServer
    • Location: (whatever is best for you)
    • Click OK
    • Select a size that suits you
    • Click OK
    • Availability set: None
    • Use managed disks: Yes
    • Virtual network: leave as default
    • Subnet: leave as default
    • Public IP address: Static
    • Network security group (firewall): leave as default
    • Enable auto-shutdown: Off
    • Boot diagnostics: Enabled
    • Guest OS diagnostics: Disabled
    • Diagnostics storage account: leave as default
    • Click Create
    1. Click Virtual Machines
    2. Click LAMPServer
    • Take note of the Public IP address
  2. Download and install an SSH client (I am using PuTTY)

    1. Enter the Public IP address under “Host Name (or IP address)”
    2. Click Open
    3. Click Yes on the prompt (First time only) and a terminal window will open
  3. Login

    1. username: lamp
    2. Password: ****
  4. Updates

    1. sudo bash
    2. apt-get update
    3. apt-get -y upgrade
    4. apt-get -y dist-upgrade
    5. apt-get -y autoremove
  5. Configuring LAMP

    1. apt-get -y install apache2
    2. apt-get -y install mysql-server
    3. Enter MySQLPassword
    4. Confirm MySQLPassword
    5. apt-get -y install php
    6. apt-get -y install php-curl php-cli php-dev php-gd php-intl php-mcrypt php-json php-mysql php-opcache php-bcmath php-mbstring php-soap php-xml php-zip gettext unzip
  6. Allow custom URLs

    1. a2enmod rewrite
  7. Create a database

    1. mysql -u root -p
    2. Enter MySQLPassword
    3. CREATE DATABASE churchcrm;
    4. CREATE USER 'churchcrm'@'localhost' IDENTIFIED BY 'Put\_your\_database\_password\_here';
    5. GRANT ALL ON churchcrm.\* TO churchcrm@'localhost';
    6. exit;
  8. Edit 000-default.conf file

    1. Hostname
    • Take note of your hostname
    1. nano /etc/apache2/sites-available/000-default.conf
    • Find “#ServerName www.example.com
    • Remove the # and change www.example.com to the hostname (See step #1)
    • Find “DocumentRoot /var/www/html” and put a forward slash on the end so it looks like this: DocumentRoot /var/www/html/
    1. CTRL+x ; Y ; Enter
  9. Edit hosts file

    1. ifconfig
    • Take note of your local IP address
    1. nano /etc/hosts
    • Under 127.0.0.1 localhost put in your local IP address and hostname so it looks like this (yours might be different):

      ```
      127.0.0.1 localhost
      10.0.0.4 LAMPServer
      ```
      
    1. CTRL+x ; Y ; Enter
  10. Edit apache2.conf file

  11. nano /etc/apache2/apache2.conf * Find:

    ```
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
    ```
    
* Change `AllowOverride` from `None` to `All`
  1. CTRL+x ; Y ; Enter
  2. Edit php.ini file
  3. nano /etc/php/7.0/apache2/php.ini * Under “[PHP];” * Add: register_globals=0; * Find memory_limit = 128M and change it to 32M * Find upload_max_filesize = 2M and change it to 24M * Find post_max_size = 8M and change it to 32M
  4. CTRL+x ; Y ; Enter
  5. Remove index.html
  6. rm /var/www/html/index.html
  7. Configure ChurchCRM (USE THIS VERSION!!!)
  8. wget https://github.com/ChurchCRM/CRM/releases/download/2.9.4/ChurchCRM-2.9.4.zip
  9. unzip ChurchCRM-2.9.4.zip
  10. rsync -av churchcrm/ /var/www/html/
  11. chown -R www-data:www-data /var/www/html
  12. chmod -R 755 /var/www/html
  13. RESTART the virtual machine
  14. On Azure
  15. Click Virtual Machines
  16. Click LAMPServer
  17. Click Networking
  18. Click Add inbound port rule * In the Service drop down select HTTP * Change the Name to HTTP_in and click OK
  19. Click Add outbound port rule * In the Service drop down select HTTP * Change the Name to HTTP_out and click OK
  20. Click Add outbound port rule * In the Service drop down select SMTP * Change the Name to SMTP25_out and click OK
  21. Click Add outbound port rule * In the Service drop down select Custom * Change the Port ranges to 587 * Change the Name to SMTP587_out and click OK
  22. In your browser
  23. Enter your public IP address in the URL bar * You should be greeted with ChurchCRM’s setup page
  24. Click Next
  25. Click Next
  26. Click Next
  27. Database Server Name: localhost
  28. Database Name: churchcrm
  29. user: churchcrm
  30. password: **** * Your MySQL password
  31. Click Finish
  32. On the login page
  33. Username: Admin
  34. Password: changeme
  35. Click Login
  36. Old Password: changeme
  37. New Password: ****
  38. Update to the latest version
  39. Click the Tasks icon in top right corner and click new release Task Menu Icon
  40. follow the prompts
Clone this wiki locally