当前位置: 首页 > news >正文

网站首页动画代码文娱热搜榜

网站首页动画代码,文娱热搜榜,广西建设厅证书查询,什么叫外链目录 php简介 官网php安装包 选择下载稳定版本 #xff08;建议使用此版本#xff0c;文章以此版本为例#xff09; 安装php解析环境 准备工作 安装依赖 zlib-devel 和 libxml2-devel包。 安装扩展工具库 安装 libmcrypt 安装 mhash 安装mcrypt 安装php 选项含…目录 php简介 官网php安装包 选择下载稳定版本 建议使用此版本文章以此版本为例 安装php解析环境 准备工作 安装依赖 zlib-devel 和 libxml2-devel包。  安装扩展工具库  安装 libmcrypt 安装 mhash 安装mcrypt 安装php 选项含义  php.ini配置调整 创建配置文件 配置文件部分信息 修改配置文件 启动php-fpm服务 添加防火墙配置 添加nginx配置server中添加 完整nginx.conf配置文件例子 压力测试 安装httpd-tools软件包使用ab工具 ab命令 php简介 百度搜索php链接 PHP是一种流行的开源服务器端脚本语言特别适用于网页开发并且可以嵌入HTML中使用。它全称是“超文本预处理器”Hypertext Preprocessor由Rasmus Lerdorf于1994年创建。php的语法混合了C、java、perl及部分自创的新语法、拥有更好的网页执行速度、更重要的是php支持绝大多数流行的数据库、且支持linux、windows、unix等多种操作系统。PHP主要用于创建动态的网页或应用程序可以生成动态内容、管理数据库、处理表单数据、会话跟踪等。由于其灵活性、可扩展性和广泛的社区支持PHP被全球的网站广泛采用从简单的个人博客到复杂的电子商务系统。 PHP脚本通常在服务器上执行并将结果以HTML的形式发送给客户端浏览器。它支持多种数据库如MySQL、PostgreSQL、SQLite等并且可以与多种服务器如Apache、Nginx、IIS等协同工作。 官网php安装包 php官网下载链接建议使用稳定版5.X 选择下载稳定版本 建议使用此版本文章以此版本为例 php.5.6.27版本官网下载链接 下载位置php、downloads、Old archives wget -O /usr/local/src/ https://www.php.net/distributions/php-5.6.27.tar.gz --no-check-certificate php.8.3.7版本官网下载链接 下载位置php、downloads、Current stable php .tar.gz   [19299kb] php.8.3.7版本官网下载链接 下载位置php、downloads、Current stable php tar.bz2  [15480kb] php.8.3.7版本官网下载链接 下载位置php、downloads、Current stable php tar.xg   [12164kb] PHP For Windows: Binaries and sources Releases windows系统 安装php解析环境 准备工作 为了避免发生程序冲突等现象建议先将RPM 方式安装的 php及相关依赖包(如果已存在)卸载。根据实际安装情况可卸载 php、php-cli、php-Idap、php-common、php-mysql等。 rpm -e php php-cli phpldap php-common php-mysql --nodeps #!/bin/bash # 列出所有PHP相关的包 php_packages$(rpm -qa | grep php) # 检查并卸载每个包 for package in $php_packages; doif [[ -n $package ]]; thenecho 正在卸载: $packageyum -y remove $packagefi done 安装依赖 yum install -y gd gcc make autoconf automake libtool openssl-devel libxml2-devel libcurl-devel libjpeg-devel libpng-devel freetype-devel bzip2-devel libmcrypt-devel zlib-devel libxm12-devel PHP 已经自带 FPM(FastCGl Process Manager,FastCGl 进程管理器)模块 用来对PHP 解析实例进行管理、优化解析效率。单服务器的LNMP 架构通常使用这种方式因此在配置 PHP 编译选项时应添加“--enable-fpm” 以启用此模块。为了提高 PHP 解析效率建议将相应版本的ZendGuardLoader 也装上。 zlib-devel 和 libxml2-devel包。  zlib包 zlib-devel 包提供了 zlib 库的开发文件包括头文件和静态库。zlib 是一个广泛使用的压缩库它提供了一种用于压缩和解压缩数据的方法特别是在网络传输和文件存储中。在 PHP 中zlib 库用于支持 gzencode()、gzdecode()、gzdeflate()、gzinflate() 等压缩和解压缩功能。如果在构建 PHP 环境时没有安装 zlib-devel那么 PHP 的 zlib 相关模块将无法编译这可能会导致一些依赖于这些模块的功能无法正常工作。 libxml2-devel: libxml2-devel 包提供了 libxml2 库的开发文件包括头文件和链接库。libxml2 是一个用于解析和构建 XML 和 HTML 文档的库。在 PHP 中libxml2 库用于支持各种 XML 处理函数如 simplexml_load_string()、dom_import_simplexml()、xml_parse() 等。如果在构建 PHP 环境时没有安装 libxml2-devel那么 PHP 的 XML 相关模块将无法编译这会影响所有与 XML 处理相关的功能。 安装扩展工具库  在实际企业应用中一部分基于php开发的web应用系统会需要额外的扩展工具、数据加密攻击libmcrypt、mhash、mcrypt等、  站点 http://sourceforge.net  下载 安装 libmcrypt wget -O / https://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gztar xf libmcrypt-2.5.8.tar.gz -C /usr/src cd /usr/src/libmcrypt-2.5.8/ . /configure make make install ln -s /usr/local/bin/libmcrypt_config /usr/bin/libmcrypt_config export LD_LIBRARY_PATH/usr/local/lib:$LD_LIBRARY_PATH 安装 mhash wget -O / https://acelnmp.googlecode.com/files/mhash-0.9.9.9.tar.gztar xf /mhash-0.9.9.9.tar.gz -C /usr/src/ cd /usr/src/mhash-0.9.9.9/ . /configure make make install ln-s/usr/local/lib/libmhash*/usr/lib/ 安装mcrypt wget -O / https://lcmp.googlecode.com/files/mcrypt-2.6.8.tar.gztar xf /mcrypt-2.6.8.tar.gz -C /usr/src/ export LD_LIBRARY_PATH/usr/local/lib . /configure make make install安装php tar xf php-5.6.27.tar.gz -C /usr/src cd /usr/src/php-5.6.27 ./configure --prefix/usr/local/php5.6 \ --with-gd \ --with-zlib \ --with-mysql/usr/local/mysql --with-mysqli/usr/local/mysql/bin/mysql_config \ --with-config-file-path/usr/local/php5 \ --enable-mbstring \ --enable-fpm \ --with-jpeg-dir/usr/lib make make install 选项含义  选项说明 --prefix 指定将PHP程序安装到哪个目录下如/usr/ local/php5.6 --with-mcrypt 加载数据加密等扩展工具支持。 --with-apxs2 设置 Apache HTTP Server提供的apxs模块支持程序的文件位置。 --with-mysql 设置MySQL数据库服务程序的安装位置。 --with-mysqli 添加 mysqli扩展支持。包含访问的mysql的一些命令 --with-config--file-path 设置PHP的配置文件php.ini将要存放的位置。 --enable-mbstring 启用多字节字符串功能以便支持中文等代码。 –with-pdo-mysql使用 MySQL Native Driver 作为 PDO MySQL 支持库。–with-openssl启用 OpenSSL 支持。–enable-fpm启用 FastCGI 进程管理器PHP-FPM。–enable-sockets启用套接字支持。–enable-sysvshm启用 System V 共享内存支持。–enable-mbstring启用多字节字符串支持。–with-freetype-dir指定 FreeType2 安装路径通常自动检测。–with-jpeg-dir指定 JPEG 安装路径通常自动检测。–with-png-dir指定 PNG 安装路径通常自动检测。–with-zlib启用 Zlib 支持通常自动检测。–with-libxml-dir指定 libxml2 安装路径。–enable-xml启用 XML 支持。–with-mhash启用 mhash 支持。–with-bz2启用 BZip2 支持。–enable-maintainer-zts启用线程安全支持仅适用于开发人员。 php.ini配置调整 在lnmp环境中设置主要包括php的配置文件php.ini-development和php.ini-production php.ini-development                开发版样例文件用于学习、测试。 php.ini-production                    生产版样例文件用于实际运营。 创建配置文件 cp php.ini-production /etc /php.ini #提供php-fpm脚本 cp /usr/local/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod x /etc/init.d/php-fpm chkconfig --add php-fpm chkconfig php-fpmon 配置文件部分信息 default_charset UTF-8 //设置默认字符集为utf8 file_uploads On //允许通过PHP网页上传文件 upload_max_filesize 2M // 允许上传的文件大小限制 max_file_uploads 20 //每个http最多允许请求上传的文件数量 post_max_size 8M //每次通过表单post提交的数据量限制 short_open_tag On //允许识别PHP短语法标记即… extensionphp_mysqli.dll //添加mysql支持(修改或添加均可) 修改配置文件 pid run/php-fpm.pid listen 0.0.0.0 :9000 pm.max_children 50 pm.start_servers 5 pm.min_spare_servers 5 pm.max_spare_servers 35 启动php-fpm服务 systemctl start php-fpm netstat -anptl|grep php-fpm 添加防火墙配置 firewall-cmd --permanent --add-port9000/tcp firewall-cmd --reload 添加nginx配置server中添加 location ~ .*\.(php|php5)?$ { root html;fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php;include fastcgi.conf;fastcgi_cache cache_fastcgi;fastcgi_cache_valid 200 302 1h; fastcgi_cache_valid 301 1d;fastcgi_cache_valid any 1m; fastcgi_cache_min_uses 1;fastcgi_cache_use_stale error timeout invalid_header http_500; fastcgi_cache_key http://$host$request_uri; } 完整nginx.conf配置文件例子 user www www;worker_processes 4;worker_cpu_affinity 0001 0010 0100 1000; error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;pid logs/nginx.pid; events { use epoll; worker_connections 65535; multi_accept on; }http { include default_typemime.types; application/octet-stream;#log_format main $remote_addr - $remote_user [$time_local] $request # $status $body_bytes_sent $http_referer # $http_user_agent $http_x_forwarded_for;#access_log logs/access.log main;sendfile on; tcp_nopush on; keepalive_timeout 65; tcp_nodelay on; client_header_buffer_size 4k; open_file_cache max102400 inactive20s; open_file_cache_valid 30s; open_file_cache_min_uses 1; client_header_timeout 15; client_body_timeout 15; reset_timedout_connection on; send_timeout 15; server_tokens off; client_max_body_size 10m;fastcgi_connect_timeout 600; fastcgi_send_timeout 600; fastcgi_read_timeout 600; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; fastcgi_temp_path /usr/local/nginx1.10/nginx_tmp; fastcgi_intercept_errors on; fastcgi_cache_path /usr/local/nginx1.10/fastcgi_cache levels1:2 keys_zonecache_fastcgi:128m inactive1d max_size10g;gzip on; gzip_min_length 2k; gzip_buffers 4 32k; gzip_http_version 1.1; gzip_comp_level 6; gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml; gzip_vary on; gzip_proxiedany; server {listen 80;server_name www.csdn-jingyu.com; #charset koi8-r; #access_log logs/host.access.log main;location ~* ^.\.(jpg|gif|png|swf|flv|wma|wmv|asf|mp3|mmf|zip|rar)$ { valid_referers none blocked www.benet.combenet.com;if ($invalid_referer) {#return 302 http://www.benet.com/img/nolink.jpg;return 404; break; } access_log off;} location / {root html;index index.php index.html index.htm; } location ~* \.(ico|jpe?g|gif|png|bmp|swf|flv)$ { expires 30d;#log_not_found off; access_log off; } location ~* \.(js|css)$ { expires 7d;log_not_found off; access_log off; }location /(favicon.ico|roboots.txt) { access_log off;log_not_found off; } location /status { stub_status on; } location ~ .*\.(php|php5)?$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; fastcgi_cache cache_fastcgi; fastcgi_cache_valid 200 302 1h; fastcgi_cache_valid 301 1d; fastcgi_cache_valid any 1m; fastcgi_cache_min_uses 1; fastcgi_cache_use_stale error timeout invalid_header http_500; fastcgi_cache_key http://$host$request_uri; } #error_page 404 /404.html;# redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html;location /50x.html { root html;} } } 重启或重载nginx服务 压力测试 安装httpd-tools软件包使用ab工具 yum -y install httpd-tools ab -c 5000 -n 50000 #地址或者域名 ab命令 选项参数说明-n请求数执行的请求总数-c并发数同时发送的请求个数-t时间测试持续的秒数与 -n 二选一-pPOST 文件包含 POST 请求的数据文件-T内容类型POST 请求的内容类型如 application/x-www-form-urlencoded-H自定义头添加自定义 HTTP 头-CCookie设置 Cookie 值-k启用 HTTP KeepAlive在多次请求之间保持连接打开-v详细输出显示更多的细节信息-w以 HTML 表格形式输出将结果以 HTML 表格的形式输出到文件中-x表格标签属性与 -w 一起使用设置 HTML 表格的属性-yCSV 输出将结果以 CSV 格式输出到文件中-ZSSL 加密使用 SSL 加密需要 Apache 2.2.12 或更高版本-zHTTP 压缩使用 HTTP 压缩-i使用 HEAD 方法使用 HTTP HEAD 方法而不是 GET 方法-X使用代理通过指定的代理服务器发送请求-A认证使用基本认证需要用户名和密码-PSSL 私钥文件SSL 私钥文件路径用于客户端证书认证-FSSL 证书格式SSL 证书格式PEM 或 DER-ESSL 证书文件SSL 证书文件路径用于客户端证书认证
http://www.zqtcl.cn/news/665314/

相关文章:

  • 国外有没有专门做靶材的网站做网站用哪个电脑
  • 郑州网站制作郑州网站制作上海网站建设免费推荐
  • php电子商务网站开发建设企业网站都需要啥
  • 从零学做网站如何让客户做网站
  • 关于销售网站建设的短文菜单宣传网站怎么做
  • 学网站开发有前途吗淮南服装网站建设费用
  • 网站外包附近临时工500元一天
  • 国外做logo的网站深圳有哪些软件外包公司
  • 网站加载流量一键生成app软件下载
  • 如何建设网站知乎襄阳做网站公司哪家好
  • 用ai怎么做网站专门做短视频的公司
  • 陶瓷类网站建设免费会员管理软件
  • 网站建设 用户管理一个服务器多个网站好吗
  • php做网站特效wordpress开启xmlrppc
  • 顺义重庆网站建设纪检监察网站建设
  • 网站制作源码企业品牌推广方式有哪些
  • 简述制作网站的流程网站开发后端用什么
  • 长沙好的网站建设公司厦门建网站多少钱
  • wordpress id清0中山网站的优化
  • 泰州网站制作维护服务器调用wordpress
  • 网站建设飠金手指下拉c 网站开发 环境配置
  • 派点网站建设物流公司做网站哪家好
  • 最便宜的外贸自建站平台wordpress 主题 mip
  • wordpress动漫视频网站黄冈网站推广策略
  • 做推广的网站带宽需要多少钱asp网站防攻击
  • 网站企业wordpress需要php几
  • 广州微信网站制作icp备案号查询官网
  • 网站建设 搜狐网络游戏排行榜2020
  • 比较好的做简历的网站更换网站模板
  • 网站如何兼容大多浏览器怎么做运营网站