我启动了`php-fpm`,但在我的CentOS7中找不到`php-fpm.sock`文件

I started the php-fpm, but can not find the php-fpm.sock file in my CentOS7.

I use this command installed the php7 and php7-fpm:

yum install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel

I started the php-fpm:

/usr/sbin/php-fpm

but I can not find the php-fpm.sock file in my CentOS7.2, I can find the php-fpm.pid in there:

/var/run/php-fpm/php-fpm.pid

EDIT-01

I use the ss -x -a, did not find the php-fpm.sock.

$ ss -x -a
Netid  State      Recv-Q Send-Q              Local Address:Port                               Peer Address:Port                
u_str  LISTEN     0      128      /run/lvm/lvmpolld.socket 8458                                          * 0                    
u_dgr  UNCONN     0      0          /run/systemd/shutdownd 8465                                          * 0                    
u_str  LISTEN     0      128    /run/docker/libnetwork/d47cac5c2e8dd9490d56a5067ec009db0aa0e0df52b4321c51bff8f6062f6166.sock 110335003                                     * 0                    
u_str  LISTEN     0      128          /var/run/docker.sock 110329383                                     * 0                    
u_dgr  UNCONN     0      0      /run/systemd/cgroups-agent 3853374                                       * 0                    
u_str  LISTEN     0      128          /run/systemd/private 110322498                                     * 0                    
u_str  LISTEN     0      30     /var/run/NetworkManager/private 9026                                          * 0                    
u_dgr  UNCONN     0      0             /run/systemd/notify 1355                                          * 0                    
u_str  LISTEN     0      128    /var/run/dbus/system_bus_socket 9805                                          * 0                    
u_str  LISTEN     0      128    /run/systemd/journal/stdout 1364                                          * 0                    
u_dgr  UNCONN     0      0      /run/systemd/journal/socket 1367                                          * 0                    
u_dgr  UNCONN     0      0                        /dev/log 1369                                          * 0                    
u_seq  LISTEN     0      128             /run/udev/control 3852388                                       * 0                    
u_str  LISTEN     0      5      /var/run/screen/S-root/9870..www 128997222                                     * 0                    
u_str  LISTEN     0      128    /var/run/docker/libcontainerd/docker-containerd.sock 110326421                                     * 0                    
u_str  LISTEN     0      80      /var/lib/mysql/mysql.sock 4072947                                       * 0                    
u_str  LISTEN     0      128       /run/lvm/lvmetad.socket 8373                                          * 0                    
u_str  ESTAB      0      0      /run/systemd/journal/stdout 19620                                         * 18806                
u_str  ESTAB      0      0                               * 18650                                         * 9123                 
u_str  ESTAB      0      0      /run/systemd/journal/stdout 8155                                          * 17962                
u_dgr  UNCONN     0      0                               * 110327085                                     * 1369                 
u_dgr  UNCONN     0      0                               * 9025                                          * 1369                 
u_str  ESTAB      0      0                               * 18179                                         * 19621                
u_str  ESTAB      0      0                               * 8176                                          * 8175                 
u_str  ESTAB      0      0                               * 110322500                                     * 110325911            
u_str  ESTAB      0      0                               * 15930                                         * 10704                
u_str  ESTAB      0      0                               * 130300393                                     * 130300392            
u_str  ESTAB      0      0      /run/systemd/journal/stdout 110325177                                     * 110327913            
u_str  ESTAB      0      0                               * 9028                                          * 15825                
u_str  ESTAB      0      0                               * 130011125                                     * 130011124            
u_str  ESTAB      0      0                               * 18806                                         * 19620                
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 10705                                         * 19546                
u_str  ESTAB      0      0                               * 18596                                         * 8177                 
u_str  ESTAB      0      0      /run/systemd/journal/stdout 4070758                                       * 4074559              
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 19553                                         * 9145                 
u_str  ESTAB      0      0      /var/run/docker/libcontainerd/docker-containerd.sock 110329386                                     * 110332150            
u_dgr  UNCONN     0      0                               * 9938                                          * 1369                 
u_dgr  UNCONN     0      0                               * 110322566                                     * 1369                 
u_str  ESTAB      0      0      /run/systemd/journal/stdout 19621                                         * 18179                
u_dgr  UNCONN     0      0                               * 9147                                          * 1369                 
u_str  ESTAB      0      0      /run/systemd/journal/stdout 10704                                         * 15930                
u_str  ESTAB      0      0                               * 110327913                                     * 110325177            
u_str  ESTAB      0      0                               * 130011124                                     * 130011125            
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 15825                                         * 9028                 
u_dgr  UNCONN     0      0                               * 18585                                         * 1367                 
u_str  ESTAB      0      0                               * 8175                                          * 8176                 
u_str  ESTAB      0      0                               * 130013581                                     * 130013580            
u_str  ESTAB      0      0                               * 12146                                         * 9463                 
u_str  ESTAB      0      0                               * 17234                                         * 21801                
u_str  ESTAB      0      0                               * 3851403                                       * 3849440              
u_dgr  UNCONN     0      0                               * 3845588                                       * 1367                 
u_str  ESTAB      0      0                               * 9145                                          * 19553                
u_dgr  UNCONN     0      0                               * 130300389                                     * 1369                 
u_str  ESTAB      0      0                               * 19546                                         * 10705                
u_str  ESTAB      0      0                               * 130013580                                     * 130013581            
u_str  ESTAB      0      0                               * 110333809                                     * 110331364            
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 21801                                         * 17234                
u_str  ESTAB      0      0      /run/systemd/journal/stdout 8152                                          * 16751                
u_str  ESTAB      0      0      /run/systemd/journal/stdout 8151                                          * 15671                
u_str  ESTAB      0      0      /run/systemd/journal/stdout 110331364                                     * 110333809            
u_str  ESTAB      0      0                               * 110322568                                     * 110322567            
u_str  ESTAB      0      0                               * 4074559                                       * 4070758              
u_str  ESTAB      0      0      /run/systemd/journal/stdout 9463                                          * 12146                
u_str  ESTAB      0      0                               * 17962                                         * 8155                 
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 110325911                                     * 110322500            
u_str  ESTAB      0      0      /run/systemd/journal/stdout 18006                                         * 15757                
u_dgr  UNCONN     0      0                               * 3845606                                       * 3845607              
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 9123                                          * 18650                
u_str  ESTAB      0      0                               * 15757                                         * 18006                
u_str  ESTAB      0      0                               * 110322567                                     * 110322568            
u_dgr  UNCONN     0      0                               * 110329381                                     * 1367                 
u_dgr  UNCONN     0      0                               * 3845607                                       * 3845606              
u_str  ESTAB      0      0                               * 16751                                         * 8152                 
u_str  ESTAB      0      0                               * 110332150                                     * 110329386            
u_str  ESTAB      0      0      /var/run/dbus/system_bus_socket 8177                                          * 18596                
u_str  ESTAB      0      0                               * 15671                                         * 8151                 
u_dgr  UNCONN     0      0                               * 130020259                                     * 1367                 
u_str  ESTAB      0      0                               * 130300392                                     * 130300393            
u_str  ESTAB      0      0      /run/systemd/journal/stdout 3849440                                       * 3851403
php
dongyuan1160
dongyuan1160 php-fpm.conf中没有.sock字。
接近 2 年之前 回复
duanlai1855
duanlai1855 你在哪里看?你的php-fpm.conf文件中有什么?
接近 2 年之前 回复

1个回答



Centos服务(httpd,mysqld,php-fpm)通常通过服务命令启动</ p>

  sudo service php-fpm(start | stop | restart | status)
</ code> </ pre>

检查它是否正在运行</ p>

   sudo service php-fpm status 
</ code> </ pre>
</ div>

展开原文

原文

Centos services (httpd, mysqld,php-fpm) are usually started via the service command

sudo service php-fpm (start|stop|restart|status)

Check that it's running

sudo service php-fpm status

duanpoqiu0919
duanpoqiu0919 [cyberciti.biz/tips/...]
接近 2 年之前 回复
dongzao4503
dongzao4503/ tmp /中显式文件为空。
接近 2 年之前 回复
douzhaiyuan1731
douzhaiyuan1731 在我的CentOS6框中,套接字文件在/ tmp目录中创建,因此您可以在那里查看:“ls / tmp | grep php5-fpm”或“ls / tmp | grep fpm”
接近 2 年之前 回复
doujian1954
doujian1954 尝试:“ss -x -a | grep php5-fpm”或“ss -x -a | grep php-fpm”
接近 2 年之前 回复
douao2019
douao2019 我的意思是我找不到php-fpm.sock文件。
接近 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问