Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
php:macos-installation [2021-10-28] dcaiphp:macos-installation [2021-10-31] (current) dcai
Line 1: Line 1:
 ===== PHP 7.4 macOS installation ===== ===== PHP 7.4 macOS installation =====
  
 +
 +==== install packages ====
 <code> <code>
 brew install php@7.4 nginx postgresql@12 brew install php@7.4 nginx postgresql@12
 # pecl install zip libsodium # pecl install zip libsodium
 # remove duplicated extension added in /usr/local/etc/php/7.4/php.ini # remove duplicated extension added in /usr/local/etc/php/7.4/php.ini
 +brew link php@7.4
 +brew link postgresql@12
 +</code>
 +
 +
 +==== setup postgres ====
 +<code>
 # init db # init db
 initdb -D /Users/dcai/.local/var/postgres12 initdb -D /Users/dcai/.local/var/postgres12
 # start db # start db
 postgres -D ~/.local/var/postgres12/ postgres -D ~/.local/var/postgres12/
-psql -U postgres +echo "ALTER USER postgres WITH PASSWORD 'postgres';" | psql -U postgres
-# run query below +
-ALTER USER postgres WITH PASSWORD 'xxxxx';+
 </code> </code>
  
php/macos-installation.1635426203.txt.gz · Last modified: by dcai