- Install PHP 7.3
brew install [email protected]
- 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
- Install NodeJs
brew install nodejs
- Install Mysql 5.7
brew install [email protected]
- 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
- Start Mysql Server
brew services start [email protected]
- Download Symfony server
curl -sS https://get.symfony.com/cli/installer | bash
- Install Symfony Flex globally
composer global require symfony/flex --no-scripts
-
Restart the CLI terminal
-
"cd" to the folder where you are going to install an application
-
Clone training repository
git clone -b 4.1/training_step_1_bundle_extension https://github.com/oroinc/trainings oro-trainings
cd oro-trainings
- 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
- Make sure the right php version is used
symfony local:php:list
In the command output you should see 7.3.* highlighted
- 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";
- Install vendors
composer install
- 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;
-
While installation is running, let's configure the Symfony Server:
- Open proxy settings by following this guide https://support.apple.com/guide/mac-help/enter-proxy-server-settings-on-mac-mchlp2591/mac
- Set the following URL as the value of the Automatic Proxy Configuration: http://127.0.0.1:7080/proxy.pac
-
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
- Once installation is finished, open website in a browser
symfony open:local