Apple macOS 10.15 ships with both a recent version of Apache (2.4.x), as well as PHP (7.3.x), so you’ll just have to install MySQL and go through a few steps to get everything up and running.
Apache
First, you have to create a web root in your user account:
Then add a configuration for your user:
Now we have to make sure that our user config above actually gets loaded:
If you want to use vhosts, you’ll also have to make sure that the vhosts config gets loaded:
After that, configure vhosts as necessary in /etc/apache2/extra/httpd-vhosts.conf (don’t forget to remove the examples in there).
It seems that mod_rewrite no longer gets loaded by default, so we’ll also add that to our config:
PHP
PHP doesn’t get loaded by default. So we’ll also add it to our config:
You should also configure a few settings in /etc/php.ini:
To activate these settings you have to restart Apache:
MySQL is not shipped with macOS, so we’ll have to install that manually. Instead of going for an installer package, we’ll use Homebrew. Once Homebrew is installed, installing MySQL is as simple as:
If you want to start MySQL automatically, run:
Any comments? Ping me on Twitter. 👉🏻 Get my newsletter for occasional updates. ✌🏻
macOS no longer ships with PEAR, but installing it is quite easy. Once that’s done PEAR and PECL work as expected (if you also want to set up and install Apache, PHP and MySQL, check this post).
Installing PEAR
If that fails
autoconf may be missing. To install it just use Homebrew. Once Homebrew is installed, installing autoconf is as simple as:
After autoconf is installed, try running the pear installer above again.
Upgrade PEAR
Xcode Command Line Developer Tools
You will run into problems installing pecl extensions, if you don’t have the Xcode Command Line Extensions installed, so we’ll also install them.
Configuring PHP
Open /etc/php.ini and add .:/usr/local/lib/php/pear to include_path (if /etc/php.ini does not exist, create it with the following content).
Any comments? Ping me on Twitter. 👉🏻 Get my newsletter for occasional updates. ✌🏻
Older Ansible Tower versions don’t have cleanup tasks scheduled by default, which may lead to a very slow or even unusable Tower instance with lots of historic data. At that point it may not even be possible to schedule cleanup task and even if they are set up with lots of patience they may be so slow that they timeout. Luckily there’s a command line tool called awx-manage, but in my case even that failed as the cleanup tasks also timed out.
At that point the only remedy is to manually delete data in Tower. I managed to unstuck a Ansible Tower 2.1.4 instance as follows:
Run the Tower shell via awx-manage (ideally in a screen session, this may take a while):
Paste the following code into the shell to cleanup objects in the database:
This iterates through all Job objects up to record_id=200000 and deletes them. You may have a lot less or a lot more objects in your Tower database, so you might have to adjust the 200000 to something else. I also had to delete the UnifiedJob objects, so you also might have to run this:
This took several hours in my case, your mileage may vary. After this manual deletion went through the following awx-manage cleanup commands started working again for me:
Finally I restarted Ansible Tower and the webinterface was reasonably fast again. Hope it works for you, too!
Any comments? Ping me on Twitter. 👉🏻 Get my newsletter for occasional updates. ✌🏻
Apple macOS 10.14 ships with both a recent version of Apache (2.4.x), as well as PHP (7.1.x), so you’ll just have to install MySQL and go through a few steps to get everything up and running.
Apache
First, you have to create a web root in your user account:
Then add a configuration for your user:
Now we have to make sure that our user config above actually gets loaded:
If you want to use vhosts, you’ll also have to make sure that the vhosts config gets loaded:
After that, configure vhosts as necessary in /etc/apache2/extra/httpd-vhosts.conf (don’t forget to remove the examples in there).
It seems that mod_rewrite no longer gets loaded by default, so we’ll also add that to our config:
PHP
PHP doesn’t get loaded by default. So we’ll also add it to our config:
You should also configure a few settings in /etc/php.ini:
To activate these settings you have to restart Apache:
MySQL is not shipped with macOS, so we’ll have to install that manually. Instead of going for an installer package, we’ll use Homebrew. Once Homebrew is installed, installing MySQL is as simple as:
If you want to start MySQL automatically, run:
Any comments? Ping me on Twitter. 👉🏻 Get my newsletter for occasional updates. ✌🏻
macOS no longer ships with PEAR, but installing it is quite easy. Once that’s done PEAR and PECL work as expected (if you also want to set up and install Apache, PHP and MySQL, check this post).
Installing PEAR
If that fails
autoconf may be missing. To install it just use Homebrew. Once Homebrew is installed, installing autoconf is as simple as:
After autoconf is installed, try running the pear installer above again.
Upgrade PEAR
Xcode Command Line Developer Tools
You will run into problems installing pecl extensions, if you don’t have the Xcode Command Line Extensions installed, so we’ll also install them.
Configuring PHP
Open /etc/php.ini and add .:/usr/local/lib/php/pear to include_path (if /etc/php.ini does not exist, create it with the following content).
Any comments? Ping me on Twitter. 👉🏻 Get my newsletter for occasional updates. ✌🏻