Installing Apache Tomcat 6 on Mac OS X is primarily a matter of downloading the appropriate packages and then following the UNIX installation instructions included with the package. However, OS X does have some peculiarities that make installation somewhat different than on your average UNIX box. In order to Install Apache Tomcat version 8.x.x (Supports Servlet 3.1 specifications) on your Mac OS X (macOS) running Yosemite OS 10.10.x you must have java version 7 or later installed on your Mac. How to check your java version installed: Go to Terminal. Run command: java -version. If it is less than 1.8, download and install java8.
If you want to run a server on your macOS Catalina, or you recently updated to Catalina, you might need to re-configure your system, follow the below instructions.
Zip For Mac Catalina Download Eclipse Oxygen For Mac Mojave Install R For Mac Yosemite The Best Gameboy Advance Emulator For Macos Hp Laserjet P1102w Driver For Mac Yosemite Best Font Manager For Mac Yosemite Scanpotter For Mac Os Catalina Canon Utilities For Mac El Capitan Adobe Photoshop Amtlib.framework For Macos.
Updates
For macOS Big Sur (11.0.x) setup guide, please check out Setting Up Your Local Web Server on macOS Big Sur 11.0.1 (2020)| MAMP | macOS, Apache, MySQL, PHP
Start the Apache Server
You can start off the built-in Apache server by following the below steps.
Open Terminal from your Application folder or type “Terminal” in the Spotlight Search.
Type sudo apachectl start
and press enter.
Open any of your favorite browser.
Type localhost
or 127.0.0.1
in the address bar
If Apache server is started, you should see the below:
Create Sites
directory
Let’s create a Sites
directory under username
folder (username is your mac login name) This directory is going to be the document root.
1. Go to Mac HDD
> Users
> [your account folder]
2. Create folder with the name Sites
. When the folder is created, it will generate a folder with compass image on the folder.
Create username.conf
file
To be able to recognize the files putting into Sites directory, username.conf needed to be setup. This is going to be your document root.
Type whoami
and press enter. Note down the name. (that is your account name / username)
Create a username.conf file based on the account name showed up when you type whoami
. e.g. If your username is developer
the filename will be developer.conf
.
Type cd /etc/apache2/users
and press enter.
Type ls
and press enter. Check if there is existing username.conf
(username is your account name)
If there is an existing username.conf, make a backup copy by typing sudo cp username.conf username.conf.bakup
.
Type sudo nano username.conf
and press enter. Note: “username” will be your account name. e.g. developer.conf
.
Copy and paste the following configuration.
Press Control+o
and press enter to save the file.
Press Control+x
to exit the nano editor
Configure the httpd.conf
file
Open Terminal from your Application folder or type “Terminal” in the Spotlight Search.
Type cd /etc/apache2
and press enter.
Type sudo cp httpd.conf httpd.conf.bak
and press enter. (This step is optional if you want to keep the copy of original config file)
Type sudo nano /etc/apache2/httpd.conf
and press enter.
(httpd.conf file will be opened in terminal’s editor. – in this case nano editor)
Install Apache On Mac Catalina Download
Press Control+w
and type LoadModule authz_core_module
and press enter. Uncomment the following modules. #
means it is commented out. Remove the #
in front of each module. If you cannot find the module, use the Control+w
and type in the module name you are searching for.
Uncomment the following line for the User home directories.
Replace the below two lines with your username document root. (You can comment those two lines by putting #
in front of them.
Replace with the following:
Note: USERNAME needs be replaced with your username (e.g. developer)
Press Control+w
and type AllowOverride None
.
Replace AllowOverride None
to AllowOverride All
Your DocumentRoot
configuration in httpd.conf
will look like below:
Press Control+o
and press enter to save the file.
Press Control+x
to exit the nano editor.
Configure the httpd-userdir.conf
file
Type cd /etc/apache2/extra
and press enter.
Type sudo cp httpd-userdir.conf httpd-userdir.conf.bakup
and press enter. (This step is optional if you want to keep the copy of original config file)
Type sudo nano httpd-userdir.conf
and press enter.
Uncomment the following line.
Press Control+o
and press enter to save the file.
Press Control+x
to exit the nano editor.
Type sudo apachectl restart
. To take effect all the changes made in the Apache config file.
Enable the PHP
Mac has built-in PHP. You just need to enable the PHP from the Apache’s config file. Follow the below steps.
1. Open Terminal from your Application folder or type “Terminal” in the Spotlight Search.
2. Type cd /etc/apache2
and press enter.
3. Type sudo nano /etc/apache2/httpd.conf
and press enter.
(httpd.conf file will be opened in terminal’s editor. – in this case nano editor)
4. Press Control+w
to bring up a search option.
5. Search for php
and press enter.
You will see the following:
#
means, the line is commented out.
6. Remove the #
in front of LoadModule php7_module libexec/apache2/libphp7.so
7. Press Control+o
and press enter to save the file.
8. Press Control+x
to exit the nano editor
9. Type sudo apachectl restart
. To take effect all the changes made in the Apache config file.
Create a phpinfo()
page
To try out PHP is working on your system, create a phpinfo() file and load it on the browser.
Open Terminal from your Application folder or type “Terminal” in the Spotlight Search.
Type cd ~/Sites/
and press enter.
Type sudo nano phpinfo.php
and press enter. To create a phpinfo.php file. And it will bring you to nano editor within Terminal.
Put the following code:
Press Control+o
and press enter to save the file.
Press Control+x
to exit the nano editor.
Go to browser and type the following in the address bar.
You should see a page below if the PHP module is successfully activated.
Setting up the MySQL Server
Go to https://dev.mysql.com/downloads/mysql/
Download the DMG installer.
Double click the installer and follow the installation steps in the wizard.
Once the installation is complete, you should have the MySQL icon in the System Preferences.
You can stop and start the MySQL server.
References
Thank you to following articles. I used the below articles as a reference.
Latest Posts
macOS Catalina is slightly outdated since the release of macOS Big Sur in November of 2020. Nevertheless, many users prefer to stick with it because it's much more familiar visually. And it offers a bunch of expanded features, such as a screen extension with an iPad or the new Apple Podcasts app.
The problem is that it might not always work as intended. Glitches in macOS Catalina are commonplace: in fact, all existing operating systems like Mojave or High Sierra could freeze and crash from time to time. No software is immune.
But what do you do in this case? The surefire way to deal with jaded performance is to reinstall macOS Catalina altogether. Read through our guide below to learn how.
How To Reinstall Mac OS Catalina
It’s important to note that when you reinstall macOS Catalina the process simply updates the operating system and doesn’t affect any files on your hard drive or user files or even settings. That makes reinstalling principally different from performing a clean install, which erases everything.
Here are the proper steps to follow to reinstall mac OS Catalina.
1. Back up your Mac first
By default, the best thing you could do before making any significant changes to how your Mac works is to back it up. Backups are just like saves before encountering challenges in video games — represent the point you can always come back to.
There are lots of great backup solutions on the market to suit every need. If you don’t have the time to search for something specific, your Mac features a decent native option — Time Machine.
To get Time Machine started:
- Connect an external USB or WiFi hard drive to your Mac
- Go System Preferences ➙ Time Machine
- Click on Select Backup Disk…
- Press Use Disk
2. Delete junk off your Mac to speed it up
There’s nothing better than the feeling of a brand new Mac with a brand new macOS. If only the latter is new, the experience could be subpar. Trying to get the most out of macOS Catalina on your older machine might be a challenge. But don’t hurry to your local Apple Store just yet — not all is lost.
Just like the dust behind your couch or on the top of your kitchen cupboards, small bits of system files, caches, and hidden libraries tend to aggregate over the years and never get deleted, eventually slowing down everyday processes. While it’s possible to clear out some of them manually, others require specific technical knowledge and lots of time.
Luckily, there’s a professional automatic solution available — CleanMyMac X. Optimizing behind-the-curtain processes on your Mac with CleanMyMac X is no more difficult than clicking a single button:
- Download a free version of CleanMyMac X.
- Open the app and navigate to System Junk in the left-side panel.
- Click Scan and wait for the process to complete.
- When done, press Review Details.
- Uncheck anything you’d like to keep and click Clean.
Now your Mac is free of all the pointless log files, user caches, language files, old updates, and more. Which directly translates into improved processing power, memory usage, and response time. At last, your Mac is ready to take full advantage of macOS Catalina.
3. Reinstall macOS Catalina in Recovery Mode
With your Mac in top shape, it’s time to get that macOS Catalina download link. Surprisingly, you won’t find it in Software Update or even App Store (where it used to be in macOS High Sierra).
How To Install Apache On Macos Catalina
The correct way to reinstall macOS Catalina is to use your Mac’s Recovery Mode:
- Restart your Mac and then hold down ⌘ + R to activate Recovery Mode.
- In the first window, select Reinstall macOS ➙ Continue.
- Agree to the Terms & Conditions.
- Select the hard drive you’d like to reinstall mac OS Catalina to and click Install.
Automatically update all your software for Catalina
The reinstallation process will start shortly and roughly take 30 minutes. When complete, your Mac will start up as usual. No files should be lost, but it’s always a good idea to check CleanMyMac X’s Applications Updater to see if you can improve compatibility of the new macOS with any of your existing apps:
- Launch CleanMyMac X.
- In the left-side panel, navigate to Updater.
- View any available updates and their notes and click on Update.
This Updater tool in CleanMyMac X automatically searches for latest available versions of ALL your apps. One or two clicks and everything feels fresh. It even updates the macOS file itself.
Install Apache On Mac Catalina Update
Trust in your backup
Install Apache On Mac Catalina Free
Finally, in case you notice any files or apps missing, or settings misconfigured, you could open up Time Machine to restore a specific folder or the whole backup from the step one:
Install Apache On Mac Catalina Os
- Launch Time Machine from Applications.
- Simply scroll all backup versions to find the file you’re looking for.
- Click Restore.
Install Apache Mysql Php On Macos Catalina 10.15
If you decide to restore the whole backup, make sure to then repeat the whole process to optimize your Mac and reinstall macOS Catalina as detailed above. The good thing is that more often than not the reinstallation works wonders right from the first time.