Skip to content

Instantly share code, notes, and snippets.

@anyt
Last active September 21, 2020 14:11
Show Gist options
  • Save anyt/a8639d9b4fc42b40224f58a32788216c to your computer and use it in GitHub Desktop.
Save anyt/a8639d9b4fc42b40224f58a32788216c to your computer and use it in GitHub Desktop.
  1. Install PHP 7.3
brew install [email protected] 
  1. Run commands from the above command output. In my environment there are two of them after this phrase:

If you need to have [email protected] first in your PATH run:

    echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
    echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc
  1. Install NodeJs
brew install nodejs
  1. Install Mysql 5.7
brew install [email protected]
  1. Run command from the above command output. In my environment it's:

If you need to have [email protected] first in your PATH run:

    echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
  1. Start Mysql Server
brew services start [email protected]
  1. Download Symfony server
curl -sS https://get.symfony.com/cli/installer | bash
  1. Install Symfony Flex globally
composer global require symfony/flex --no-scripts
  1. Restart the CLI terminal

  2. "cd" to the folder where you are going to install an application

  3. Clone training repository

git clone -b 4.1/training_step_1_bundle_extension https://github.com/oroinc/trainings oro-trainings
cd oro-trainings
  1. configure PHP for the project
echo 7.3 > .php-version
echo "memory_limit = 2048M \nmax_input_time = 600 \nrealpath_cache_size=4096K \nrealpath_cache_ttl=600 \nopcache.enable=1 \nopcache.enable_cli=0 \nopcache.memory_consumption=512 \nopcache.interned_strings_buffer=32 \nopcache.max_accelerated_files=32531 \nopcache.save_comments=1" > php.ini
  1. Make sure the right php version is used
symfony local:php:list

In the command output you should see 7.3.* highlighted

  1. Configure database connection parameters and create an empty database
cp config/parameters.yml.dist config/parameters.yml

DB_NAME=oro_trainings
sed -i "" "s/database_user"\:".*/database_user"\:" root/g" ./config/parameters.yml
sed -i "" "s/database_password"\:".*/database_password"\:" null/g" ./config/parameters.yml
sed -i "" "s/database_driver"\:".*/database_driver"\:" pdo_mysql/g" ./config/parameters.yml
sed -i "" "s/database_name"\:".*/database_name"\:" ${DB_NAME}/g" ./config/parameters.yml

mysql -u root  -Bse "DROP DATABASE IF EXISTS $DB_NAME; CREATE DATABASE $DB_NAME";
  1. Install vendors
composer install
  1. Install an application
time symfony console oro:install -vvv  \
--sample-data=y  \
--application-url=https://oro-trainings.wip  \
--user-name=admin  \
[email protected]  \
--user-firstname=John  \
--user-lastname=Doe  \
--user-password=admin  \
--organization-name=Oro \
--timeout=0 --symlink -n;
  1. While installation is running, let's configure the Symfony Server:

  2. Install SSL sertificate, start proxy server, attach the domain to the Symfony Server and start it

symfony local:server:ca:install
symfony local:proxy:start
symfony local:proxy:domain:attach oro-trainings
symfony server:start -d
  1. Once installation is finished, open website in a browser
symfony open:local

Tada 🎉!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment