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:
mkdir ~/Sites
Then add a configuration for your user:
sudo tee /etc/apache2/users/$USER.conf <<EOF
<Directory "$HOME/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EOF
Now we have to make sure that our user config above actually gets loaded:
sudo tee-a /etc/apache2/other/$USER-settings.conf <<EOF
Include /private/etc/apache2/users/*.conf
EOF
If you want to use vhosts, you’ll also have to make sure that the vhosts config gets loaded:
sudo tee-a /etc/apache2/other/$USER-settings.conf <<EOF
Include /private/etc/apache2/extra/httpd-vhosts.conf
EOF
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:
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:
brew install mysql
If you want to start MySQL automatically, run:
brew services start mysql
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).
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):
sudo awx-manage shell_plus
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:
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:
mkdir ~/Sites
Then add a configuration for your user:
sudo tee /etc/apache2/users/$USER.conf <<EOF
<Directory "$HOME/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EOF
Now we have to make sure that our user config above actually gets loaded:
sudo tee-a /etc/apache2/other/$USER-settings.conf <<EOF
Include /private/etc/apache2/users/*.conf
EOF
If you want to use vhosts, you’ll also have to make sure that the vhosts config gets loaded:
sudo tee-a /etc/apache2/other/$USER-settings.conf <<EOF
Include /private/etc/apache2/extra/httpd-vhosts.conf
EOF
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:
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:
brew install mysql
If you want to start MySQL automatically, run:
brew services start mysql
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).