电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

php8开发环境安装教程

11页
  • 卖家[上传人]:d****
  • 文档编号:357939286
  • 上传时间:2023-08-15
  • 文档格式:DOC
  • 文档大小:70KB
  • / 11 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 1、CentOS Linux release 7.4.1708 (Core)php-8.2.0.tar.gznginx-1.22.1.tar.gzmysql-8.0.31-linux-glibc2.17-x86_64-minimal.tar.xzmemcached-1.6.20.tar.gz先安装当前最新版cmake-3.25.1.tar.gztar -zxvf cmake-3.25.1.tar.gz -C /usr/local/设置环境变量echo export CMAKE_HOME=/opt/cmakeexport PATH=$CMAKE_HOME/bin:$PATH /etc/profile.d/cmake.shsource /etc/profile.d/cmake.sh #让环境变量生效cmake -version安装最新版libzip-1.9.2.tar.gztar -zxvf libzip-1.9.2.tar.gzcd libzip-1.9.2mkdir buildcd buildcmake .make install安装nginxtar -zxvf nginx-1.22.1.

      2、tar.gzcd nginx-1.22.1./configure-prefix=/usr/local/nginx -with-http_stub_status_module -with-http_gzip_static_module -with-http_realip_module -with-http_sub_module -with-http_ssl_modulemake & make install添加全局命令ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx测试nginx -Vnginx注册到systemctl管理vim /lib/systemd/system/nginx.serviceUnitDescription=nginx serviceAfter=network.targetServiceType=forkingExecStart=/usr/local/nginx/sbin/nginxExecReload=/usr/local/nginx/sbin/nginx -s reloadExecStop=/usr/local/ngi

      3、nx/sbin/nginx -s stopPrivateTmp=trueInstallWantedBy=multi-user.targetsystemctl daemon-reloadsystemctl start nginx.servicesystemctl enablenginx.service 设置nginx.service 开机启动systemctl stopnginx.service # 停止服务systemctl restartnginx.service # 重新启动服务systemctl statusnginx.service # 查看服务当前状态systemctl disablenginx.service # 停止开机自启动systemctl reload nginx.servicesystemctl list-units -type=service查看所有已启动的服务systemctl list-unit-files 查看所有开机启动的服务systemctl list-unit-files | grep nginx配置nginx.conf在server 下面增加loc

      4、ation .php$ roothtml;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;includefastcgi_params;安装phpyum -y install libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel sqlite-devel libcurl-devel libpng-devel libjpeg-devel

      5、 freetype-devel libicu-devel oniguruma-devel libxslt-develtar -zxvf php-8.2.1.tar.gzcd php-8.2.1./configure -prefix=/usr/local/php8 -with-config-file-path=/usr/local/php8/etc -with-config-file-scan-dir=/usr/local/php8/php.d -enable-mysqlnd -with-mysqli -with-pdo-mysql -enable-fpm -with-fpm-user=www -with-fpm-group=www -with-gd -with-iconv -with-zlib -enable-xml -enable-shmop -enable-sysvsem -enable-inline-optimization -enable-mbregex -enable-mbstring -enable-ftp -with-openssl -enable-pcntl -enab

      6、le-sockets -with-xmlrpc -enable-zip -enable-soap -without-pear -with-gettext -enable-session -with-curl -with-jpeg-dir -with-freetype-dir -enable-opcache报错:configure: error: Package requirements (oniguruma) were not met原因是没有安装配置oniguruma导致的yum -y install yum -y install make -j 2 & make install#采用两个核心编译cp php.ini-production /usr/local/php8/etc/php.inivim /usr/local/php8/etc/php.ini +1371 #php的Session存储目录 1371session.save_path = /tmp #将注释打开cd /usr/local/php8/etccp php-fpm.conf.default php-fpm.conf

      7、vim php-fpm.conf +17pid = /var/run/php-fpm.pid#将注释取消并修改# php-fpm参数优化cd /usr/local/php8/etc/php-fpm.d/vim www.conf输入wwwlisten = 127.0.0.1:9000listen.mode = 0666user = wwwgroup = wwwpm = dynamicpm.max_children = 128pm.start_servers = 20pm.min_spare_servers = 5pm.max_spare_servers = 35pm.max_requests = 10000rlimit_files = 1024slowlog = log/$pool.log.slow配置 php-fpm 系统环境变量vim /etc/profile.d/php.sh输入以下两行export PHP_HOME=/usr/local/php8export PATH=$PATH:$PHP_HOME/bin:$PHP_HOME/sbinsource /etc/profile.d/

      8、php.shecho $PATH配置 php-fpm 开机自启动vim /lib/systemd/system/php-fpm.serviceUnitDescription=php-fpmAfter=network.targetServiceType=forkingExecStart=/usr/local/php8/sbin/php-fpmExecStop=/bin/pkill -9 php-fpmPrivateTmp=trueInstallWantedBy=multi-user.targetphp-fpm.service 文件说明Unit:服务的说明Description:描述服务After:描述服务类别Service服务运行参数的设置Type=forking是后台运行的形式ExecStart为服务的具体运行命令ExecReload为重启命令ExecStop为停止命令PrivateTmp=True表示给服务分配独立的临时空间注意:Service的启动、重启、停止命令全部要求使用绝对路径Install运行级别下服务安装的相关设置,可设置为多用户,即系统运行级别为3systemctl daemon-reloadpkill php-fpmsystemctl start php-fpm.s

      《php8开发环境安装教程》由会员d****分享,可在线阅读,更多相关《php8开发环境安装教程》请在金锄头文库上搜索。

      点击阅读更多内容
    最新标签
    监控施工 信息化课堂中的合作学习结业作业七年级语文 发车时刻表 长途客运 入党志愿书填写模板精品 庆祝建党101周年多体裁诗歌朗诵素材汇编10篇唯一微庆祝 智能家居系统本科论文 心得感悟 雁楠中学 20230513224122 2022 公安主题党日 部编版四年级第三单元综合性学习课件 机关事务中心2022年全面依法治区工作总结及来年工作安排 入党积极分子自我推荐 世界水日ppt 关于构建更高水平的全民健身公共服务体系的意见 空气单元分析 哈里德课件 2022年乡村振兴驻村工作计划 空气教材分析 五年级下册科学教材分析 退役军人事务局季度工作总结 集装箱房合同 2021年财务报表 2022年继续教育公需课 2022年公需课 2022年日历每月一张 名词性从句在写作中的应用 局域网技术与局域网组建 施工网格 薪资体系 运维实施方案 硫酸安全技术 柔韧训练 既有居住建筑节能改造技术规程 建筑工地疫情防控 大型工程技术风险 磷酸二氢钾 2022年小学三年级语文下册教学总结例文 少儿美术-小花 2022年环保倡议书模板六篇 2022年监理辞职报告精选 2022年畅想未来记叙文精品 企业信息化建设与管理课程实验指导书范本 草房子读后感-第1篇 小数乘整数教学PPT课件人教版五年级数学上册 2022年教师个人工作计划范本-工作计划 国学小名士经典诵读电视大赛观后感诵读经典传承美德 医疗质量管理制度 2
    关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
    手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
    ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.