In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
LNMP environment:
L:linux
N:nginx
M:mysql
P:php
There is nothing to say about the Linux system. This is centos 7.6.
When nginx installs yum-y install epel-releaseyum-y install nginxPHP installs yum-y install php php-fpm php-curl php-intl php-mcrypt php-mysql php-mbstring php-xml php-dom php-gd gd caches mysql with redis, add the following php-cli php-common php-pdo php-devel php-xmlrpc php-bcmath php-dba php-enchantnginx + PHP environment configuration
(nginx + php-fpm + fastcgi)
Vim / etv/nginx/nginx.conf
Location ~\ .php ${root/ webroot/farm; fastcgi_pass 127.0.0.1 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME 9000; # the way to communicate with fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params;: there are two ways of communication between nginx and php-fpm, one is in socket form, the other is in tcp form. You can configure both ways, but you must ensure that the listening mode configured by nginx is consistent with that configured by php-fpm.conf. It is recommended to use TCP mode, that is, mode 1, which can be cross-server. Php configuration: / etc/php-fpm.conf or / etc/php-fpm.d/xx.conf 1:php-fpm.conf: listen = 127.0.0.1:9000nginx.conf: fastcgi_pass 127.0.0.1 1:php-fpm.conf 9000; method 2:php-fpm.conf: listen = / tmp/php-fpm.socknginx.conf: fastcgi_pass unix:/tmp/php-fpm.sock Where php-fpm.sock is a file generated by php-fpm and of type srw-rw----.
Vim / etv/php.ini
# short_open_tag = off is changed as follows: short_open_tag = on # Open the short tag
Once the above configuration is complete, you can deploy the php project on nginx.
Install MySQL [root @ newrain ~] # wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm[root@newrain ~] # rpm-ivh mysql80-community-release-el7-3.noarch.rpm [root@newrain ~] # vim / etc/yum.repos.d/mysql-community.repo [mysql57-community] name=MySQL 5.7 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/enabled=1 will be 0 Change it to 1gpgcheckcheck1gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql[mysql80-community]name=MySQL 8.0 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/enabled=0 change 1 to 0gpgcheckcheckroom1gpgkeyword = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql[root@newrain ~] # yum-y install mysql-server mysql
Boot & boot boot
[root@newrain ~] # systemctl start nginx [root@newrain ~] # systemctl start mysqld [root@newrain ~] # systemctl start php-fpm [root@newrain] # systemctl enable nginx [root@newrain ~] # systemctl enable mysqld [root@newrain ~] # systemctl enable php-fpm
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.