全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 6235|回复: 13
打印 上一主题 下一主题

[Windows VPS] 求助编译安装php代码说明!

[复制链接]
跳转到指定楼层
1#
发表于 2013-8-25 23:15:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
500金钱
本帖最后由 每次醒来 于 2013-8-26 03:36 编辑

CentOS  6.4系统
  1. mysql 直接  yum install mysql mysql-server
复制代码
  1. nginx  自己编译安装 ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-cc-opt='-O3'
复制代码
程序不支持php5.4  不会编译 高手给了我以下 2句代码 求详细说明 求飘红 路径啥的说明

第一句代码如下
if cat /etc/redhat-release | grep 'CentOS release 5';then rpm -ivh http://download4.fedora.redhat.com/pub/epel/5/`uname -i`/epel-release-5-4.noarch.rpm;fi
if cat /etc/redhat-release | grep 'CentOS release 6';then rpm -ivh http://download4.fedora.redhat.com/pub/epel/6/`uname -i`/epel-release-6-8.noarch.rpm; fi
yum -y --skip-broken install gcc  gcc-c++ libtool-libs libtool autoconf subversion zip unzip  wget crontabs iptables file bison patch mlocate flex diffutils automake imake make cmake kernel-devel cpp  vim-minimal \
libevent-devel freetype-devel libxml2-devel gd gd-devel libjpeg-devel libpng-devel ncurses-devel zlib-devel  \
curl-devel readline-devel openssl-devel  glibc-devel  glib2-devel bzip2-devel e2fsprogs-devel libidn-devel  gettext-devel expat-devel libcap-devel  libtool-ltdl-devel pam-devel \
libxslt-devel libc-client-devel freetds-devel unixODBC-devel libtidy-devel libXpm-devel krb5-devel libicu-devel icu \
pcre-devel  libmcrypt-devel mhash-devel
if [ `uname -i` == x86_64 ]; then ln -s /usr/lib64/{libpcre*,libjpeg.so,libpng.so,libXpm.so,libc-client.so,libkrb5.so,libexpat.so,libevent.so} /usr/lib/;fi



第二句代码如下
wget -c http://us.php.net/get/php-5.3.25.tar.gz/from/us2.php.net/mirror
tar xzf php-5.3.25.tar.gz
cd php-5.3.25
wget -c http://pecl.php.net/get/memcache-3.0.6.tgz
tar zxf memcache-3.0.6.tgz
mv memcache-3.0.6 ext/memcache
rm -f configure
./buildconf --force
./configure --prefix=/opt/php53 --with-config-file-path=/opt/php53/etc --with-config-file-scan-dir=/opt/php53/etc/php.d \
--without-pear --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml \
--enable-magic-quotes --enable-mbstring --enable-soap --enable-sockets --enable-wddx --enable-zip --with-curl \
--with-freetype-dir=/usr --with-gd --with-gettext --with-imap --with-imap-ssl --with-png-dir  --with-jpeg-dir=/usr \
--with-libexpat-dir=/usr --with-libxml-dir=/usr --with-mcrypt --with-mhash  \
--with-pdo-mysql  --with-mysql=/usr --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/bin/mysql_config \
--with-openssl --with-pcre-regex=/usr/local --with-png-dir=/usr --with-tidy --with-unixODBC=/usr --with-xmlrpc \
--with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr --with-kerberos --enable-intl=shared \
--enable-memcache --with-zlib-dir;
make -j12
make install













第一句执行完毕会出现

[root@123 ]#if [ `uname -i` == x86_64 ]; then ln -s /usr/lib64/{libpcre*,libjpeg.so,libpng.so,libXpm.so,libc-client.so,libkrb5.so,libexpat.so,libevent.so} /usr/lib/;fi



执行第二句会出现这样的...... 那里错了
./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: You need autoconf 2.59 or lower to build this version of PHP.
           You are currently trying to use 2.63
           Most distros have separate autoconf 2.13 or 2.59 packages.
           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist.
           Install autoconf2.13 and set the PHP_AUTOCONF env var to
           autoconf2.13 and try again.
make: *** [buildmk.stamp] Error 1
[root@123 php-5.3.25]# ./configure --prefix=/opt/php53 --with-config-file-path=/opt/php53/etc --with-config-file-scan-dir=/opt/php53/etc/php.d \
> --without-pear --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml \
> --enable-magic-quotes --enable-mbstring --enable-soap --enable-sockets --enable-wddx --enable-zip --with-curl \
> --with-freetype-dir=/usr --with-gd --with-gettext --with-imap --with-imap-ssl --with-png-dir  --with-jpeg-dir=/usr \
> --with-libexpat-dir=/usr --with-libxml-dir=/usr --with-mcrypt --with-mhash  \
> --with-pdo-mysql  --with-mysql=/usr --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/bin/mysql_config \
> --with-openssl --with-pcre-regex=/usr/local --with-png-dir=/usr --with-tidy --with-unixODBC=/usr --with-xmlrpc \
> --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr --with-kerberos --enable-intl=shared \
> --enable-memcache --with-zlib-dir;
-bash: ./configure: No such file or directory
[root@123 php-5.3.25]# make -j12
make: *** No targets specified and no makefile found.  Stop.

最佳答案

查看完整内容

可以的,执行/opt/php53/sbin/php-fpm可以启动
2#
发表于 2013-8-25 23:15:47 | 只看该作者
每次醒来 发表于 2013-8-25 23:48
fastcgi_pass 127.0.0.1:9000;

这个可以吗?   php停止 启动命令是啥?

可以的,执行/opt/php53/sbin/php-fpm可以启动
3#
发表于 2013-8-25 23:36:32 | 只看该作者
自带的,./configure --help|tee ./configurehelp.txt&&vim configure.txt
4#
发表于 2013-8-25 23:39:11 | 只看该作者
启动nginx的话,根据你的编译参数,执行 /usr/local/nginx/sbin/nginx,停止就执行pkill nginx
5#
 楼主| 发表于 2013-8-25 23:41:45 | 只看该作者
★Extreme★ 发表于 2013-8-25 23:39
启动nginx的话,根据你的编译参数,执行 /usr/local/nginx/sbin/nginx,停止就执行pkill nginx ...

nginx的我有脚本 , 就是不知道编译php这2句话里面啥路径 搞不明白还有怎么和nginx 关联?
6#
发表于 2013-8-25 23:42:14 | 只看该作者
按照你编译PHP的参数,fpm应该是listen 127.0.0.1:9000
7#
发表于 2013-8-25 23:46:22 | 只看该作者
每次醒来 发表于 2013-8-25 23:41
nginx的我有脚本 , 就是不知道编译php这2句话里面啥路径 搞不明白还有怎么和nginx 关联? ...


按照你的参数,PHP在/opt/php53,监听的是127.0.0.1:9000,nginx那就用fastcgi_pass unix:127.0.0.1:9000连接PHP

点评

谢谢 我去配置看看  发表于 2013-8-26 00:00
8#
 楼主| 发表于 2013-8-25 23:48:44 | 只看该作者
★Extreme★ 发表于 2013-8-25 23:46
按照你的参数,PHP在/opt/php53,监听的是127.0.0.1:9000,nginx那就用fastcgi_pass unix:127.0.0.1:9000 ...

fastcgi_pass 127.0.0.1:9000;

这个可以吗?   php停止 启动命令是啥?
9#
发表于 2013-8-25 23:54:30 | 只看该作者
好困,我睡觉,你看nginx.conf的注释,php的location那有说明。
10#
 楼主| 发表于 2013-8-26 00:23:14 | 只看该作者
本帖最后由 每次醒来 于 2013-8-26 02:23 编辑
★Extreme★ 发表于 2013-8-25 23:54
好困,我睡觉,你看nginx.conf的注释,php的location那有说明。



第一句执行完毕会出现

[root@123 ]#if [ `uname -i` == x86_64 ]; then ln -s /usr/lib64/{libpcre*,libjpeg.so,libpng.so,libXpm.so,libc-client.so,libkrb5.so,libexpat.so,libevent.so} /usr/lib/;fi



执行第二句会出现这样的...... 那里错了
./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: You need autoconf 2.59 or lower to build this version of PHP.
           You are currently trying to use 2.63
           Most distros have separate autoconf 2.13 or 2.59 packages.
           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist.
           Install autoconf2.13 and set the PHP_AUTOCONF env var to
           autoconf2.13 and try again.
make: *** [buildmk.stamp] Error 1
[root@123 php-5.3.25]# ./configure --prefix=/opt/php53 --with-config-file-path=/opt/php53/etc --with-config-file-scan-dir=/opt/php53/etc/php.d \
> --without-pear --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml \
> --enable-magic-quotes --enable-mbstring --enable-soap --enable-sockets --enable-wddx --enable-zip --with-curl \
> --with-freetype-dir=/usr --with-gd --with-gettext --with-imap --with-imap-ssl --with-png-dir  --with-jpeg-dir=/usr \
> --with-libexpat-dir=/usr --with-libxml-dir=/usr --with-mcrypt --with-mhash  \
> --with-pdo-mysql  --with-mysql=/usr --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/bin/mysql_config \
> --with-openssl --with-pcre-regex=/usr/local --with-png-dir=/usr --with-tidy --with-unixODBC=/usr --with-xmlrpc \
> --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr --with-kerberos --enable-intl=shared \
> --enable-memcache --with-zlib-dir;
-bash: ./configure: No such file or directory
[root@123 php-5.3.25]# make -j12
make: *** No targets specified and no makefile found.  Stop.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-4-14 00:27 , Processed in 0.121675 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表