Saturday 5 January 2019

Instalasi : Mac OS

Status : Draft


brew install --cask mactex

Jika koneksi lambat, disarankan mendownload paket MacTex melalui torrent.

brew install python3
brew install --cask  phantomjs
brew install imagemagick
brew install cairo
brew install p7zip
sudo easy_install pip

cd banksoal/
pip install -r requirements.txt
pip3 install -r requirements.txt


install PIL 1.1.7 [2]
install pdftk [3]
install pgAdmin [4]

pecl install imagick-3.4.4 [5]


PHP-FPM

Jika Anda mendaptkan error, seperti berikut ketika proses konversi Latex ke Image di browser :

convert: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r360x360' '-sOutputFile=/var/tmp/magick-424wzOPTYa4oUUs%d' '-f/var/tmp/magick-424b_MRRkTxfwQT' '-f/var/tmp/magick-4247LVcZCDEEICo'' (1) @ error/pdf.c/InvokePDFDelegate/290.

Maka tambahkan konfigurasi berikut di /usr/local/etc/php/7.1/php-fpm.d/www.conf (sesuaikan dengan versi PHP yang And gunakan) :

env[PATH] = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Elasticsearch


Untuk memastikan konfigurasi Elasticsearch sudah benar, jalankan perintah berikut :

supervisord -c  /usr/local/etc/supervisord.ini

Referensi 


  1. MacTex, http://www.tug.org/mactex/mactex-download.html
  2. PIL 1.1.7, http://www.pythonware.com/products/pil/#pil117
  3. pdftk, https://www.pdflabs.com/tools/pdftk-server/
  4. pgAdmin, https://www.pgadmin.org/download/
  5. Fix `ld: library not found for -lgomp` when installing Imagick 3.5 via PHP pecl on Mac, https://dev.to/andreaolivato/fix-ld-library-not-found-for-lgomp-when-installing-imagick-3-5-via-php-pecl-on-mac-488n