Project Michael Dings Impressum Login

Dings-Mac-Book-Install-Howto

I am a Howto, that describes how a Mac-Book should be installed.

Install Bash

$ chsh -s /bin/bash

Windows-Keyboard

Install Windows-Keyboard-Layout with Mac-Win-Germany-Keyboard, then go to “Sondertasten” and exchange “Control” with “Command”.

Homebrew

Install Homebrew to /opt/homebrew/bin.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Additional Packages

$ brew install pandoc imagemagick exiftool vim php poppler

Install SSH-Keys

$ cp id_rsa* ~/.ssh

Clone All-Dings

$ mkdir All-Dings && cd All-Dings
$ git clone git@github.com:All-Dings/111.git

Configure Bash

$ cp 14.bashrc  ~/.bashrc

Configure Vim

$ cp 13.vimrc ~/.vimrc

Pcloud-Drive

Python-Packages

$ sudo apt-get install ffmpeg libsm6 libxext6  -y
$ pip3 install pytz tzlocal numpy matplotlib bitmath opencv-python pcloud exif pyexiftool mutagen pypandoc pdf2image requests pytesseract

Install Llama

Install Apache

Stop the Apache Server: Open your terminal and type the following command to stop the Apache server:

$ sudo apachectl stop

Disable the original shipped Apache Server: To disable the server from starting up automatically, use the following command:

$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

Remove old Config-File:

$ sudo mv /etc/apache2/httpd.conf /etc/apache2/httpd.conf.orig

Install Apache from Homebrew:

$ brew install httpd

Start new Apache:

$ sudo brew services start httpd

Edit config File:

$ vi /opt/homebrew/etc/httpd/httpd.conf
michaelholzheu:~/All-Dings/tmp$ diff -Nau httpd.conf.orig httpd.conf
--- httpd.conf.orig 2024-01-01 13:51:33
+++ httpd.conf  2024-01-01 14:37:33
@@ -49,7 +49,7 @@
 # prevent Apache from glomming onto all bound IP addresses.
 #
 #Listen 12.34.56.78:80
-Listen 8080
+Listen 80
 
 #
 # Dynamic Shared Object (DSO) Support
@@ -178,8 +178,14 @@
 #LoadModule speling_module lib/httpd/modules/mod_speling.so
 #LoadModule userdir_module lib/httpd/modules/mod_userdir.so
 LoadModule alias_module lib/httpd/modules/mod_alias.so
-#LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
+LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
 
+# Enable Php
+LoadModule php_module /opt/homebrew//lib/httpd/modules/libphp.so
+<FilesMatch \.php$>
+    SetHandler application/x-httpd-php
+</FilesMatch>
+
 <IfModule unixd_module>
 #
 # If you wish httpd to run as a different user or group, you must run
@@ -189,8 +195,8 @@
 # It is usually good practice to create a dedicated user and group for
 # running httpd, as with most system services.
 #
-User _www
-Group _www
+User michaelholzheu
+Group staff
 
 </IfModule>
 
@@ -244,8 +250,8 @@
 # documents. By default, all requests are taken from this directory, but
 # symbolic links and aliases may be used to point to other locations.
 #
-DocumentRoot "/opt/homebrew/var/www"
-<Directory "/opt/homebrew/var/www">
+DocumentRoot "/Users/michaelholzheu/All-Dings/111/Day-Current"
+<Directory "/Users/michaelholzheu/All-Dings/111/Day-Current">
     #
     # Possible values for the Options directive are "None", "All",
     # or any combination of:
@@ -265,7 +271,7 @@
     # It can be "All", "None", or any combination of the keywords:
     #   AllowOverride FileInfo AuthConfig Limit
     #
-    AllowOverride None
+    AllowOverride All
 
     #
     # Controls who can get stuff from this server.

Restart new Apache:

$ sudo brew services restart httpd

Log-Files: /opt/homebrew/var/log/httpd/