In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
How to install php7 in macbook pro, aiming at this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Macbook pro install php7 method: 1, install Homebrew;2, through brew to install PHP7, execute commands such as "$brew install php70"; 3, configure Apache;4, restart Apache.
This article operating environment: macOS10.15 system, php7 version, macbook pro 2020 computer
How does macbook pro install php7?
Mac installation PHP7:
After a long wait, after our PHP5.6 release, our latest PHP7 was finally released (wait, where's our 6? According to the official statement, PHP7 is now twice as fast as PHP5.6, so if we want to try something new, how can we experience it?
In fact, we have several ways to install it.
First, we can go to the official website up and down the source code to compile, this will not say much.
Second, we can use our third-party package to install, such as homebrew. This article describes how to install using this method.
Installation method
First we need to install Homebrew
Install via brew:
$brew tap homebrew/dupes $brew tap homebrew/versions $brew tap homebrew/homebrew-php / / create the directory sudo mkdir / usr/local/varsudo chmod 777 / usr/local/var / / change it to your own user name and group sudo chown-R: / usr/local/sbin sudo mkdir / usr/local/sbin/// install PHP7 $brew install php70 / / delete the previously installed PHP5.6 / / you can modify it according to your own situation $brew unlink php56 $brew link php70// completed $php-vPHP 7.0.0 (cli) (built: Dec 2 2015 13:06:23) (NTS) Copyright (c) 1997-2015 The PHP GroupZend Engine v3.0.0 Copyright (c) 1998-2015 Zend Technologies
Configure Apache
$sudo vim / etc/apache2/httpd.conf
Find this line and comment it out (probably on line 168)
# Comment out the PHP5 module # LoadModule php5_module libexec/apache2/libphp5.so#Enable PHP 7 module LoadModule php7_module / usr/local/opt/php70/libexec/apache2/libphp7.so SetHandler application/x-httpd-php
Restart Apache
Sudo apachectl restart
Add an info.php file to your Apache's default directory / Library/WebServer/Documents.
Finally, go to your http://localhost/info.php to take a look at the following tests. If you see the relevant information, it means that it has been installed.
This is the answer to the question about how to install php7 in macbook pro. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
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.