Skip to content

Installing LAMP and ChurchCRM on Azure

George Dawoud edited this page Jan 17, 2018 · 6 revisions

big thanks to @merkorios for this doc

  1. On Azure

  2. Click Virtual Machines

  3. Click Create Virtual Machines

  4. Select Ubuntu Server

  5. Select Ubuntu Server 17.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

  6. Click Virtual Machines

  7. Click LAMPServer - Take note of the Public IP address

  8. Download and install an SSH client (I am using PuTTY)

  9. Enter the Public IP address under "Host Name (or IP address)"

  10. Click Open

  11. Click Yes on the prompt (First time only) and a terminal window will open

  12. Login

  13. username: lamp

  14. Password: ****

  15. Updates

  16. sudo bash

  17. apt-get update

  18. apt-get -y upgrade

  19. apt-get -y dist-upgrade

  20. apt-get -y autoremove

  21. Configuring LAMP

  22. apt-get -y install apache2

  23. apt-get -y install mysql-server

  24. MySQLPassword

  25. MySQLRepeat password

  26. apt-get -y install php

  27. 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

  28. Allow custom URLs

  29. a2enmod rewrite

  30. Create a database

  31. mysql -u root -p

  32. MySQLPassword

  33. CREATE DATABASE churchcrm;

  34. CREATE USER 'churchcrm'@'localhost' IDENTIFIED BY 'Put_your_database_password_here';

  35. GRANT ALL ON churchcrm.* TO churchcrm@'localhost';

  36. Exit

  37. Edit 000-default.conf file

  38. Hostname - Take note of your hostname

  39. nano /etc/apache2/sites-available/000-default.conf - Find "#ServerName www.example.com" - Remove the # and change www.example.com to the hostname - Find "DocumentRoot /var/www/html" and put a forward slash on the end so it looks like this: DocumentRoot /var/www/html/

  40. CTRL+x ; Y ; Enter

  41. Edit hosts file

  42. ifconfig - Take note of your local IP address

  43. 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

  2. Edit apache2.conf file

  3. nano /etc/apache2/apache2.conf - Find:

<Directory /var/www/>

    Options Indexes FollowSymLinks

    AllowOverride None

    Require all granted

</Directory>

- Change AllowOverride 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 gear icon in top right corner and click new release

  40. follow the prompts

Clone this wiki locally