小编Jas*_*son的帖子

unix 套接字与 TCP 端口的性能

例如在 php-fpm 上:

#listen = 127.0.0.1:9000
listen = /var/run/php-fpm/php-fpm.sock
Run Code Online (Sandbox Code Playgroud)

在 TCP 端口上使用基于 unix 套接字的侦听器之间有什么主要的性能差异吗?(不仅适用于 PHP,而且适用于一般情况。每个服务是否不同?)

performance tcp socket

57
推荐指数
2
解决办法
4万
查看次数

openjdk-8-jre-headless :取决于:ca-certificates-java 但它不会被安装

无法安装Java8

apt-get install openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be …
Run Code Online (Sandbox Code Playgroud)

linux debian java software-installation

46
推荐指数
2
解决办法
4万
查看次数

KEY_CONFIG 指向错误版本的 openssl.cnf

我正在尝试设置 OpenVPN,但出现此错误:

#./build-ca
grep: /etc/openvpn/easy-rsa/2.0/openssl.cnf: No such file or directory
pkitool: KEY_CONFIG (set by the ./vars script) is pointing to the wrong
version of openssl.cnf: /etc/openvpn/easy-rsa/2.0/openssl.cnf
The correct version should have a comment that says: easy-rsa version 2.x
Run Code Online (Sandbox Code Playgroud)

我安装了 OpenSSL*。我需要设置一个位置吗?

linux openssl openvpn

9
推荐指数
2
解决办法
4万
查看次数

删除 /home LVM 并合并到 /

[root@host.com ~]# pvdisplay -s
  Device "/dev/sda2" has a capacity of 0
[root@host.com ~]# vgdisplay -s                                                                                                                                                               "vg_vpsny23" 1.36 TiB  [1.36 TiB  used / 0    free]
[root@host.com ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_vpsny23-lv_root
                       50G  4.0G   43G   9% /
tmpfs                  16G     0   16G   0% /dev/shm
/dev/sda1             485M   65M  395M  15% /boot
/dev/mapper/vg_vpsny23-lv_home
                      1.3T  300M  1.3T   1% /home
[root@host.com ~]# umount /home                                                                                                               
[root@host.com ~]# vgdisplay
  --- Volume group ---
  VG Name               vg_vpsny23
  System ID
  Format                lvm2
  Metadata Areas        1 …
Run Code Online (Sandbox Code Playgroud)

centos lvm

7
推荐指数
2
解决办法
3万
查看次数

段错误是否意味着内存不佳

这是一个全新的服务器,具有全新的安装和全新的 Apache/PHP 编译,没有任何异常。只是一个托管的 WordPress 网站,我得到以下信息。

这是否意味着内存不好?如果是这样,我如何在不取下盒子的情况下对其进行测试。

尽管使 php.ini 设置不受限制,但我注意到 PHP 存在一些奇怪的内存问题。

conftest[31039]: segfault at 1 ip 0000000000405088 sp 00007fff92152090 error 4 in conftest[400000+a4000]
    conftest[26375]: segfault at 1 ip 0000000000405088 sp 00007fffa5b0b450 error 4 in conftest[400000+a4000]
    php[10669]: segfault at aec69ff1 ip 0000000000759ac1 sp 00007fff39245950 error 4 in php[400000+6dd000]
    php[14634]: segfault at 0 ip 000000000073ea24 sp 00007ffffaa24c60 error 4 in php[400000+6dd000]
    php[17315]: segfault at 9e979531 ip 0000000000759ac1 sp 00007fff877ba610 error 4 in php[400000+6dd000]
    php[2804]: segfault at 108afe2a1 ip 0000000000759ac1 sp 00007fff53cb5210 error …
Run Code Online (Sandbox Code Playgroud)

memory hardware centos segmentation-fault php

5
推荐指数
1
解决办法
5933
查看次数

在 Linux 上为 PHP 正确设置 ulimit

我已/etc/security/limits.conf设置为以下内容:

nobody soft nofile 409600
nobody hard nofile 1024000
phpuser soft nofile 409600
phpuser hard nofile 1024000
httpd soft nofile 409600
httpd hard nofile 1024000
* soft nofile 409600
* hard nofile 1024000
Run Code Online (Sandbox Code Playgroud)

但是,php页面仍然显示:

[...] failed to open stream: Too many open files [...]
Run Code Online (Sandbox Code Playgroud)

设置ulimit -n 10000看起来只是一个临时修复。

我也有以下设置:

fs.file-max = 20970800
net.core.somaxconn = 1024000
kern.maxfilesperproc = 16638400
kern.maxfiles = 819200
Run Code Online (Sandbox Code Playgroud)

linux security centos ulimit

5
推荐指数
1
解决办法
7770
查看次数