`
dlp363nj
  • 浏览: 15472 次
社区版块
存档分类
最新评论

CentOS6.2(64)+Nginx1.0.10+PHP5.3.8(FPM)+MySQL5.5.18(PDO)+CoreSeek4.1源码编译

 
阅读更多

CentOS6.2(64)+Nginx1.0.10+PHP5.3.8(FPM)+MySQL5.5.18(PDO)+CoreSeek4.1源码编译
2012年01月05日
  熬夜,两天过后,毫无困意.编译过程,写下来已作参考.
  安装虚拟机:virtualBox
  1.进入BIOS打开VT,并使用CPU-Z查看是否支持EM64T,若不能只好使用32.
  2.配置环境:内存1G(64位比较吃内存),硬盘20G,网络连接方式:Bridged Adapter(桥接)
  3.安装系统:简单分区(主分区[/boot(200) /(8000) /usr(4000)] 扩展分区[/home(4000) swap(4000)]),安装系统为miniDesktop
  4.安装增强功能:
  yum groupinstall "Debelopment Tools"
  yum install kernel-devel-* gcc kernel-headers-*
  export KERN_DIR=/usr/local/kernels/2.6.32-220.2.1.el6.x86_64
  如果失败可以参考:
  http://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest
  https://forums.virtualbox.org/viewtopic.php?t=15679
  部署
  /usr/local/*
  /var/lib/*
  下载源文件
  wget http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.19.tar.gz
  wget http://mirrors.sohu.com/nginx/nginx-1.1.9.tar.gz
  wget http://mirrors.sohu.com/php/php-5.3.6.tar.gz
  wget http://acelnmp.googlecode.com/files/eaccelerator-0.9.6.1.tar.bz2
  wget http://google-perftools.googlecode.com/files/google-perftools-1.8.3.tar.gz
  wget http://mynginx.googlecode.com/files/ImageMagick.tar.gz
  wget http://lnmpp.googlecode.com/files/imagick-2.3.0.tgz
  wget http://mozbuildtools.googlecode.com/files/libiconv-1.13.1.tar.gz
  wget http://lcmp.googlecode.com/files/libmcrypt-2.5.8.tar.gz
  wget http://vps.googlecode.com/files/mcrypt-2.6.8.tar.gz
  wget http://vps.googlecode.com/files/memcache-2.2.5.tgz
  wget http://acelnmp.googlecode.com/files/mhash-0.9.9.9.tar.gz
  wget http://webserver.googlecode.com/files/pcre-8.10.tar.gz
  wget http://vps.googlecode.com/files/PDO_MYSQL-1.0.2.tgz
  wget http://acelnmp.googlecode.com/files/phpMyAdmin-3.4.5-all-languages.tar.bz2
  安装相关库
  yum -y install yum-fastestmirror
  yum -y update
  yum -y install patch make gcc gcc-c++ flex bison
  yum -y install libtool libtool-libs kernel-devel autoconf
  yum -y install libjpeg libjpeg-devel libpng libpng-devel
  yum -y install freetype freetype-devel libxml2 libxml2-devel zlib  zlib-devel
  yum -y install glib2 glib2-devel bzip2 diff*
  yum -y install bzip2-devel ncurses ncurses-devel curl curl-devel  e2fsprogs
  yum -y install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel
  yum -y install openssl openssl-devel vim-minimal
  yum -y install cmake
  编译MySQL
  cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/var/lib/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DSYSCONFDIR=/etc/ -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=on
  编译PHP
  ./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-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-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --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
  Nginx
  server {
  listen 80;
  server_name vps.imcat.in;
  index index.html index.htm index.php;
  root /home/www/webapp;
  location ~
  {
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.php;
  include fastcgi.conf;
  root /home/www/webapp;
  if (-d $request_filename){
  rewrite ^(.*)([^/])$ http://$host/$1$2/ permanent;
  }
  if (!-e $request_filename){
  rewrite ^/(.*\.(js|ico|gif|jpg|png|css|xml|swf|rar|tar|zip|gz))/$1 last;
  rewrite ^(.*) /index.php;
  }
  }
  }
  编译CoreSeek
  安装mmseg
  wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
  tar zxvf coreseek-4.1-beta.tar.gz
  cd coreseek-4.1
  cd mmseg-3.2.14
  ./bootstrap
  ./configure --prefix=/usr/local/mmseg3
  make && make install
  cd ..
  安装CoreSeek
  cd csft-3.2.14
  sh buildconf.sh
  ./configure --prefix=/usr/local/coreseek  --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql
  make && make install
  安装libsphinxclient
  cd api/libsphinxclient
  ./configure
  make && make install
  安装PHP扩展sphinx
  wget http://pecl.php.net/get/sphinx-1.1.0.tgz
  tar zxvf shpinx-1.1.0.tgz
  如果出现以下错误:cannot find input file: src/Makefile.in则执行
  aclocal
  libtoolize
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics