-
Notifications
You must be signed in to change notification settings - Fork 448
Installing LAMP and ChurchCRM on Azure
Robert Spencer edited this page Jun 13, 2024
·
5 revisions
-
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 bash
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y autoremove
-
Configuring LAMP
apt-get -y install apache2
apt-get -y install mysql-server
- Enter MySQLPassword
- Confirm MySQLPassword
apt-get -y install php
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
-
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.conf
file- 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.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/
-
CTRL+x
;Y
;Enter
-
Edit hosts file
ifconfig
- Take note of your local IP address
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 ```
-
CTRL+x
;Y
;Enter
-
Edit
apache2.conf
file -
nano /etc/apache2/apache2.conf
* Find:``` <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> ```
* Change `AllowOverride` from `None` to `All`
-
CTRL+x
;Y
;Enter
- Edit
php.ini
file -
nano /etc/php/7.0/apache2/php.ini
* Under “[PHP];
” * Add:register_globals=0;
* Findmemory_limit = 128M
and change it to32M
* Findupload_max_filesize = 2M
and change it to24M
* Findpost_max_size = 8M
and 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.zip
unzip ChurchCRM-2.9.4.zip
rsync -av churchcrm/ /var/www/html/
chown -R www-data:www-data /var/www/html
chmod -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 toHTTP_in
and click OK - Click Add outbound port rule
* In the Service drop down select HTTP
* Change the Name to
HTTP_out
and click OK - Click Add outbound port rule
* In the Service drop down select
SMTP
* Change the Name toSMTP25_out
and click OK - Click Add outbound port rule
* In the Service drop down select
Custom
* Change the Port ranges to587
* Change the Name toSMTP587_out
and 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