AMP
- Win: @todo
- Mac: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
GIT
- Install https://git-scm.com/downloads
- Generate private key
- Win
- puttygen generate ppk with pass -> mykey.ppk
- puttygen save public key -> mykey.pub
- edit mykey.pub and make it one line like this:
ssh-rsa rgjbh432l5jh43telfjlwqkjherl34kjhtlkj54ht56lkj43rmfgn5klj56hlk36jh4lj4h6ktljhkl64jlkjfnlnlkj45ngkl3nlghj45lcjgmc342rkl2tjl45jhjkt54
- Mac / Linux
- mkdir ~/.ssh
- chmod 600 ~/.ssh
- generate mykey & mykey.pub into ~/.ssh :
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
- Win
- git server: cat mykey.pub >> /home/git/.ssh/authorized_keys
- Add private key to startup
- Win: run shell:startup create shortcut to mykey.ppk here – it will open with pageant
- Mac: echo “ssh-add -A 2>/dev/null;” >> ~/.bash_profile
- Win: environment var GIT_SSH = path\to\plink.exe (putty folder or winscp folder) – this enables PHPStorm to use pageant loaded key.
- term: git clone ssh://git@192.168.1.24:/git/cfo.git max-ba
- copy the following (non-git) from another installation and adjust to local env:
/common/config/*-local.php
/console/config/*-local.php
/backend/config/*-local.php
/backend/web/index*.php
/frontend/config/*-local.php
/frontend/web/index*.php
PHPSTORM – install
- settings – Git:
- Path to Git executable
- SSH executable: Native
Composer
- install
- Win> download etc
- Mac> brew install composer
- composer global require “fxp/composer-asset-plugin:^1.2.0” (atentie la ghilimele)
- /www/max-ba/site> [sudo] composer update
github token: 4b806c3a795bd3baa5b9d29f113957a88d66b915
Special environments
Production (app.max-ba.ro):
/frontend/web/index.php
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, FALSE);
defined(‘YII_ENV’) or define(‘YII_ENV’, ‘prod‘);
Staging (appstaging.max-ba.ro):
/frontend/web/index.php
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, FALSE);
defined(‘YII_ENV’) or define(‘YII_ENV’, ‘prod‘);
It must be FALSE & ‘prod’ (like production env) in order to catch bugs which happen only when it’s ‘prod’ (e.g. assets minify problems).
Categories: Tutoriale / Reguli / Best practices, Uncategorized |
Leave a Reply
[TOP]