Solution for ubuntu without php-fpm: 1. Add the source address of php by executing the "sudo apt-get" command; 2. Check whether there is a php7 package; 3. Through "sudo apt-get install" " command to install PHP; 4. Modify the configuration to listen on port 9000 to handle nginx requests; 5. Start "php7.2-fpm" through "sudo service php7.2-fpm start".
The operating environment of this tutorial: ubuntu16.04 system, php7.2 version, DELL G3 computer
ubuntu does not have php-fpm what to do?
ubuntu installs php7.2, php-fpm [ubuntu deployment]
Add source address
Execute three commands to add php Source address, update, installation
sudo apt-get install software-properties-common sudo add-apt-repository -y ppa:ondrej/php sudo apt-get update sudo apt-get install php7.2
Check if there is a php7 package
sudo apt list | grep php
Install PHP
If nginx uses php, php7.2 is required -fpm, so you need to install
sudo apt-get install php7.2-mysql php7.2-fpm php7.2-curl php7.2-xml php7.2-gd php7.2-mbstring php-memcached php7.2-zip
Configure php-fpm
Modify the configuration to listen to port 9000 to handle nginx requests (this method is generally used on windows),
Another method is to use the sock method under Linux, which will be faster. You don’t need to modify this place. If you really use the path like /run/php/php7.2->fpm.sock, nginx will be used later. Also set it to this format fastcgi_pass unix:/run/php/php7.2-fpm.sock;
Open the /etc/php/7.2/fpm/pool.d/www.conf file and find the following location Comment the first line and add the second line
;listen = /run/php/php7.2-fpm.sock listen = 127.0.0.1:9000
Modify permissions
chmod 777 /run/php/php7.2-fpm.sock
Open the nginx configuration file /etc/nginx/sites-available/default (you can also add the configuration file elsewhere, This place is the default configuration place)
server { listen 80; #监听80端口,接收http请求 server_name www.example.com; #就是网站地址 root /usr/local/etc/nginx/www/your_project; # 准备存放代码工程的路径 #路由到网站根目录www.example.com时候的处理 location / { index index.php; #跳转到www.example.com/index.php autoindex on; } #当请求网站下php文件的时候,反向代理到php-fpm location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000;#nginx fastcgi进程监听的IP地址和端口 #fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_index index.php; include fastcgi_params; } }
Start php7.2-fpm
Sometimes after the installation is completed, you don’t know where to install it. You can use the following command to find it. Next
whereis php-fpm
Start php-fpm
sudo service php7.2-fpm start
Check whether the startup is successful
netstat -lnt | grep 9000
Restart
sudo service php7.2-fpm restart
Recommended study: "PHP Video Tutorial》
The above is the detailed content of What to do if ubuntu doesn't have php-fpm. For more information, please follow other related articles on the PHP Chinese website!

IDLE(集成开发学习环境Integrated Development and Learning Environment)是一个 Python IDE,由 Python 语言本身编写,在 Windows 中通常作为 Python 安装 的一部分而安装。它是初学者的理想选择,使用起来很简单。对于那些正在学习 Python 的人,比如学生,它可以作为一个很好的 IDE 来开始使用。语法高亮、智能识别和自动补全等基本功能是这个 IDE 的一些特点。你可以随时在官方 文档 中了

如何在 Ubuntu 中切换多个 PHP 版本?下面本篇文章给大家介绍一下Ubuntu中切换多个 PHP 版本的方,希望对大家有所帮助!

1.使用快捷键【Ctrl+Alt+T】打开终端命令模式。2.可以通过以下方式重启nginx服务。方法一,在nginx可执行目录sbin下,输入以下命令重启/nginx-sreload#重启方法二,查找当前nginx进程号,然后输入命令:kill-HUP进程号,实现重启nginx服务#ps-ef|grepnginx#查找当前nginx进程号]#kill-TERM132#杀死nginx进程,132为nginx进程号

docker内ubuntu乱码的解决办法:1、通过“locale”查看本地使用的语言环境;2、通过“locale -a”命令查看本地支持的语言环境;3、在“/etc/profile”文件的结尾处添加“export LANG=C.UTF-8”;4、重新加载“source /etc/profile”即可。

查找无用的镜像首先,您可以检查当前使用的内核,您可以通过命令获得信息:uname-aa.例如,它在我的桌面上显示为:复制代码代码如下:magc@magc-desktop:~$uname-aLinuxmagc-desktop2.6.24-19-RT#1SMPpremptRTThu8月21日02:08336003UTC2008i686GNU/Linux然后通过查看这台机器上所有内核的列表来决定哪些需要删除:运行命令:复制代码代码如下:dpkg-get-selections|greplinux例如,我

ubuntu没有php-fpm的解决办法:1、通过执行“sudo apt-get”命令添加php的源地址;2、查看有没有php7的包;3、通过“sudo apt-get install”命令安装PHP;4、修改配置监听9000端口来处理nginx的请求;5、通过“sudo service php7.2-fpm start”启动“php7.2-fpm”即可。

ubuntu php无法启动服务的解决办法:1、在php-fpm.conf里面设置错误日志;2、执行“/usr/sbin/php-fpm7.4 --fpm-config /etc/php/fpm/php-fpm.conf”命令;3、修改php的配置文件注释即可。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor
