首页 文章 精选 留言 我的

精选列表

搜索[视频去水印],共10000篇文章
优秀的个人博客,低调大师

Zed 宣布正在开发 DeltaDB,一次“去 Git 化”的版本控制实验

代码的真正来源是代码本身,还是产生代码的那段对话?Zed团队在官方博客上发表了一篇文章,宣布正在开发一个名为DeltaDB的新版本控制系统——这个系统的核心理念是:代码变更应该与产生这段变更的对话绑定在一起,而非仅仅依赖于Git的提交快照。 https://zed.dev/deltadb Git的局限性:从快照到操作记录 Zed的联合创始人Nathan Sobo在文章中指出了传统版本控制系统的一个根本性问题:Git的提交机制是基于快照的,而非操作流。每次提交记录的是"文件在某个时刻的状态",而不是"在这个时刻发生了什么操作"。这种模型在面对现代协作场景时显得过于笨重——你需要等待提交、等待审核、等待合并,然后才能继续推进工作。 这个问题的本质在于:Git设计于一个代码审查是可选的、实时协作是罕见奢侈品的时代。而今天,AI智能体可以随时修改代码,团队成员可以实时看到彼此的改动,传统的"提交-审核-合并"流程正在成为效率的瓶颈。 DeltaDB的设计思路:操作优先,对话绑定 DeltaDB的核心设计理念有两点:细粒度操作记录,以及代码变更与对话的绑定。 第一,DeltaDB记录每一个操作,而非每一个快照。这意味着你可以在任何时刻回溯到文件的任意状态,并同时看到产生那次变更的上下文——谁在什么时间做了什么改动、为什么做这个改动。第二,每次代码变更都与产生它的对话绑定在一起。当你查看一个代码片段的历史时,你不仅能看到它是如何演变的,还能直接看到当时团队成员或AI智能体讨论了哪些问题、做出了哪些决策。 这种设计让"指向历史中的任意时刻,然后直接跳转到相关的讨论"成为可能。传统的代码审查需要单独开启一个PR流程、等待评论、记录反馈,而DeltaDB将这些对话与代码变更本身视为同一事件的两面。 实时协作与AI智能体的兼容性 DeltaDB的另一个重要特性是支持实时协作。团队成员和AI智能体可以在同一个工作树上同时工作,无需等待提交和推送。这与Git的分支模型形成了鲜明对比——在Git中,你需要处理合并冲突、解决版本差异,而在DeltaDB中,所有操作都是持续的、增量式的,不存在"版本分叉"的概念。 这意味着AI智能体可以真正融入开发流程,而不是作为"偶尔被调用的工具"存在。当AI智能体可以实时看到代码库的变化、参与到正在进行的讨论中时,它的工作方式将从"响应人类指令"转变为"与人类共同演进代码"。 Beta即将发布 Zed团队表示,DeltaDB的Beta版本预计将在几周内发布,感兴趣的用户可以在 zed.dev/deltadb 加入等待列表。Git和CI系统仍然有用——它们提供了检查、外部集成等能力——但协作的核心将转移到持续演进的工作树上,而非提交历史中。 这是一个关于"代码与对话关系"的重新思考。在AI时代,代码的来源不再是一个黑箱——每一行代码背后都有一个可以被追溯的决策过程。DeltaDB试图让这个决策过程变得可见、可检索,而这也许是版本控制在下个时代应有的形态。 参考来源:https://zed.dev/blog/introducing-deltadb

优秀的个人博客,低调大师

如何最接近rpm的安装方式去编译安装最新的php-fpm

1 前言 笔者非常不喜欢某些人编译安装的软件,维护起来非常缺乏rpm安装的那种规范感觉,于是笔者参阅官方的编译安装教程以及对比分析rpm安装的目录布置结构,完成以下安装。 2 安装PHP-FPM 2.1 环境配置 2.1.1 安装解压工具 yuminstall-ybzip2 2.1.2 配置编译环境 yum-yinstallgccgcc-c++makeexpat-devel 2.1.3 下载php二进制安装包 cd~ wgethttp://cn2.php.net/distributions/php-7.1.12.tar.bz2 注:具体的下载页面请参阅 http://sg2.php.net/downloads.php 2.1.4 创建运行用户 groupadd-g48apache useradd-u48-g48-d/usr/share/httpd-s/sbin/nologinapache 2.1.5 预建目录 mkdir/var/log/php-fpm/ mkdir/run/php-fpm/ 2.1.6 配置防火墙 firewall-cmd --permanent --add-port 9000/tcp firewall-cmd --reload firewall-cmd --list-all 2.2 编译安装 2.2.1 解压安装包 tar-xfphp-7.1.12.tar.bz2 2.2.2 安装前构建 cdphp-7.1.12 ./configure--bindir=/usr/sbin/\ --sbindir=/usr/sbin/\ --sysconfdir=/etc/\ --libdir=/usr/lib64/\ --mandir=/usr/share/man/\ --includedir=/usr/include/\ --with-fpm-user=apache\ --with-fpm-group=apache\ --enable-fpm\ --with-mysqli 根据提示解决安装的依赖关系 yuminstall-ylibxml2-devel 2.2.3 编译并安装 make makeinstall|teeinstall.log 2.3 配置FPM 2.3.1 配置php.ini cpphp.ini-development/etc/php.ini 2.3.2 防止空文件递给PHP-FPM后端 vim/etc/php.ini 修改以下参数: cgi.fix_pathinfo=0 注:可防任意脚本注入 2.3.3 创建配置 vim/etc/php-fpm.conf 加入如下配置: ;;;;;;;;;;;;;;;;;;;;; ;FPMConfiguration; ;;;;;;;;;;;;;;;;;;;;; ;AllrelativepathsinthisconfigurationfilearerelativetoPHP'sinstall ;prefix. ;Includeoneormorefiles.Ifglob(3)exists,itisusedtoincludeabunchof ;filesfromaglob(3)pattern.Thisdirectivecanbeusedeverywhereinthe ;file. include=/etc/php-fpm.d/*.conf ;;;;;;;;;;;;;;;;;; ;GlobalOptions; ;;;;;;;;;;;;;;;;;; [global] ;Pidfile ;DefaultValue:none pid=/run/php-fpm/php-fpm.pid ;Errorlogfile ;DefaultValue:/var/log/php-fpm.log error_log=/var/log/php-fpm/error.log ;Loglevel ;PossibleValues:alert,error,warning,notice,debug ;DefaultValue:notice ;log_level=notice ;IfthisnumberofchildprocessesexitwithSIGSEGVorSIGBUSwithinthetime ;intervalsetbyemergency_restart_intervalthenFPMwillrestart.Avalue ;of'0'means'Off'. ;DefaultValue:0 ;emergency_restart_threshold=0 ;Intervaloftimeusedbyemergency_restart_intervaltodeterminewhen ;agracefulrestartwillbeinitiated.Thiscanbeusefultoworkaround ;accidentalcorruptionsinanaccelerator'ssharedmemory. ;AvailableUnits:s(econds),m(inutes),h(ours),ord(ays) ;DefaultUnit:seconds ;DefaultValue:0 ;emergency_restart_interval=0 ;Timelimitforchildprocessestowaitforareactiononsignalsfrommaster. ;Availableunits:s(econds),m(inutes),h(ours),ord(ays) ;DefaultUnit:seconds ;DefaultValue:0 ;process_control_timeout=0 ;SendFPMtobackground.Setto'no'tokeepFPMinforegroundfordebugging. ;DefaultValue:yes daemonize=no ;;;;;;;;;;;;;;;;;;;; ;PoolDefinitions; ;;;;;;;;;;;;;;;;;;;; ;See/etc/php-fpm.d/*.conf 创建以下配置文件: mkdir/etc/php-fpm.d/ vim/etc/php-fpm.d/www.conf 加入如下配置: ;Startanewpoolnamed'www'. [www] ;TheaddressonwhichtoacceptFastCGIrequests. ;Validsyntaxesare: ;'ip.add.re.ss:port'-tolistenonaTCPsockettoaspecificaddresson ;aspecificport; ;'port'-tolistenonaTCPsockettoalladdressesona ;specificport; ;'/path/to/unix/socket'-tolistenonaunixsocket. ;Note:Thisvalueismandatory. listen=127.0.0.1:9000 ;Setlisten(2)backlog.Avalueof'-1'meansunlimited. ;DefaultValue:-1 ;listen.backlog=-1 ;Listofipv4addressesofFastCGIclientswhichareallowedtoconnect. ;EquivalenttotheFCGI_WEB_SERVER_ADDRSenvironmentvariableintheoriginal ;PHPFCGI(5.2.2+).Makessenseonlywithatcplisteningsocket.Eachaddress ;mustbeseparatedbyacomma.Ifthisvalueisleftblank,connectionswillbe ;acceptedfromanyipaddress. ;DefaultValue:any listen.allowed_clients=127.0.0.1 ;Setpermissionsforunixsocket,ifoneisused.InLinux,read/write ;permissionsmustbesetinordertoallowconnectionsfromawebserver.Many ;BSD-derivedsystemsallowconnectionsregardlessofpermissions. ;DefaultValues:userandgrouparesetastherunninguser ;modeissetto0666 ;listen.owner=nobody ;listen.group=nobody ;listen.mode=0666 ;Unixuser/groupofprocesses ;Note:Theuserismandatory.Ifthegroupisnotset,thedefaultuser'sgroup ;willbeused. ;RPM:apacheChoosedtobeabletoaccesssomedirashttpd user=apache ;RPM:Keepagroupallowedtowriteinlogdir. group=apache ;Choosehowtheprocessmanagerwillcontrolthenumberofchildprocesses. ;PossibleValues: ;static-afixednumber(pm.max_children)ofchildprocesses; ;dynamic-thenumberofchildprocessesaresetdynamicallybasedonthe ;followingdirectives: ;pm.max_children-themaximumnumberofchildrenthatcan ;bealiveatthesametime. ;pm.start_servers-thenumberofchildrencreatedonstartup. ;pm.min_spare_servers-theminimumnumberofchildrenin'idle' ;state(waitingtoprocess).Ifthenumber ;of'idle'processesislessthanthis ;numberthensomechildrenwillbecreated. ;pm.max_spare_servers-themaximumnumberofchildrenin'idle' ;state(waitingtoprocess).Ifthenumber ;of'idle'processesisgreaterthanthis ;numberthensomechildrenwillbekilled. ;Note:Thisvalueismandatory. pm=dynamic ;Thenumberofchildprocessestobecreatedwhenpmissetto'static'andthe ;maximumnumberofchildprocessestobecreatedwhenpmissetto'dynamic'. ;Thisvaluesetsthelimitonthenumberofsimultaneousrequeststhatwillbe ;served.EquivalenttotheApacheMaxClientsdirectivewithmpm_prefork. ;EquivalenttothePHP_FCGI_CHILDRENenvironmentvariableintheoriginalPHP ;CGI. ;Note:Usedwhenpmissettoeither'static'or'dynamic' ;Note:Thisvalueismandatory. pm.max_children=50 ;Thenumberofchildprocessescreatedonstartup. ;Note:Usedonlywhenpmissetto'dynamic' ;DefaultValue:min_spare_servers+(max_spare_servers-min_spare_servers)/2 pm.start_servers=5 ;Thedesiredminimumnumberofidleserverprocesses. ;Note:Usedonlywhenpmissetto'dynamic' ;Note:Mandatorywhenpmissetto'dynamic' pm.min_spare_servers=5 ;Thedesiredmaximumnumberofidleserverprocesses. ;Note:Usedonlywhenpmissetto'dynamic' ;Note:Mandatorywhenpmissetto'dynamic' pm.max_spare_servers=35 ;Thenumberofrequestseachchildprocessshouldexecutebeforerespawning. ;Thiscanbeusefultoworkaroundmemoryleaksin3rdpartylibraries.For ;endlessrequestprocessingspecify'0'.EquivalenttoPHP_FCGI_MAX_REQUESTS. ;DefaultValue:0 ;pm.max_requests=500 ;TheURItoviewtheFPMstatuspage.Ifthisvalueisnotset,noURIwillbe ;recognizedasastatuspage.Bydefault,thestatuspageshowsthefollowing ;information: ;acceptedconn-thenumberofrequestacceptedbythepool; ;pool-thenameofthepool; ;processmanager-staticordynamic; ;idleprocesses-thenumberofidleprocesses; ;activeprocesses-thenumberofactiveprocesses; ;totalprocesses-thenumberofidle+activeprocesses. ;Thevaluesof'idleprocesses','activeprocesses'and'totalprocesses'are ;updatedeachsecond.Thevalueof'acceptedconn'isupdatedinrealtime. ;Exampleoutput: ;acceptedconn:12073 ;pool:www ;processmanager:static ;idleprocesses:35 ;activeprocesses:65 ;totalprocesses:100 ;Bydefaultthestatuspageoutputisformattedastext/plain.Passingeither ;'html'or'json'asaquerystringwillreturnthecorrespondingoutput ;syntax.Example: ;http://www.foo.bar/status ;http://www.foo.bar/status?json ;http://www.foo.bar/status?html ;Note:Thevaluemuststartwithaleadingslash(/).Thevaluecanbe ;anything,butitmaynotbeagoodideatousethe.phpextensionorit ;mayconflictwitharealPHPfile. ;DefaultValue:notset ;pm.status_path=/status ;ThepingURItocallthemonitoringpageofFPM.Ifthisvalueisnotset,no ;URIwillberecognizedasapingpage.Thiscouldbeusedtotestfromoutside ;thatFPMisaliveandresponding,orto ;-createagraphofFPMavailability(rrdorsuch); ;-removeaserverfromagroupifitisnotresponding(loadbalancing); ;-triggeralertsfortheoperatingteam(24/7). ;Note:Thevaluemuststartwithaleadingslash(/).Thevaluecanbe ;anything,butitmaynotbeagoodideatousethe.phpextensionorit ;mayconflictwitharealPHPfile. ;DefaultValue:notset ;ping.path=/ping ;Thisdirectivemaybeusedtocustomizetheresponseofapingrequest.The ;responseisformattedastext/plainwitha200responsecode. ;DefaultValue:pong ;ping.response=pong ;Thetimeoutforservingasinglerequestafterwhichtheworkerprocesswill ;bekilled.Thisoptionshouldbeusedwhenthe'max_execution_time'inioption ;doesnotstopscriptexecutionforsomereason.Avalueof'0'means'off'. ;Availableunits:s(econds)(default),m(inutes),h(ours),ord(ays) ;DefaultValue:0 ;request_terminate_timeout=0 ;ThetimeoutforservingasinglerequestafterwhichaPHPbacktracewillbe ;dumpedtothe'slowlog'file.Avalueof'0s'means'off'. ;Availableunits:s(econds)(default),m(inutes),h(ours),ord(ays) ;DefaultValue:0 ;request_slowlog_timeout=0 ;Thelogfileforslowrequests ;DefaultValue:notset ;Note:slowlogismandatoryifrequest_slowlog_timeoutisset slowlog=/var/log/php-fpm/www-slow.log ;Setopenfiledescriptorrlimit. ;DefaultValue:systemdefinedvalue ;rlimit_files=1024 ;Setmaxcoresizerlimit. ;PossibleValues:'unlimited'oranintegergreaterorequalto0 ;DefaultValue:systemdefinedvalue ;rlimit_core=0 ;Chroottothisdirectoryatthestart.Thisvaluemustbedefinedasan ;absolutepath.Whenthisvalueisnotset,chrootisnotused. ;Note:chrootingisagreatsecurityfeatureandshouldbeusedwhenever ;possible.However,allPHPpathswillberelativetothechroot ;(error_log,sessions.save_path,...). ;DefaultValue:notset ;chroot= ;Chdirtothisdirectoryatthestart.Thisvaluemustbeanabsolutepath. ;DefaultValue:currentdirectoryor/whenchroot ;chdir=/var/www ;Redirectworkerstdoutandstderrintomainerrorlog.Ifnotset,stdoutand ;stderrwillberedirectedto/dev/nullaccordingtoFastCGIspecs. ;DefaultValue:no ;catch_workers_output=yes ;LimitstheextensionsofthemainscriptFPMwillallowtoparse.Thiscan ;preventconfigurationmistakesonthewebserverside.Youshouldonlylimit ;FPMto.phpextensionstopreventmalicioususerstouseotherextensionsto ;exectutephpcode. ;Note:setanemptyvaluetoallowallextensions. ;DefaultValue:.php ;security.limit_extensions=.php.php3.php4.php5 ;PassenvironmentvariableslikeLD_LIBRARY_PATH.All$VARIABLEsaretakenfrom ;thecurrentenvironment. ;DefaultValue:cleanenv ;env[HOSTNAME]=$HOSTNAME ;env[PATH]=/usr/local/bin:/usr/bin:/bin ;env[TMP]=/tmp ;env[TMPDIR]=/tmp ;env[TEMP]=/tmp ;Additionalphp.inidefines,specifictothispoolofworkers.Thesesettings ;overwritethevaluespreviouslydefinedinthephp.ini.Thedirectivesarethe ;sameasthePHPSAPI: ;php_value/php_flag-youcansetclassicinidefineswhichcan ;beoverwrittenfromPHPcall'ini_set'. ;php_admin_value/php_admin_flag-thesedirectiveswon'tbeoverwrittenby ;PHPcall'ini_set' ;Forphp_*flag,validvaluesareon,off,1,0,true,false,yesorno. ;Defining'extension'willloadthecorrespondingsharedextensionfrom ;extension_dir.Defining'disable_functions'or'disable_classes'willnot ;overwritepreviouslydefinedphp.inivalues,butwillappendthenewvalue ;instead. ;DefaultValue:nothingisdefinedbydefaultexceptthevaluesinphp.iniand ;specifiedatstartupwiththe-dargument ;php_admin_value[sendmail_path]=/usr/sbin/sendmail-t-i-fwww@my.domain.com ;php_flag[display_errors]=off php_admin_value[error_log]=/var/log/php-fpm/www-error.log php_admin_flag[log_errors]=on ;php_admin_value[memory_limit]=128M ;Setsessionpathtoadirectoryownedbyprocessuser php_value[session.save_handler]=files php_value[session.save_path]=/var/lib/php/session 2.3.4 测试fpm启动 /usr/sbin/php-fpm& 2.3.5 查询服务状态 ps-aux|grepphp-fpm netstat-antp|grepphp-fpm 2.3.6 手动关闭服务 kill-s15`pgrep-urootphp-fpm` 2.4 配置服务启动 2.4.1 配置启动脚本 vim/usr/lib/systemd/system/php-fpm.service 加入如下配置: [Unit] Description=ThePHPFastCGIProcessManager After=syslog.targetnetwork.target [Service] Type=simple PIDFile=/run/php-fpm/php-fpm.pid EnvironmentFile=/etc/sysconfig/php-fpm ExecStart=/usr/sbin/php-fpm--nodaemonize ExecReload=/bin/kill-USR2$MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target 配置环境文件: echo'#Additionalenvironmentfileforphp-fpm'>/etc/sysconfig/php-fpm 重载控制脚本 systemctldaemon-reload 2.4.2 启动服务并配置默认启动 systemctlstartphp-fpm systemctlenablephp-fpm 2.4.3 服务其他控制命令 systemctlstartphp-fpm systemctlrestartphp-fpm systemctlstopphp-fpm 2.5 测试 由于nginx不是本章的重点,所以如需测试请根据以下文章配置nginx, https://blog.51cto.com/cmdschool/1962061 最后你可以看到如下页面, 参阅文档: ============================================== http://sg2.php.net/manual/en/install.unix.nginx.php

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册