Download Mamp Mac Os X 10.5.8
A few weeks ago, The Rocket Yard ran an article detailingthe many services that will be removed from macOS Server in the nigh future. Today, I'll discuss how to bring back one of those services — web hosting — using both the Apache web server that is built into macOS and the full MAMP suite.
Apache Web Server
About Mac users don't realize information technology, simply macOS comes with its own built-in web server. Apache is an open-source web server that has been bachelor since 1995, and every bit of 2016, it was the engine backside 46% of all websites and 43% of the acme million websites in terms of traffic.
Having a web server built into macOS is perfect for those who want to share information in a pocket-sized workgroup or ready up and examination sites on a development web server before deploying them to an internet server. These instructions show yous how to set up Apache server in macOS Loftier Sierra. You lot'll demand to have some cognition of the Terminal app and how to run command line programs, an understanding of web servers, and a familiarity with the six editor.
To brainstorm, we edit the Apache configuration file as root:
sudo 6 /etc/apache2/httpd.conf
A web server is relatively useless without a server-side scripting language with which to handle interactions; the most pop languages are PHP, Perl, and Python. In this example, we'll enable PHP and Perl. To do and then, you'll need to uncomment line 176 of the configuration file. In the six editor, you tin practise this easily past typing 176G to go straight to line 176. Next, type an ten over the # at the beginning of the following line to delete the # comment marker:
#LoadModule php7_module libexec/apache2/libphp7.so
Nosotros want to do the aforementioned to be able to run Perl scripts, which is in line 177 of the configuration file. Employ your arrow cardinal to get down to the beginning of the adjacent line, then type the x over the # to delete the comment marker. The configuration file should then looks something similar this around line 176 (see screenshot below):
To save your changes in the editor, blazon :westward!
We however need to enable personal websites by uncommenting line 173, so blazon 173G and press return, then blazon an xover the # to delete information technology. The same must be washed with line 513 of the file — type 513G and press render, and then type an x over the # to delete information technology. Now we'll save these two concluding changes and quit the editor by typing ZZ.
The last command just enabled a file named http-userdir.conf, and nosotros now demand to edit it: In Terminal, enter:
sudo 6 /etc/apache2/extra/httpd-userdir.conf
In this configuration file, we demand to uncomment line 16. Type 16G and press return, then type an x over the # to delete it. Save and exit past typing 16G.
Up until Mac Bone X Lion, it was possible to share websites with a local workgroup and create personal websites with a click; to publish web pages, you simply put your html files into a Sites folder. Now we have to exercise a lot more piece of work. Let's manually create a Sites folder in Terminal and make a small-scale test file then we know our web server is working.
Enter the following commands:
mkdir ~/Sites
echo "<html><body><h1>Welcome to my site</h1></body></html>" > ~/Sites/index.html.en
Adjacent, we need to make sure that we accept a user configuration file. To create i, type in
sudo vi /etc/apache2/users/<your short user name>.conf
Where <your short user proper name> is your Unix short user name. Don't know what that name is? Look at the tiptop of the Last window and y'all'll see a name listed — that'south the short user name. In my case, information technology'due south stevensande, so I'd enter
sudo vi/etc/apache2/users/stevensande.conf (don't use this for YOUR configuration file!)
In that configuration file we want to enter the following (cut and pasting into half dozen works):
<Directory "/Users/<your curt user proper noun>/Sites/">
AddLanguage en .en
AddHandler perl-script .pl
PerlHandler ModPerl::Registry
Options Indexes MultiViews FollowSymLinks ExecCGI
AllowOverride None
Require host localhost
</Directory>
Once again, think to supercede <your short user name> with your brusque user proper noun. Type ZZ to save the new configuration file and quit the editor.
If you've made it this far… congratulations! Now let'southward check our configuration of Apache by running the following command in Terminal:
apachectl configtest
You'll probably go a alert message that says "http: Could not reliably determine the server's full qualified domain name" along with how to resolve that issue; since this is just for a local web server, ignore that warning — what you do want to see is the terminal line: Syntax OK.
If everything is fine up to this point, you're ready to beginning upwards Apache. If any of the configuration file syntax is incorrect, you'll receive warnings on what needs to be stock-still.
At long last, we're set up to launch the Apache httpd service:
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
To see our ane line web page, launch Safari or your favorite browser and enterhttp://localhost/
You should encounter:
It works!
To run across your user home directory, enter http://localhost/~<your short user name>, one time once more replacing <your short user name> with your Unix brusk user name. Information technology should say:
Welcome to my site
Should you decide to close down the Apache service, at that place's a elementary ane-line Terminal control to do so:
sudo /usr/sbin/apachectl stop
Making life easier with MAMP
That was a lot of work to go things up and running, wasn't information technology? At that place's a much easier way to gear up upwards a local test server! For quite a while, developers accept realized that packaging Apache, MySQL (a database server), and PHP/Python/Perl was the best way to get a very powerful web server. Add "Mac" to the offset of this, and you have MAMP — Mac, Apache, MySQL, and PHP/Python/Perl. The "AMP" distributions (LAMP for Linux, WAMP for Windows, MAMP for Mac) are the backbone of the wildly popular WordPress platform, so if you desire a very complete WordPress development environment on your Mac, you lot've come to the right place.
MAMP comes in 2 varieties; the free MAMP solution for a personal web server and MAMP Pro ($59), which adds additional services like email, dynamic DNS, and more. For this post, we'll install and configure the free MAMP.
1)Download MAMP from the MAMP website
2) Open the .pkg file and follow the installation instructions to install MAMP to your Mac
3) One time the installation is complete, you'll find two folders in your Applications binder — one for MAMP, and another that is a fourteen-solar day gratis trial for MAMP Pro. Open up the binder named MAMP and launch the MAMP app. You'll see something that looks like this screenshot:
4) Click the "Outset Servers" push button.
MAMP will start both the Apache and MySQL servers, then launches a webpage that confirms that your MAMP installation is complete (encounter screenshot below):
The "My Website" link shows an empty page, but you tin can alter that by placing an alphabetize.html file into the htdocs folder plant in the MAMP folder. It's easy to alter the Document Root directory by going to MAMP > Preferences > Web Server.
Notation that MAMP Pro also brings "Extras" to the table; these are packages designed by the MAMP team to install rapidly and bring added functionality. Recall my comments about WordPress? There is not simply a MAMP Extra for WordPress, only for Joomla, Drupal and other content direction systems besides.
Download Mamp Mac Os X 10.5.8
Posted by: delgadoprippir.blogspot.com

0 Komentar
Post a Comment