Installing LAMP and ChurchCRM on Azure
-
On Azure
- Click Virtual Machines
- Click Create Virtual Machines
- Select Ubuntu Server
- 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
- Click Virtual Machines
- Click LAMPServer
- Take note of the Public IP address
-
Download and install an SSH client (I am using PuTTY)
- Enter the Public IP address under “Host Name (or IP address)”
- Click Open
- Click Yes on the prompt (First time only) and a terminal window will open
-
Login
- username: lamp
- Password: ****
-
Updates
sudo bashapt-get updateapt-get -y upgradeapt-get -y dist-upgradeapt-get -y autoremove
-
Configuring LAMP
apt-get -y install apache2apt-get -y install mysql-server- Enter MySQLPassword
- Confirm MySQLPassword
apt-get -y install phpapt-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
-
Allow custom URLs
a2enmod rewrite
-
Create a database
mysql -u root -p- Enter MySQLPassword
CREATE DATABASE churchcrm;CREATE USER 'churchcrm'@'localhost' IDENTIFIED BY 'Put\_your\_database\_password\_here';GRANT ALL ON churchcrm.\* TO churchcrm@'localhost';exit;
-
Edit
000-default.conffile- Hostname
- Take note of your hostname
nano /etc/apache2/sites-available/000-default.conf
- Find “#ServerName www.example.com”
- Remove the # and change
www.example.comto 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/
CTRL+x;Y;Enter
-
Edit hosts file
ifconfig
- Take note of your local IP address
nano /etc/hosts
-
Under
127.0.0.1 localhostput in your local IP address and hostname so it looks like this (yours might be different):
## Related Pages
- [Prerequisites](How-to-Manually-Upgrade-ChurchCRM.md)
## Test the System Before Importing Real Data
- Test the system by importing demo data: [Importing Demo Data via Admin Pages](Importing-Demo-Data.md)
127.0.0.1 localhost
10.0.0.4 LAMPServer
CTRL+x;Y;Enter
-
Edit
apache2.conffile -
nano /etc/apache2/apache2.conf
-
Find:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory> -
Change
AllowOverridefromNonetoAll
CTRL+x;Y;Enter- Edit
php.inifile nano /etc/php/X.X/apache2/php.ini(replace X.X with your PHP version)
- Under "
[PHP];" - Add:
register_globals=0; - Find
memory_limit = 128Mand change it to32M - Find
upload_max_filesize = 2Mand change it to24M - Find
post_max_size = 8Mand change it to32M
CTRL+x;Y;Enter- Remove
index.html rm /var/www/html/index.html- Configure ChurchCRM (USE THIS VERSION!!!)
wget https://github.com/ChurchCRM/CRM/releases/download/2.9.4/ChurchCRM-2.9.4.zipunzip ChurchCRM-2.9.4.ziprsync -av churchcrm/ /var/www/html/chown -R www-data:www-data /var/www/htmlchmod -R 755 /var/www/html- RESTART the virtual machine
- On Azure
- Click Virtual Machines
- Click LAMPServer
- Click Networking
- Click Add inbound port rule
- In the Service drop down select
HTTP - Change the Name to
HTTP_inand click OK
- Click Add outbound port rule
- In the Service drop down select HTTP
- Change the Name to
HTTP_outand click OK
- Click Add outbound port rule
- In the Service drop down select
SMTP - Change the Name to
SMTP25_outand click OK
- Click Add outbound port rule
- In the Service drop down select
Custom - Change the Port ranges to
587 - Change the Name to
SMTP587_outand click OK
- In your browser
- Enter your public IP address in the URL bar
- You should be greeted with ChurchCRM’s setup page
- Click Next
- Click Next
- Click Next
- Database Server Name:
localhost - Database Name:
churchcrm - user:
churchcrm - password: ****
- Your MySQL password
- Click Finish
- On the login page
- Username:
Admin - Password:
changeme - Click Login
- Old Password:
changeme - New Password: ****
- Update to the latest version
- Click the Tasks icon in top right corner and click new release
- follow the prompts