Skip to content

Instantly share code, notes, and snippets.

@Hailong
Created November 22, 2016 06:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Hailong/c705a490d6e1eb31f3402bb19286a16a to your computer and use it in GitHub Desktop.
Save Hailong/c705a490d6e1eb31f3402bb19286a16a to your computer and use it in GitHub Desktop.
Set up Mautic dev environment quickly.
#!/bin/bash
# 1. Check out the latest code from https://github.com/mautic/mautic
# 2. Run 'composer install' in the root directory as described in the README file.
# 3. Run the following script to set the folder permissions correctly. NOTE: change the "my_linux_account" and "web_daemon_account" properly according your sever.
my_linux_account="root"
web_daemon_account="apache"
touch app/config/local.php
echo "<?php" > app/config/local.php
echo "\$parameters = array();" >> app/config/local.php
sudo chown $web_daemon_account:$web_daemon_account app/config/local.php
sudo chown -R $my_linux_account:$web_daemon_account app/cache
chmod -R 775 app/cache
sudo chown -R $my_linux_account:$web_daemon_account app/logs
chmod -R 775 app/logs
mkdir app/spool
sudo chown $web_daemon_account:$web_daemon_account app/spool
sudo chown -R $my_linux_account:$web_daemon_account media
chmod -R 775 media
# 4. Go to browser and follow the page to finish configuration.
# 5. Restore the permission of some files that from the repository.
#git checkout -- media/.
#git checkout -- app/logs/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment