分享好友 系统运维首页 频道列表

lnamp完整版[linux+apache2.4+php5.6.6+mysql5.6]

apache教程  2023-02-10 02:330
Lnamp环境安装实录

将采用的开源软件:
Apache [WEB动态脚本服务器,做nginx的反向代理  8080端口]
Tengine [WEB静态文件服务器  80端口]
MySQL 
PHP 
1.Apache安装

A.apr安装
wget -c http://mirror.bjtu.edu.cn/apache/apr/apr-1.5.1.tar.gz
tar -zxvf apr-1..5.tar.gz
cd apr-1.5.1

./configure --prefix=/usr/local/apr
make
make install

B.apr-util安装

wget -c wget http://mirror.bjtu.edu.cn/apache/apr/apr-util-1.5.4.tar.gz

tar -zxvf  apr-util-1.5.4.tar.gz

cd apr-util-1.5.4

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make

make install

C.pcre安装

wget -c ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz

tar -zxvf pcre-8.36.tar.gz

cd pcre-8.36

./configure --prefix=/usr/local/pcre

make

make install

D.apache安装

wget -c http://mirror.symnds.com/software/Apache//httpd/httpd-2.4.10.tar.gz

tar -zxvf httpd-2.4.10.tar.gz

cd httpd-2.4.10

./configure --prefix=/usr/local/apache --enable-so-rewrite=prefork 
--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre


如果提示openssl(旧版),运行

yum install openssl-devel

yum update openssl

make

make install
 

E.把apache加入系统service,开机自启动
 

cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

vim /etc/init.d/httpd

# beyound

# chkconfig: 35 85 15

# description: Apache is a World Wide Web server.
 
chmod +x /etc/init.d/httpd

/sbin/chkconfig --add httpd

/sbin/chkconfig --list httpd

ln -s /sbin/chkconfig /usr/bin/chkconfig

ln -s /sbin/service /usr/bin/service

2.MySQL安装

A.准备工作

 
安装一些必须的软件:

yum install cmake automake autoconf libtool gcc g++ bison

yum install ncurses-devel

mkdir -p /data/mysql

mkdir -p /var/run/mysqld

groupadd mysql    //添加一个mysql标准组

useradd -g mysql mysql   //添加mysql用户并加到mysql组中

B.下载安装

wget -c http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.11.tar.gz/from/http://cdn.mysql.com/

tar -zxvf mysql-5.6.11.tar.gz

cd mysql-5.6.11

cmake

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql   #安装路径

-DMYSQL_DATADIR=/data/mysql/               #数据文件存放位置

-DSYSCONFDIR=/etc                          #my.cnf路径

-DWITH_MYISAM_STORAGE_ENGINE=1             #支持MyIASM引擎

-DWITH_INNOBASE_STORAGE_ENGINE=1           #支持InnoDB引擎

-DWITH_MEMORY_STORAGE_ENGINE=1             #支持InnoDB引擎

-DWITH_READLINE=1                          #快捷键功能(我没用过)

-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock         #连接数据库socket路径

-DMYSQL_TCP_PORT=3306                      #端口

-DENABLED_LOCAL_INFILE=1                   #允许从本地导入数据

-DWITH_PARTITION_STORAGE_ENGINE=1          #安装支持数据库分区

-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk      #安装需要的字符集

-DDEFAULT_CHARSET=utf8                     #默认字符

-DDEFAULT_COLLATION=utf8_general_ci        #默认字符集-DMYSQL_USER=mysql

如果安装过程中报错,解决错误后重新cmake前需删除CMakeCache.txt文件

make

make install
 
C.配置

配置文件

这一步中需要注意的是my.cnf的加载顺序,Linux优先级从高到低
/etc/my.cnf->/etc/mysql/my.cnf->SYSCONFDIR/my.cnf->$MYSQL_HOME/my.cnf,
高优先级的my.cnf设置会覆盖低优先级的my.cnf,所以一般把config文件copy到etc中即可。

#如果/etc下没有my.cnf

cp support-files/my-medium.cnf /etc/my.cnf

vim /etc/my.cnf
 
[client]

default-character-set=utf8

port=3306

[mysqld_safe]

log-error=/var/log/www/mysql/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid
 
[mysqld]

datadir=/var/lib/mysql

#socket=/var/lib/mysql/mysql.sock

socket=/tmp/mysqld.sock

user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

wait-timeout = 30

max_connections = 512

max_allowed_packet=64M

slow_query_log

slow_query_log_file=/var/log/www/mysql/slow.log

log-error = /var/log/www/mysql/error.log

#数据目录的权限

chown mysql.mysql -R /data/mysql

chown -R mysql:mysql /var/run/mysqld

chmod +x /usr/local/mysql

chown -R mysql.mysql /usr/local/mysql
 
#数据初始化

/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf 
--basedir=/usr/local/mysql --datadir=/data/mysql --user=mysql

#设置软连接使mysql,  mysqldump,  mysqladmin这三个bin命令能在shell中直接运行

ln -s /usr/local/mysql/bin/mysql /usr/bin

ln -s /usr/local/mysql/bin/mysqldump /usr/bin

ln -s /usr/local/mysql/bin/mysqladmin /usr/bin

#启动MySQL

/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf
 --user=mysql --datadir=/data/mysql &
 
#配置开机自启动

vim /etc/rc.local 

添加

/usr/local/mysql/bin/mysqld_safe 
--defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql &

#修改mysql密码

UPDATE user SET password=PASSWORD("newpassword") WHERE user='root';

FLUSH PRIVILEGES;

create database db_test;

B.创建一个新用户用于管理 db_test 数据库

insert into mysql.user(Host,User,Password) 
values("localhost","admin",password("newpassword"));

flush privileges;

C.赋予权限

grant all privileges on db_test.* to db_test@localhost identified by 'newpassword';
3.Tengine[Nginx]安装

A.准备工作

需要下载的东西

wget -c http://zlib.net/zlib-1.2.8.tar.gz

tar -zxvf zlib-1.2.8.tar.gz

wget -c http://www.openssl.org/source/openssl-1.0.1e.tar.gz

tar -zxvf openssl-1.0.1e.tar.gz

wget http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz
 
tar zxvf ngx_cache_purge-2.3.tar.gz 

groupadd www    //添加一个www标准组

useradd -g www www   //添加www用户并加到www组中 

B.下载安装

wget -c http://tengine.taobao.org/download/tengine-2.1.0.tar.gz

tar -zxvf tengine-2.1.0.tar.gz

cd tengine-2.1.0

./configure --user=www --group=www --prefix=/usr/local/nginx 
--with-http_stub_status_module --with-http_sub_module --with-http_realip_module 
--with-http_flv_module --with-http_dav_module --with-http_gzip_static_module  
--with-http_addition_module --with-http_ssl_module 
--with-openssl=../openssl-1.0.1h 
--with-pcre=../pcre-8.36 
--with-zlib=../zlib-1.2.8 
--add-module=/usr/local/src/ngx_cache_purge-2.3

make 

make install  

C.配置

vim /etc/init.d/nginx

#! /bin/sh

# Author: rui ding
 
# Modified: Geoffrey Grosenbach http://topfunky.com
 
# Modified: Clement NEDELCU

# Reproduced with express authorization from its contributors

set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

DESC="nginx daemon"

NAME=nginx

DAEMON=/usr/local/nginx/sbin/$NAME

SCRIPTNAME=/etc/init.d/$NAME
 
# If the daemon file is not found, terminate the script.

test -x $DAEMON || exit 0

start() {
  $DAEMON || echo -n " already running"
}

stop() {

  $DAEMON -s quit || echo -n " not running"
}

reload() {
$DAEMON
-s reload || echo -n " could not reload" } case "$1" in start) echo -n "Starting $DESC: $NAME" start echo "." ;; stop) echo -n "Stopping $DESC: $NAME" stop echo "." ;; reload) echo -n "Reloading $DESC configuration..." reload echo "reloaded." ;; restart) echo -n "Restarting $DESC: $NAME" stop # Sleep for two seconds before starting again, this should give the # Nginx daemon some time to perform a graceful stop. sleep 2 start
echo "." ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload}" >&2 exit 3 ;; esac exit 0 chmod +x /etc/init.d/nginx service nginx start service nginx reload service nginx restart service nginx stop vim /etc/rc.local 添加一行 /usr/local/nginx/sbin/nginx & 4.PHP编译安装 A.yum安装相关库包 yum install gd-devel php-gd yum install zlib zlib-devel yum install freetype-devel freetype-demos freetype-utils yum install libpng libpng-devel libpng10 libpng10-devel yum install libjpeg libjpeg-devel yum install ImageMagick yum install flex yum install ImageMagick-devel yum install libxml2 libxml2-devel yum install libxml2 curl curl-devel yum -y install libtool libtool-ltdl-devel yum install mhash-devel yum install patch B.可能需要源码编译的包 wget -c ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz tar -zxvf libmcrypt-2.5.7.tar.gz cd libmcrypt-2.5.7 ./configure --prefix=/usr/local/libmcrypt make && make install wget -c http://iweb.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz tar -zxvf mhash-0.9.9.9.tar.gz cd mhash-0.9.9.9 ./configure --prefix=/usr/local/libmhash make && make install C.编译安装 wget -c http://cn2.php.net/get/php-5.6.6.tar.gz/from/this/mirror tar -zxvf php-5.6.6.tar.gz cd php-5.6.6 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-apxs2=/usr/local/apache/bin/apxs --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-sysvshm
--enable-sysvmsg --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-fastcgi --enable-force-cgi-redirect --enable-mbstring --with-mcrypt=/usr/local/libmcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --enable-ftp --enable-sigchild --with-pear --enable-cli --enable-exif --enable-calendar --with-bz2 --enable-pdo
--with-pdo-mysql --enable-freetype --disable-fileinfo configure: error: Cannot find ldap.h yum install openldap yum install openldap-devel Configure: error: Please reinstall the BZip2 distribution centos: yum install bzip2 bzip2-devel 错误:configure: error: Cannot find ldap libraries in /usr/lib 解决办法:cp -frp /usr/lib64/libldap* /usr/lib/ 错误:configure: error: Unable to find your mysql installation 解决办法:ln -s /usr/local/mysql/bin/mysql_config /usr/bin/mysql_config 编译出错后重新编译时需先make clean再make make make install 修改apache的配置文件httpd.conf vim /usr/local/apache/conf/httpd.conf
然后在文本最后面添加 LoadModule php5_module modules
/libphp5.so
(注意,在apache安装目录下,modules下有libphp5.so,这是php安装时添加进去的,如果没有,php,你需要重装下) AddType application
/x-httpd-php .php AddType application/x-httpd-php .html cp php.ini-production /usr/local/php/etc/php.ini 5.环境整合 A.整合apache mkdir -p /home/www/test.com chown -R www.www /home/www apache将被nginx代理,因此将apache的默认监听端口改为8080 vim /usr/local/apache/conf/httpd.conf 将hosts定向到 Include conf/extra/httpd-vhosts.conf Listen 8080 User www Group www <IfModule dir_module> DirectoryIndex index.php index.html index.htm </IfModule> vim /usr/local/apache/conf/extra/httpd-vhosts.conf 将里面的*:80全部改成yourdomain.name:8080 并添加虚拟hosts <VirtualHost *:8080> ServerAdmin webmaster@a.test.com DocumentRoot "/home/www/test.com" DirectoryIndex index.php index.html ServerName a.test.com <Directory "/home/www/test.com"> AllowOverride None Options None Require all granted </Directory> ErrorLog "/var/log/www/apache/a.test.com-error_log" CustomLog "/var/log/www/apache/a.test.com-access_log" common </VirtualHost> vim /home/www/test.com/phpinfo.php <?php echo phpinfo(); ?> service httpd start
访问http:
//a.test.com:8080/phpinfo.php B.配置php-fpm cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf #开启php-fpm慢脚本日志 request_slowlog_timeout = 30 slowlog = /var/log/www/php/php-fpm.log.slow #脚本等待时间 request_terminate_timeout = 120 pid = /usr/local/php/var/run/php-fpm.pid error_log = /var/log/www/php/php-fpm.log.error log_level = notice user = www group = www listen = 127.0.0.1:9000 pm = dynamic pm.max_children = 100 pm.start_servers = 10 pm.min_spare_servers = 5 pm.max_spare_servers = 100 pm.max_requests = 1000 /usr/local/php/sbin/php-fpm #将php-fpm整合成系统服务 vim /etc/init.d/php-fpm #! /bin/sh ### BEGIN INIT INFO # Provides: php-fpm # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts php-fpm # Description: starts the PHP FastCGI Process Manager daemon ### END INIT INFO prefix=/usr/local/php exec_prefix=${prefix} php_fpm_BIN=${exec_prefix}/sbin/php-fpm php_fpm_CONF=${prefix}/etc/php-fpm.conf php_fpm_PID=${prefix}/var/run/php-fpm.pid php_opts="--fpm-config $php_fpm_CONF" wait_for_pid () { try=0 while test $try -lt 35 ; do case "$1" in 'created') if [ -f "$2" ] ; then try='' break fi ;; 'removed') if [ ! -f "$2" ] ; then try='' break fi ;; esac echo -n . try=`expr $try + 1` sleep 1 done } case "$1" in start) echo -n "Starting php-fpm " $php_fpm_BIN $php_opts if [ "$?" != 0 ] ; then echo " failed" exit 1 fi wait_for_pid created $php_fpm_PID if [ -n "$try" ] ; then echo " failed" exit 1 else echo " done" fi ;; stop) echo -n "Gracefully shutting down php-fpm " if [ ! -r $php_fpm_PID ] ; then echo "warning, no pid file found - php-fpm is not running ?" exit 1 fi kill -QUIT `cat $php_fpm_PID` wait_for_pid removed $php_fpm_PID if [ -n "$try" ] ; then echo " failed. Use force-quit" exit 1 else echo " done" fi ;; force-quit) echo -n "Terminating php-fpm " if [ ! -r $php_fpm_PID ] ; then echo "warning, no pid file found - php-fpm is not running ?" exit 1 fi kill -TERM `cat $php_fpm_PID` wait_for_pid removed $php_fpm_PID if [ -n "$try" ] ; then echo " failed" exit 1 else echo " done" fi ;; restart) $0 stop $0 start ;; reload) echo -n "Reload service php-fpm " if [ ! -r $php_fpm_PID ] ; then echo "warning, no pid file found - php-fpm is not running ?" exit 1 fi kill -USR2 `cat $php_fpm_PID` echo " done" ;; *) echo "Usage: $0 {start|stop|force-quit|restart|reload}" exit 1 ;; esac chmod +x /etc/init.d/php-fpm service php-fpm start service php-fpm stop service php-fpm reload service php-fpm restart #开机启动 vim /etc/rc.local 添加一行 /usr/local/php/sbin/php-fpm & C.Nginx整合 mkdir /usr/local/nginx/conf/vhosts vim /usr/local/nginx/conf/nginx.conf user www www; worker_processes 8; error_log /var/log/www/nginx/error.log crit; #error_log /var/log/www/nginx/error.log notice; #error_log /var/log/www/nginx/error.log info; #pid logs/nginx.pid; worker_rlimit_nofile 65535; events { use epoll; worker_connections 1024; } http { include mime.types; default_type 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"'; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 8m; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; include vhosts/*.conf; }
vim /usr/local/nginx/conf/vhosts/a.test.com.conf #反向代理 upstream www.test { a.test.com:8080; } server { listen 80; server_name www.test.com; charset utf-8; root /home/www/www.test; location / { index index.php index.html index.htm; if (!-e $request_filename) { #rewrite ^(.*)$ /index.php?s=$1 last; #break; } } #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; } location ~ \.php$ { #開啟支持php fastcgi_pass 127.0.0.1:9000; #php fastcgi服務地址及端口 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } service nginx reload D.Apache+nginx+php反向代理 vim /usr/local/nginx/conf/vhosts/a.test.com.conf #反向代理 upstream www.test{ server a.test.com:8080; } server { listen 80; server_name www.test.com; charset utf-8; root /home/www/test.com; location / { index index.php index.html index.htm; } #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; } location ~ \.php$ { #fastcgi_pass 127.0.0.1:9000; #php fastcgi服務地址及端口 #fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #include fastcgi_params; proxy_pass
http://www.test; #apache反向代理 proxy_pass_header User-Agent; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 512k; proxy_buffers 4 512k; proxy_busy_buffers_size 512k; proxy_temp_file_write_size 512k; } } service nginx reload 再访问 http://www.test.com/phpinfo.php 系统已经用apache来解析动态请求了,反向代理配置正确 完成

 

 
 
 

查看更多关于【apache教程】的文章

展开全文
相关推荐
反对 0
举报 0
评论 0
图文资讯
热门推荐
优选好物
更多热点专题
更多推荐文章
Hadoop中mapreduce运行WordCount程序报错Error: java.io.IOException: Type mismatch in key from map: expected o
这个问题是因为map的方法参数与继承mapper定义的参数类型不一致导致的,应该将Mapper的key参数类型设置成Object,就可以解决这个问题 

0评论2023-03-08965

[转]用apache反向代理解决单外网ip对应内网多个web主机的问题
用apache反向代理解决单外网ip对应内网多个web主机的问题  转载一个有独立外网IP,需内网服务器对外发布的例子,是应用apache虚拟主机的。来源地址:http://www.itshantou.com/Servers/web/06/10/44219.html    几年前开始在学校的服务器上建网站,那时

0评论2023-02-10583

Apache service named reported the following error(OS 10055)由于系统缓冲区空间不足或队列已满解决办法?
apache启动失败报错:The Apache service named reported the following error: AH00451: no listening sockets available, shutting down . The Apache service named reported the following error: (OS 10055)由于系统缓冲区空间不足或队列已满,不能执行

0评论2023-02-10403

struts布局管理---SiteMesh一个优于Apache Tiles的Web页面布局、装饰框架
1. SiteMesh的基本原理       一个请求到服务器后,如果该请求需要sitemesh装饰,服务器先解释被请求的资源,然后根据配置文件 获得用于该请求的装饰器,最后用装饰器装饰被请求资源,将结果一同返回给客户端浏览器。 2. 如何使用SiteMesh    这里以st

0评论2023-02-10726

linux 安装 apache2.2.31
 Linux下安装和配置Apache 概要:本文介绍在CentOS5.4 Linux中安装和配置Apache2.2.14,并且实现Apache和Tomcat6的整合。文章分为三部分,分别是删除系统自带的Apache、安装Apache2.2.14和配置Apache2.2.14。 文章中介绍的知识也可以在其它版本的Linux中

0评论2023-02-10408

apache下ab.exe使用方法。。 apache ab工具
自己在cmd中写了半天的路径也没有写对。。最后网上的一个哥们告诉我说没有共同语言了。。。毛线啊 差距确实很大!大能猫死panda早晚干掉你,叫你丫整天嘲讽我!比如我的ab.exe在D盘的wamp文件夹下apache文件夹下bin文件夹下。那么在cmd中可以这么写:"D:\wamp

0评论2023-02-10478

CentOS 下的apache服务器配置与管理
一、WEB服务器与Apache1、web服务器与网址2、Apache的历史3、补充http://www.netcraft.com/可以查看apache服务器的市场占有率同时必须注意的是ngnix,正处于强势增长的上升时期,大有和apache一争天下的感觉,真是后生可畏~~~二、Apache服务器的管理命令1、命

0评论2023-02-10950

apache 的FTPClient使用以及注意事项
      tomcat+apache+jk进行集群后,图片要进行共享,经过网上的搜索可以有多种方式实现。        一种是使用jcifs。jcifs可以实现网络***享文件的读写,但是前提是,文件必须共享,还要在同一个局域网内。所以如果电脑上禁止了文件共享的话,就

0评论2023-02-10427

apache错误02:安装完后,系统找不到指定的文件 No installed service named "Apache2"的解决办法
解决办法:在“开始 -〉运行”处输入 cmd 回车,转到apache的安装目录,然后进入bin 目录,即cd bin ,在这里敲入 apache.exe -k install 后回车,然后重启Apache 就OK了。

0评论2023-02-10851

Apache提示You don't have permission to access / on this server 解决
 ;建议针对/private/var/log/apache2/中error来看[Sun Jun 02 18:00:37.760853 2019] [core:error] [pid 1677] (13)Permission denied: [client 127.0.0.1:53454] AH00035: access to / denied (filesystem path ‘/Users/sf/Documents/phpstorm’) because

0评论2023-02-10912

windows Apache 配置支持HTTPS的SSL证书
在设置Apache + SSL之前, 需要做:安装Apache, 下载安装Apache时请下载带有ssl版本的Apache安装程序.并且ssl需要的文件在如下的位置:     [Apache安装目录]/modules/ mod_ssl.so    [Apache安装目录]/bin/ openssl.exe, libeay32.dll, ssleay32.dll, ope

0评论2023-02-10924

mysql_pconnect的水挺深,apache下的数据库长连接
  php的mysql持久化连接,美好的目标,却拥有糟糕的口碑,往往令人敬而远之。这到底是为啥么。近距离观察后发现,这家伙也不容易啊,要看apache的脸色,还得听mysql指挥。  对于做为apache模块运行的php来说,要实现mysql持久化连接,首先得取决于apache这个

0评论2023-02-10314

网页504超时 apache php
1. 修改apache 配置apache-default.conf  timeout设置成12002. 修改php.ini 配置php.inimax_execution_time = 1200max_input_time = 1200max_execution_time = 1200 后来发现还没有解决问题,到60s就超时了排查到合作的一个代理https的服务器,他们默认60s

0评论2023-02-10635

更多推荐