In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to install and configure PHP development environment with MAMP under Mac OSX". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
one。 A brief introduction:
PHP pages need to be processed by the Web server. Therefore, to develop in PHP, you need to access the Web server and MySQL database that support PHP. PhpMyAdmin is also very useful, it is the graphical interface of MySQL. These three components are open source software that can be used to develop, test, and deploy Web applications. And it's all free. Both the Apache Web server and PHP are pre-installed in Mac OS X. However, they are not enabled by default. Also, the pre-installed version of PHP lacks many practical features, and you need to install and configure MySQL separately. Unless you can easily use the command line in Terminal, it is much easier to install the all-in-one solution MAMP. This section describes how to install MAMP on Mac. The Apache Web server, MySQL, and phpMyAdmin will be installed in one operation.
two。 Tools / raw materials
(1) MAMP (Macintosh, Apache, MySQL, PHP) download address is an application that allows you to set up a server locally, the MAMP file size is about 245MB, initialize MAMP like other software, load and run MAMP, ignore the MAMP PRO version, and continue to use the free version of MAMP.
Click Preferences, select Ports, and click the port recommended by Set Apache & MySQL ports to 80 & 3306 to replace the default value.
Next, click Web Server/Apache, and select the location where you want to install. The default location is Macintosh HD/Applications/MAMP/htdocs. Similar to Public_html in the web hosting server folder (the default path can be modified by yourself).
(2) Mac OS X
(3) ThinkPHP
three。 Steps:
1. Open "system preferences" and select "share"
Make sure [Internet sharing] is turned off.
You can continue as long as MySQL has never been installed on the system.
two。 Download the latest version of MAMP
3. Press continue installation after download
4. Drag the MAMP file to Applications
5. Find MAMP in the application, find the htdocs file and create a new file in this directory:
6. Create a MySQ database: create a new database through phpMyAdmin
(1) Open MAMP and click Start Servers (you may need to enter the user name and password of mac), and use the browser to access http://localhost/phpmyadmin. The following interface will appear to create a new database.
7. After unpacking the downloaded ThinkPHP framework, import the ThinkPHP framework directly into the School folder established in the above steps, and create a new index.php file.
After that, typing http://localhost:8888/School on the browser will display the following information:
If you can see the smiley face that the connection is successful, the following files will be automatically generated in the School file (the files in the red box are created by myself, not automatically:
When you're done here, you're ready for PHP development.
There may be all kinds of mistakes in the middle: but please go on, knowledge is accumulated little by little, encounter wrong ideas to solve, slowly you will find a lot of progress.
MAMP: set up Apache, MySQL, PHP environment in OSX and install and debug WordPress locally
The name MAMP comes from Macintosh Apache MySQL PHP and is obviously specifically used to build Apache, MySQL, and PHP platforms in Mac environments.
Although Apache 1.3.x and PHP 4.3.2 environments are pre-installed in OSX, enabling, configuring, and installing integrated MySQL is still an extremely complex task. MAMP is characterized by its simplicity (as can be seen from the following installation steps), and it does not destroy the files of the system itself, and the scope of files to be modified and created is limited to the program itself.
System requirements: Mac OS X 10.4 (Tiger) or above (MAMP 1.4.1 can be installed for 10.3 Panther users)
Installation steps:
Download the latest version from the official website.
Open the dmg file and drag MAMP to the Applications folder (note: MAMP must be in the Applications folder to work properly).
Set MAMP
Open MAMP (not MAMP Pro), select the Preferences tab, and you will see the setting of the port (Ports). The default Apache port is 8888, which means you need to access it through http://localhost:8888/ if you don't modify it. You can also change it to something else (for example, if you change it to 80, you don't have to enter the following part), but the disadvantage is that you need to enter your password every time.
Select PHP version 5.2.4 or above in the PHP tab (minimum requirement for WordPress 3.2).
In the Apache tab, select the location of the file, which can be modified at will. For example, my setting is:
/ Users/renfei/Documents/localhost
Click OK to complete the setting.
Open the MAMP service and create the database
Click Start Servers, wait a moment, and find that the red light turns to green, indicating that the service has been enabled successfully.
When turned on, the start page of MAMP should automatically appear (if not, click the Open Start Page button.
Select phpMyAdmin in the open page, and then select the "Database" tab. Give your database a name in "New Database" (for example, I use wordpress), fill it out and click "New" directly.
Install WordPress
Download WordPress.
After downloading, unzip it and put the wordpress folder in the previously set file location. According to my settings, the files are all in / Users/renfei/Documents/localhost/wordpress
Visit localhost (localhost:8888/wordpress, as I set it) and start the familiar WordPress installation process.
The relevant contents should be filled in as follows:
Database name: wordpressdatabase host/server: localhostdatabase user: rootdatabase password: root
At this point, the installation process is complete, and you can use WordPress on this machine.
This is the end of the content of "how to install and configure PHP development environment with MAMP under Mac OSX". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.