In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to install and configure PHP7 in yum software". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to install and configure PHP7 in yum software".
Yum installs and configures PHP7: 1, install nginx;2, configure the source of PHP7 through "yum install epel-release"; 3, install php7-fpm;4 formally through yum, install MySQL;5, configure nginx;6, start php-fpm.
This article operating environment: centos7 system, PHP7 version, DELL G3 computer
Centos 7 hands-on teaches you to install and configure Nginx+php7-fpm+MySQL using YUM: what to prepare
A server with a pure system
Tools to connect to the server remotely (I use Xshell here)
Install nginx
Execute yum install nginx after linking to the server
You need to enter y and enter to install nginx.
Nginx has been installed in the image above!
Install php7-fpm below
First, let's configure the source of PHP7
Yum install epel-release
Enter y here to confirm the installation and enter
The above picture shows that the installation is complete!
Add the source of PHP7 below
Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
The above picture shows that the addition is complete!
Php7-fpm is officially installed below
Yum install php70w-fpm php70w-cli php70w-gd php70w-mcrypt php70w-mysql php70w-pear php70w-xml php70w-mbstring php70w-pdo php70w-json php70w-pecl-apcu php70w-pecl-apcu-devel
Copy the above code execution
Y continue
Y continue
Here the PHP7-FPM installation is complete!
Install MySQL below
First, add the source of MySQL7.
Rpm-Uvh http://repo.mysql.com/mysql57-community-release-el7-7.noarch.rpm
Copy the above code and execute
Increase success!
Install MySQL
Yum install mysql-server mysql-devel mysql
It will take some time to wait patiently to continue the MySQL installation.
Y continue
The above figure shows that the installation of MySQL is complete.
Update the configuration again when there is time!
The following is configured after installation. Configure nginx first.
Go to the nginx configuration directory / etc/nginx to edit the nginx.conf file
Delete lines 38-57 from the nginx.conf file
Just save it after deletion!
Let's create a configuration file for the site in the conf.d directory. For example, the content in the first.conf file is as follows
Server {listen 80; server_name (site domain name is replaced by IP if not available); root / www/first (website root directory); index index.php index.html; location ~\ .php$ {fastcgi_pass 127.0.0.1 document_root$fastcgi_script_name; include fastcgi_params; 9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params;}}
Suppose our site is configured in the / www/first directory (this directory does not need to be created by ourselves)
The above picture shows the creation directory
Let's edit the site file
Create an index.php under the site directory as follows
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.