Setting Up Laravel Development Environment On Fresh Install of MacOS High Sierra (13.1) with Laravel Valet, PHP, and Oracle (OCI8)
https://getcomposer.org/download/
Open Terminal, copy, paste, and run
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');
Make composer available globally
mv composer.phar /usr/local/bin/composer
Make sure the ~/.composer/vendor/bin
directory is in your system's "PATH".
nano ~/.bash_profile
Add export PATH="~/.composer/vendor/bin:$PATH"
In Terminal
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install mariadb
brew services start mariadb
Login (enter blank password)
mysql -u root -p
Set Password
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
Install Sequel Pro https://sequelpro.com and make sure you can connect:
Host: 127.0.0.1
Username: root
Password: MyNewPass
From https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
brew tap homebrew/php
brew update
brew install php71
sudo chown -R `whoami`:admin /usr/local/share
brew link php71
https://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
- Type 1 and press return.
- Enter:
/usr/local/pear
- Type 4 and press return.
- Enter:
/usr/local/bin
- Press return
To verify PEAR, you should be able to type: pear version
http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html https://gist.github.com/krisanalfa/09b765bb95012cd36fbd
Download:
- instantclient-basic-macos.x64-12.2.0.1.0.zip
- instantclient-sqlplus-macos.x64-12.2.0.1.0.zip
- instantclient-sdk-macos.x64-12.2.0.1.0.zip
Create and unzip all these files into a the directory ~/lib
sudo ln -s ~/lib/sdk/include/*.h /usr/local/include/
sudo ln -s ~/lib/sqlplus /usr/local/bin/
sudo ln -s ~/lib/*.dylib /usr/local/lib/
sudo ln -s ~/lib/*.dylib.12.1 /usr/local/lib/
sudo ln -s /usr/local/lib/libclntsh.dylib.12.1 /usr/local/lib/libclntsh.dylib
brew install autoconf
sudo pecl install oci8
At the prompt enter: instantclient,/usr/local/lib
Add the following line to your php.ini /usr/local/etc/php/7.1/php.ini
extension=oci8.so
Run php -m
to display loaded modules. Installation is successful if you see:
oci8
https://laravel.com/docs/5.5/valet
- Install Valet with Composer via
composer global require laravel/valet
. - Run the
valet install
command. This will configure and install Valet and DnsMasq, and register Valet's daemon to launch when your system starts.