CentOS5下安装tfs并使用Nginx做访问.docx_第1页
CentOS5下安装tfs并使用Nginx做访问.docx_第2页
CentOS5下安装tfs并使用Nginx做访问.docx_第3页
CentOS5下安装tfs并使用Nginx做访问.docx_第4页
CentOS5下安装tfs并使用Nginx做访问.docx_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

CentOS 5下安装tfs并使用Nginx做访问看看新闻网看引擎系统运维操作系统环境rootlocalhost # uname -aLinux localhost.localdomain 2.6.18-371.9.1.el5 #1 SMP Tue Jun 10 17:49:56 EDT 2014 x86_64 x86_64 x86_64 GNU/Linuxrootlocalhost # cat /etc/issueCentOSrelease 5.10 (Final)Kernel r on an mrootlocalhost #PS:以下操作我只在如上系统进行验证使用,仅供参考1.更新yum源CentOS 5.6 更新yum源我这里使用的搜狐的源,博友们可以自己穿件源cd /etc/yum.repos.dmv CentOS-Base.repo CentOS-Base.repo.savewget /help/CentOS-Base-sohu.repoyum updateyum makecache2.安装高版本mysqlwget /epel/5/x86_64/epel-release-5-4.noarch.rpmwget /enterprise/5/remi/x86_64/remi-release-5.9-1.el5.remi.noarch.rpmrpm -ivh *.rpmecho priority=1 /etc/yum.repos.d/remi.repoecho priority=1 /etc/yum.repos.d/epel-testing.repoecho priority=1 /etc/yum.repos.d/epel.repo检查mysql 是否有可升级版本。发现有版本可以升级到mysql5.5.11。yum enablerepo=remi list mysql删除操作系统自带的低版本的mysqlyum remove mysql通过新yum源安装高版本的mysqlyum -y enablerepo=remi install mysql mysql-server mysql.x86_64 mysql-devel.x86_643.安装支持包 automake autoconfig 和 libtool验证automake是否安装rpm -qa |grep automake验证autoconfig是否安装 /usr/bin/autoconf -Vauotmake 1.4以上版本需要安装libuuid-devel,zlib-devel,mysql-devel三个开发包查看以安装的rpm包:rpm -qa|grep 包名rpm -qa|grep libuuidrpm -qa|grep zlib-develrpm -qa|grep mysql-devel如果你使用RedHat5.x和Centos 5.x会找不到libuuid-devel包,请看下面。RedHat5.x和Centos 5.x 安装: yum install uuidd安装其它支持包: yum install libtool zlib-devel下面的readline包系统自带了,ncurses包系统默认没有,我也安装,你安不安自已定吧。rootlocatfs local# yum install readline-devel readlinerootlocatfs local# yum install ncurses-devel.x86_64 ncurses.x86_644.安装ext4格式工具rootlocatfs local# yum install e4fsprogs e4fsprogs-devel 加载ext4模块,让系统支持ext4文件系统rootlocatfs local# modprobe ext45.安装tb-common-utilstb-common-utils是淘宝开发使用的一个公共库tbsys是对操作系统服务的封装,tbnet则提供了网络框架。 tbnet和tbsys被作为tb-common-utils被开源了,可以访问 /trac/tb-common-utils/wikiTFS依赖于底层开发包tbnet。tb-common-utils里面含有tbsys和tbnet首先编译安装tblib(tb-common-utils),这里我安装在和tfs同一个路径。(/svn/tb-common-utils/trunk/ tb-common-utils)gtest库是单元测试框架,下面先安装安装gtest下载gtest见本文下面的资源,rootlocatfs local# unzip gtest-1.6.0.ziprootlocatfs local# cd gtest-1.6.0rootlocatfs local# ./configurerootlocatfs local# makerootlocatfs local# cd make/rootlocatfs local# makerootlocatfs local# ./sample1_unittest安装tb-common-utils新建一个下载目录,并进入这个目录。下载源码: 这里下载版本18的因为淘宝开发的东西不往下兼容svn checkout -r 18 /svn/tb-common-utils/trunk/ tb-common-utils编译和安装tbnet, tbsys库ps:建议将这行命令直接写入/.bash_profile,然后执行“. /.bash_profile”修改:rootlocatfs local# vi /etc/profile添加:(计划安装在/usr/local/tb/lib目录)export TBLIB_ROOT=/usr/local/tb/lib生效:rootlocatfs local# source /etc/profilerootlocatfs local# cd tb-common-utils/rootlocatfs local# chmod +x *.shrootlocatfs local# ./build.sh安装完成后,在TBLIB_ROOT表示的目录(/usr/local/tb/lib),应该可以看到include、lib 两个目录。6.编译安装TFS-编译安装tfs (安装到 /usr/local/tfs目录)rootlocatfs local# svn checkout /svn/tfs/tags/release-2.2.10 tfs-2.2.10进入 tfs 目录rootlocatfs local# cd tfs-2.2.10/rootlocatfs local# chmod +x *.shrootlocatfs local# ./build.sh initrootlocatfs local# ./configure prefix=/usr/local/tfs without-tcmallocrootlocatfs local# makerootlocatfs local# make install7.安装nginx-tfs模块TFS模块使用了一个开源的JSON库来支持JSON,先安装yajl-2.0.1分割线yajl-2.0.1 与 gtest 下载免费下载地址在/用户名与密码都是具体下载目录在/2014年资料/7月/31日/CentOS 5下安装tfs并使用Nginx做访问下载方法见/Linux/2013-07/87684.htm分割线rootlocalhost opt# cd lloyd-yajl-12ee82a/rootlocalhost lloyd-yajl-12ee82a# ./configure prefix=/usr/local/yajl & make & make install报错= removing old build files= running CMake in build directory./configure: line 41: cmake: command not foundThe “cmake” program is required to configure yajl.Its available from most ports/packaging systems and 解决办法:yum -y install cmake继续编译通过下载tengine此软件是nginx的升华版本,在nginx上二次开发wget /download/tengine-2.0.3.tar.gz下载nginx-tfs模块wget /alibaba/nginx-tfs/zip/master安装tengine并添加ngix-tfs模块rootlocalhost tengine-2.0.3# ./configure prefix=/usr/local/nginx add-module=/opt/nginx-tfs-master & make & make install报错./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using without-http_rewrite_moduleoption, or install the PCRE library into the system, or build the PCRE librarystatically from the source with nginx by using with-pcre= option.解决办法rootlocalhost tengine-2.0.3# yum -y install pcre-devel继续编译tenginerootlocalhost tengine-2.0.3# ./configure prefix=/usr/local/nginx add-module=/opt/nginx-tfs-master & make & make install启动nginx报错/usr/local/nginx/sbin/nginx: error while loading shared libraries: libyajl.so.2: cannot open shared object file: No such file or directoryxx解决办法rootlocalhost tengine-2.0.3# ln -s /usr/local/lib/libyajl.so.2 /usr/lib64/libyajl.so.2再次测试成功启动nginxrootlocalhost tengine-2.0.3# /usr/local/nginx/sbin/nginx8.使用nginx访问上传图片路径修改nginx配置文件在nginx的http模块中添加upstreamtfs_upstream tfs_ns server 30:8108; type ns; 在nginx的server模块中添加tfs_passserver listen 80; server_name localhost;tfs_keepalive max_cached=100 bucket_count=10;tfs_log “pipe:/usr/sbin/

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论