centos64位lamp配置第三步:编译php5.3.27
下载php-5.3.27.tar.gz,解压tar -zxvf php-5.3.27,确保已经安装了yum -y install wget gcc-c ncurses ncurses-devel cmake make perl bison openssl openssl-devel gcc* libevent libevent-devel libxml2 libxml2-devel libmcrypt libmcrypt-devel curl-deve
下载php-5.3.27.tar.gz,解压tar -zxvf php-5.3.27,确保已经安装了yum -y install wget gcc-c++ ncurses ncurses-devel cmake make perl bison openssl openssl-devel gcc* libevent libevent-devel libxml2 libxml2-devel libmcrypt libmcrypt-devel curl-devel libpng-devel libtool-ltdl-devel libjpeg* libpng* freetype* zlib zlib-devel openldap openldap-devel libxslt-devel* bzip2-devel
执行:cp -frp /usr/lib64/libldap* /usr/lib/
安装mhash:
# tar zxvf mhash-0.9.9.tar.gz<br> # cd mhash-0.9.9
# mkdir -p /usr/local/mhash<br> # ./configure prefix=/usr/local/mhash<br> # make && make install<br>
安装libmcrpt:
wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz<br>
tar -zxvf libmcrypt-2.5.7.tar.gz <br> cd libmcrypt-2.5.7 <br> mkdir -p /usr/local/libmcrytp <br> ./configure prefix=/usr/local/libmcrytp/ #默认也可以<br> make<br> make install <br>
这些准备环境。
<br>
进入php-5.3.27目录,执行./configure,如果是在nginx之前编译,要去掉
<span><strong>--with-apxs2=/usr/local/apache/bin/apxs,--with-iconv=/usr/local/libiconv改为--with-iconv</strong></span>
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-openssl --with-zlib --with-bz2 --with-gettext --with-mhash --with-mcrypt --with-iconv=/usr/local/libiconv --with-curl --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-pdo --enable-gd-native-ttf --enable-bcmath --enable-mbstring --enable-zip --enable-soap --enable-sockets --enable-ftp --without-pear --enable-fpm --enable-inline-optimization
下面是参考:
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-iconv-dir=/usr/local/libiconv --with-libxml-dir=/usr --enable-xml --with-curl --with-curlwrappers --with-mhash --with-mcrypt=/usr/local/libmcrytp --with-gd --enable-gd-native-ttf --with-xsl --with-openssl --with-ldap --with-ldap-sasl --with-xmlrpc --without-pear --with-plugins=innobase --without-debug --with-charset=utf8 --with-collation=utf8_unicode_ci --with-extra-charsets=utf8 --with-pthread --enable-static --enable-safe-mode --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-thread-safe-client --with-mysqld-user=mysql --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-pdo --with-big-tables --without-debug --with-jpeg-dir=/usr/lib --with-png-dir --with-freetype-dir --with-zlib --enable-mbstring --with-pear --enable-mbregex --enable-zend-multibyte --enable-sockets --enable-soap --enable-exif --with-mhash=/usr/local/mhash --with-apxs2=/usr/local/apache/bin/apxs --enable-fpm --enable-inline-optimization<br>完成后会看到thank you for use php字样
make
make install
没有出现error就ok了。
cp php.ini-production /usr/local/php/etc/php.ini
sed -i 's/;date.timezone =/date.timezone = Asia/Shanghai/g' /usr/local/php/etc/php.ini<br> sed -i 's/short_open_tag = Off/short_open_tag = On/g' /usr/local/php/etc/php.ini<br> sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /usr/local/php/etc/php.ini<br> sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /usr/local/php/etc/php.ini<br> sed -i '262i output_buffering = On' /usr/local/php/etc/php.ini<br>
配置php-fpm:
cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
<br>
# cd /usr/local/php/etc/
# cp php-fpm.conf.default php-fpm.conf
# vi php-fpm.conf //一般配置的依据如下
内存小于4G服务器(值可逐级递减):
修改如下参数:
pm=dynamic
pm.max_children=40
pm.start_servers=10
pm.min_spare_servers=10
pm.max_spare_servers=40
******************************
内存大于4G服务器(值可逐级递增):
修改如下参数:
pm=static
pm.max_children=100
<br>
<br>
安装pdo-mysql:
tar zxvf PDO_MYSQL-1.0.2.tgz<br>
cd PDO_MYSQL-1.0.2/<br>
/usr/local/php/bin/phpize<br>
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql<br>
make && make install<br>
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/ /usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
make && make install
<br>
修改Php.ini:
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/"
extension = "pdo_mysql.so"
service php-fpm start
vim /usr/local/apache/conf/httpd.conf
查找AddType
添加:AddType application/x-httpd-php .php
查找DirectoryIndex,在DirectoryIndex后面添加index.php
DirectoryIndex index.php index.html 查找:LoadModule php5_module modules/libphp5.so 如果没有就添加,使用phpinfo()测试,能输出php信息就ok了。

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

标题:Linux系统中GDM的工作原理及配置方法在Linux操作系统中,GDM(GNOMEDisplayManager)是一种常见的显示管理器,用于控制图形用户界面(GUI)登录和用户会话管理。本文将介绍GDM的工作原理和配置方法,以及提供具体的代码示例。一、GDM的工作原理GDM是GNOME桌面环境下的显示管理器,负责启动X服务器并提供登录界面,用户输

PyCharm是一款强大的集成开发环境(IDE),而PyTorch是深度学习领域备受欢迎的开源框架。在机器学习和深度学习领域,使用PyCharm和PyTorch进行开发可以极大地提高开发效率和代码质量。本文将详细介绍如何在PyCharm中安装配置PyTorch,并附上具体的代码示例,帮助读者更好地利用这两者的强大功能。第一步:安装PyCharm和Python

了解LinuxBashrc:功能、配置与使用方法在Linux系统中,Bashrc(BourneAgainShellruncommands)是一个非常重要的配置文件,其中包含了系统启动时自动运行的各种命令和设置。Bashrc文件通常位于用户的家目录下,是一个隐藏文件,它的作用是为用户自定义设置Bashshell的环境。一、Bashrc的功能设置环境

Win11系统如何配置工作组工作组是一种在局域网中连接多台计算机的方式,它允许计算机之间共享文件、打印机和其他资源。在Win11系统中,配置工作组非常简单,只需按照以下步骤操作即可。步骤1:打开“设置”应用程序首先,点击Win11系统的“开始”按钮,然后在弹出的菜单中选择“设置”应用程序。你也可以使用快捷键“Win+I”打开“设置”。步骤2:选择“系统”在“设置”应用程序中,你会看到多个选项。请点击“系统”选项,进入系统设置页面。步骤3:选择“关于”在“系统”设置页面中,你会看到多个子选项。请点

MyBatisGenerator是MyBatis官方提供的一个代码生成工具,可以帮助开发人员快速生成符合数据库表结构的JavaBean、Mapper接口以及XML映射文件。在使用MyBatisGenerator进行代码生成的过程中,配置参数的设置是至关重要的。本文将从配置参数的角度出发,深入探讨MyBatisGenerator的

标题:Linux系统中如何配置和安装FTPS,需要具体代码示例在Linux系统中,FTPS是一种安全的文件传输协议,与FTP相比,FTPS通过TLS/SSL协议对传输的数据进行加密,提高了数据传输的安全性。在本文中,将介绍如何在Linux系统中配置和安装FTPS,并提供具体的代码示例。步骤一:安装vsftpd打开终端,输入以下命令安装vsftpd:sudo

Flask安装配置教程:轻松搭建PythonWeb应用的利器,需要具体代码示例引言:随着Python的日益流行,Web开发也成为了Python程序员的必备技能之一。而要进行Python的Web开发,我们需要选择合适的Web框架。在众多的PythonWeb框架中,Flask是一款简洁、易上手且灵活的框架,备受开发者们的青睐。本文将介绍Flask框架的安装、

我们在使用win11系统的时候有时候会需要查看自己的电脑配置,但是也有不少的用户们在询问win11电脑配置在哪里看?其实方法很简单的,用户们可以直接的打开设置下的系统信息,然后就能查看电脑配置信息。下面就让本站来为用户们来仔细的介绍一下win11电脑配置信息如何查找方法吧。win11电脑配置信息如何查找方法方法一:1、点击开始,打开电脑设置。3、在此页面即可查看电脑配置信息。2、在命令提示符窗口中,输入systeminfo回车,即可查看电脑配置。
