V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
Myprincess
V2EX  ›  云计算

PHP7.4 版本要求最低云服务器配置必须是 4G 内存吗?

  •  
  •   Myprincess · 2020-09-05 23:25:27 +08:00 · 4365 次点击
    这是一个创建于 1326 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我在服务器安装 PHP7.4 后,安装是成功的,但是面板添加数据库时(宝塔)发现提供我没有安装 PHP7.4,可是我明显是安装了。但是面板上找不到,提示我重新安装。我百度一下。他们说是因为我服务器上的内存不够。这是不是真得吗?能不能告诉我最低多少 G 内存可以装 PHP7.4,这是程序的最低要求版本。
    第 1 条附言  ·  2020-09-08 10:50:19 +08:00
    有没有大哥帮忙看一下这个怎么处理 :
    PHP.INI 内存限制为 64M 。
    但是网站后台显示插件的最低内存为 256M 。
    我的服务器有 2G 内存,应该是够的,我可不可以直接修改 PHP.INT 文件的数据
    25 条回复    2020-11-09 15:00:34 +08:00
    learningman
        1
    learningman  
       2020-09-05 23:50:41 +08:00   ❤️ 1
    没有关系
    Myprincess
        2
    Myprincess  
    OP
       2020-09-05 23:59:03 +08:00
    @learningman 我的服务器是 2G 内存,可以装吗?我已经装上去了,但是又提示我安装。我创建不了数据库。
    learningman
        3
    learningman  
       2020-09-06 08:35:44 +08:00
    @Myprincess 1.数据库和 php 没有关系
    2. 你至少要提供 log 。不然没人知道你出了什么问题
    keyword233
        4
    keyword233  
       2020-09-06 09:37:09 +08:00
    大概率是 php 安装时缺少一些依赖,
    请自行检查日志,用 yum 安装一下,
    注意一下一部分依赖可能需要 epel 源,没有的话先装一下。
    Vneix
        5
    Vneix  
       2020-09-06 11:23:05 +08:00
    宝塔安装 php7.4 的话,512m 内存不敢确定,768m 反正没问题(甚至再跑个小网站都没问题,CentOS7 )
    Myprincess
        6
    Myprincess  
    OP
       2020-09-06 11:41:41 +08:00
    @Vneix
    @learningman
    帮我看一下:
    我的 V2 名字+COM.CN
    zhugefubin
        7
    zhugefubin  
       2020-09-06 11:44:32 +08:00 via Android
    当年年少轻狂,我 512M 的搬瓦工都敢用 php7,搭的小网站还用了好长时间了
    cloudsales
        8
    cloudsales  
       2020-09-06 13:34:20 +08:00
    与内存没关系的。你这个是网站目录下文件权限不够吧?
    jdjx
        9
    jdjx  
       2020-09-06 14:08:34 +08:00
    我 1G 的机子也装上了
    Myprincess
        10
    Myprincess  
    OP
       2020-09-06 14:46:26 +08:00
    @jdjx 是不是后台很吃力。论坛上有人说,至少要 4G 。我的网站是 OPENTCART,要求至少 7.3 版本以上。
    bestsanmao
        11
    bestsanmao  
       2020-09-06 17:14:50 +08:00
    512m + php7.4

    root@xxx:~# free -m
    total used free shared buff/cache available
    Mem: 487 116 132 18 239 315

    root@xxx:~# php -v
    PHP 7.4.9 (cli) (built: Aug 7 2020 14:29:10) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies

    root@xxx:~#
    realpg
        12
    realpg  
       2020-09-06 18:03:46 +08:00
    256M 内存无压力
    learningman
        13
    learningman  
       2020-09-06 19:50:23 +08:00
    @Myprincess 你给个域名,我怎么检查你的服务器上的东西?
    你要是给我 SSH 我倒是能看,你敢给吗?
    icy37785
        14
    icy37785  
       2020-09-06 21:30:42 +08:00 via iPhone
    512m+php7.4 表示毫无压力。
    loveminds
        15
    loveminds  
       2020-09-06 22:59:33 +08:00   ❤️ 1
    可以,1G+Dothan(Pentium M 745)都能运行
    cszchen
        16
    cszchen  
       2020-09-06 23:56:15 +08:00
    php 本身对内存要求不高,主要看访问量
    shellic
        17
    shellic  
       2020-09-07 08:17:26 +08:00 via Android   ❤️ 1
    1G 内存我 docker+PHP7.4 都跑的起来
    cccp2020
        18
    cccp2020  
       2020-09-07 09:08:38 +08:00
    这个不是 php7.4 的要求,估计是数据库占的内存大
    wangritian
        19
    wangritian  
       2020-09-07 09:20:59 +08:00
    你在任意目录运行 php -v 的结果是什么
    RickyC
        20
    RickyC  
       2020-09-07 15:24:23 +08:00
    1G 内存+1 核 CPU 我正在运行 PHP7.4, 速度飞快
    zhenjiangidc
        21
    zhenjiangidc  
       2020-09-07 16:32:05 +08:00
    没听过,,, 还有这要求 /????

    gyidc.net
    CodeCodeStudy
        22
    CodeCodeStudy  
       2020-09-07 16:48:08 +08:00
    mysql 8 才对内存有要求吧
    leapV3
        23
    leapV3  
       2020-09-07 18:40:43 +08:00
    你不会装的 mysql8 吧?
    loveminds
        24
    loveminds  
       2020-09-09 03:04:27 +08:00
    现在这台 4G 内存,负载很低
    Miner / # w
    03:04:07 up 7 days, 9:58, 1 users, load average: 0.39, 0.73, 0.86

    Miner / # php -v
    PHP 7.4.9 (cli) (built: Aug 7 2020 14:29:10) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies

    Miner / # free -m
    total used free shared buff/cache available
    Mem: 3883 2485 525 591 871 500
    Swap: 5688 2358 3330

    Miner / # lscpu
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 2
    On-line CPU(s) list: 0,1
    Thread(s) per core: 1
    Core(s) per socket: 2
    Socket(s): 1
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 61
    Model name: Intel(R) Celeron(R) CPU 3215U @ 1.70GHz
    Stepping: 4
    CPU MHz: 1531.062
    CPU max MHz: 1700.0000
    CPU min MHz: 500.0000
    BogoMIPS: 3392.21
    Virtualization: VT-x
    L1d cache: 32K
    L1i cache: 32K
    L2 cache: 256K
    L3 cache: 2048K
    Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave rdrand lahf_lm abm 3dnowprefetch ida arat epb invpcid_single pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust erms invpcid rdseed xsaveopt
    Myprincess
        25
    Myprincess  
    OP
       2020-11-09 15:00:34 +08:00
    @loveminds
    @CodeCodeStudy
    @RickyC
    @wangritian
    @cccp2020
    @icy37785
    @learningman
    @realpg
    @bestsanmao
    @cloudsales
    @zhugefubin
    @Vneix
    @keyword233
    @learningman

    各位大佬,你们谁有时间帮我安装一下网站呀。OPENCART,我安装好后有 BUG 。需要处理。可以付费用。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3597 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:02 · PVG 13:02 · LAX 22:02 · JFK 01:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.