This guide is continuously being updated, as reality demands updates. If you find any errors in this guide, please let us know.

This will guide you through installing the parentNode web stack on Mac OS or OS X.

The parentNode development environment is based on a full web stack based on Apache 2.4, MariaDB 10.5 and PHP 8.2, which enables you to run all the parentNode tools, as well as most PHP based frameworks and CMS', including WordPress, Joomla or TYPO3.

The environment also includes Redis cache and Imagick, and standalone versions of FFmpeg and wkhtmltopdf.

Since we are a small company and both wanted and needed a relatively advanced crossplatform develment environment, that is easy to install on Mac, Linux and Windows, our installer is fundamentally a set of shell scripts that perform all the necessary steps on your computer. You should know that while this is a achieving our internal goal, then this is also not a very safe way of creating installers. We circumvent most safety measures by installing as we do and this grants us the freedom to create a unique environment setup, that pleases our needs. Don't worry, it is a very well proven concept and you can easily read every bit of the code that is run on GitHub.

Prerequisites

Install the latest version of Xcode on your machine from the AppStore.

Download and install latest version of Macports from macports.org.

Open Xcode and accept the terms. If you don't accept the terms before running the installer, it will complain about it.

Installation of the web stack

Open terminal and run the following command:

bash <(curl -s https://parentnode.dk/installers/install-mac-stack.txt)

The setup script will guide you through the rest of the installation. Make sure you stay online during the setup process, which will take approximately 5-20 minutes, depending on your computer/internet connection.

Lean back. When the script states that the Setup is completed you are done. Congratulations. Enjoy the parentNode realm.

Optional further reading

What to expect from the installation process

As the first thing, you will be asked to enter your password. You have to enter your computer password. This allows the install script to copy the needed configuration files to your system.

The setup script then performs a number of system checks and tells you how to proceed if a missing requirement is found. Just run the setup command again, after fulfilling such a requirement, if any show up.

During database installation, a prompt about Java might appear. You don't need Java, so just click OK to continue the install process.

Towards the end of the installation, the script will ask you for your Git username and email. This information will be added to your global Git configuration, and allows for the underlying Git service to work seamlessly.

Finally you will be asked for a Database administrator (root) password. This ensures that the database content is well protected. You should make sure you can remember this password later.

You will only be asked to define root password for the database the first time you run the installer script.

If you want to know what the install scripts are doing you can read through the code in the open source repository on GitHub.

About the installer

The installer is a set of shell scripts.

It performs a number of system checks, among other things checking for Xcode command-line tools and whether you have accepted the Xcode terms or not.

It uses Macports to install the required external components. When installation is done, default configuration files are copied to your system and finally relevant services are restarted.

As default, the parentNode demo project is cloned to your new environment. After the script has finished, the demo project source code will be located in ~/Sites/parentnode/demo_parentnode_dk and the demo site can be accessed through a browser on http://demo.local. When you access the demo site for the first time, it has not been configured yet. Follow the setup guide by going to http://demo.local/janitor/admin/setup.

The script will add a special Git color scheme to your terminal prompt. It also adds a number of aliases to your .bash_profile, to provide you with a set of maintenance tools. These updates will come into effect after you restart terminal.

Bash commands

After installation you will also have the following commands available in your terminal:

Apache controller. This allows you to stop, start and restart the Apache HTTP server.

apache [stop|start|restart]

MariaDB/MySQL daemon controller. Allows you to stop and start the MariaDB server.

mysqld [stop|start]

MariaDB/MySQL SQL shell. Gives you a mysql prompt and direct access to MariaDB.

mysql

Git global status. This command iterates all git repositories in your /srv/sites (aka ~/Sites) folder.

git_status

Dump all mysql tables into file.

mysql_dump_all [filename]

Delete all .DS_Store files from current folder and subfolders. A .DS_Store file is a Mac specific file, which can be particularly annoying when sharing files with Windows users.

no_ds

Create a zip-archive from current folder, excluding .svn, .git or .DS_Store files.

zipit

Go to your sites folder. Just type sites, and you'll go there.

sites

Enable site. Adds project details to hosts-file and apache.conf – and restarts Apache. Read more in the post, Enable a site.

enable_site

Disable site. Removes project details from hosts-file and apache.conf – and restarts Apache. The opposite of enable_site.

disable_site