扫描二维码关注官方公众号
返回列表 发布新帖

[盒子/seedbox] CentOS 安装Deluge 1.3.5

3615 3
发表于 2012-10-8 21:46:03 | 查看全部 阅读模式

来吧兄弟,一起玩一起讨论!

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 书剑秀才 于 2012-10-8 21:50 编辑

Core

    python >= 2.5
    twisted >= 8.1
    twisted-web >= 8.1
    pyopenssl
    simplejson (if python < 2.6)
    setuptools
    gettext
    intltool
    pyxdg
    chardet
    geoip-database (optional)
    setproctitle (optional)
    libtorrent >= 0.14 or build the included version
    If building included libtorrent:
        boost >= 1.34.1
        openssl
        zlib

GTK

    python-notify (libnotify python wrapper)
    pygame
    pygtk >= 2.12
    librsvg
    xdg-utils

Web

    mako

1、安装编译环境
1    yum -y install gcc gcc-c++ m4 make automake libtool gettext openssl-devel pkgconfig perl-libwww-perl perl-XML-Parser curl curl-devel libevent-devel libevent libidn-devel zlib-devel openssl-devel which svn
2、安装Python的开发库
1    yum install python26-devel –y #For CentOS 5
2    yum install python-devel –y #For CentOS 6
3、Twisted
1    wget http://pypi.python.org/packages/ ... sted-12.2.0.tar.bz2
2    tar -xjf Twisted-12.2.0.tar.bz2
3    cd Twisted-12.2.0
4    python setup.py install
5    cd ..
测试
1    python
2    import twisted
3    #No errors means we have successfully installed twisted, Ctrl+D to exit python environment
4、pyOpenSSL
1    wget https://launchpad.net/pyopenssl/ ... OpenSSL-0.11.tar.gz
2    tar -xzf pyOpenSSL-0.11.tar.gz
3    cd pyOpenSSL-0.11
4    python setup.py install
5    cd ..
5、setuptools
1    wget http://pypi.python.org/packages/ ... ls-0.6c11-py2.6.egg
2    sh setuptools-0.6c11-py2.6.egg
6、zope.interface
1    wget http://pypi.python.org/packages/ ... erface-4.0.1.tar.gz
2    tar -xzf zope.interface-4.0.1.tar.gz
3    cd zope.interface-4.0.1
4    python setup.py build
5    python setup.py install
6    cd ..
测试
1    python
2    import OpenSSL
3    import twisted.internet.ssl
4    twisted.internet.ssl
5    # 显示类似“<module 'twisted.internet.ssl' from '/usr/lib/python2.6/site-packages/twisted/internet/ssl.pyc'>”,表明安装无误
7、pycrypto
1    wget http://pypi.python.org/packages/ ... pycrypto-2.6.tar.gz
2    tar -xzf pycrypto-2.6.tar.gz
3    cd pycrypto-2.6
4    python setup.py build
5    python setup.py install
6    cd ..
测试
1    python
2    import Crypto
3    import Crypto.PublicKey.RSA
4    Crypto.PublicKey.RSA
5    # 显示类似 “<module 'Crypto.PublicKey.RSA' from '/usr/lib/python2.6/site-packages/Crypto/PublicKey/RSA.pyc'>” 说明安装成功
8、Twisted-web
1    wget http://twistedmatrix.com/Release ... dWeb-12.2.0.tar.bz2
2    tar -xjf TwistedWeb-12.2.0.tar.bz2
3    cd TwistedWeb-12.2.0
4    python setup.py install
5    cd ..
9、gettext
1    wget http://pypi.python.org/packages/ ... hon-gettext-2.0.zip
2    unzip python-gettext-2.0.zip
3    cd python-gettext-2.0
4    python setup.py build
5    python setup.py install
6    cd ..
10、intltool
1    yum install intltool –y
11、pyxdg
1    wget http://pypi.python.org/packages/source/p/pyxdg/pyxdg-0.23.tar.gz
2    tar -xzf pyxdg-0.23.tar.gz
3    cd pyxdg-0.23
4    python setup.py install
5    cd ..
12、chardet
1    wget http://pypi.python.org/packages/ ... /chardet-1.1.tar.gz
2    tar -xzf chardet-1.1.tar.gz
3    cd chardet-1.1
4    python setup.py install
5    cd ..
13、geoip-database
1    yum install python-geoip #CentOS 5
2    yum install python-GeoIP #CentOS 6
14、setproctitle
1    wget http://pypi.python.org/packages/ ... ctitle-1.1.6.tar.gz
2    tar -xzf setproctitle-1.1.6.tar.gz
3    cd setproctitle-1.1.6
4    python setup.py build
5    python setup.py install
6    cd ..
15、boost

*这个是为了编译libtorrent做准备,不管是编译Deluge内置的还是自己编译,都要有。并且版本不能太高,至少1.47.0和1.51.0(最新版本)好像都不行。
**如果要自己编译libtorrent,记得一定要with python。并且最新的0.16好像也不能用。我这里还是编译Deluge安装包里内置的。
1    yum install bzip2-devel  # For /threading-multi/libboost_iostreams.so.1.42.0
2    wget http://downloads.sourceforge.net ... oost_1_42_0.tar.bz2
3    tar -xjf boost_1_42_0.tar.bz2
4    cd boost_1_42_0
5    ./bootstrap.sh
6    ./bjam install
7    cd ..

16、python-notify

1    wget http://download.gna.org/py-notify/py-notify-0.2.1.tar.gz
2    tar -xzf py-notify-0.2.1.tar.gz
3    cd py-notify-0.2.1
4    python setup.py install
5    cd ..

17、pygame

1    yum install SDL SDL-devel –y
2    yum install SDL_image* SDL_mixer* SDL_ttf* SDL_gfx* SDL_net* libjpeg-devel libpng-devel –y
3     
4    wget http://www.digitalfanatics.org/cal/sge/files/sge030809.tar.gz
5    tar -xzf sge030809.tar.gz
6    cd sge030809
7    make && make install
8     
9    wget http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz
10    tar -xvf pygame-1.9.1release.tar.gz
11    cd pygame-1.9.1release
12    python config.py
13    # Warning, some of the pygame dependencies were not found. Pygame can still
14    # compile and install, but games that depend on those missing dependencies
15    # will not run. Would you like to continue the configuration? [Y/n]: y
16    python setup.py install

对CentOS 5 可能会在_camera.c和camera_v4l2.c失败,这两个文件最开始加上

1    #define V4L2_PIX_FMT_RGB444 1

18、pygtk

1    yum install libffi-devel –y

YUM里的Glib2和pygobject版本太低,故编译安装

18.1、编译glib-2.32.4,默认路径/usr/local

1    wget http://ftp.gnome.org/pub/gnome/s ... /glib-2.32.4.tar.xz
2    xz -d glib-2.32.4.tar.xz
3    tar -xf glib-2.32.4.tar
4    cd glib-2.32.4
5    ./configure
6    make
7    make install
8    cd ..

18.2、设置路径,用于让系统找到新编译库。

1    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig
2    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64

18.3、安装pygobject

18.3.1、cairo

1    yum install pixman* -y
2    wget http://cairographics.org/releases/cairo-1.8.10.tar.gz
3    tar –xzf cairo-1.8.10.tar.gz
4    ./configure
5    make && make install

18.3.2、gobject-introspection

1    yum install flex bison bison-devel -y
2    wget http://ftp.gnome.org/pub/GNOME/s ... tion-1.31.22.tar.xz
3    xz -d gobject-introspection-1.31.22.tar.xz
4    tar -xf gobject-introspection-1.31.22.tar
5    cd gobject-introspection-1.31.22
6    ./configure
7    make && make install
8    cd ..

18.3.3、gdk-pixbuf

1    yum -y install libtiff-devel
2    wget http://ftp.gnome.org/pub/gnome/s ... ixbuf-2.26.3.tar.xz
3    xz -d gdk-pixbuf-2.26.3.tar.xz
4    tar -xf gdk-pixbuf-2.26.3.tar
5    cd gdk-pixbuf-2.26.3
6    ./configure
7    make && make install
8    cd ..

18.3.4、fontconfig

1    # CentOS 5下解决gdkpango.c:323: error: 'PangoCairoShapeRendererFunc' undeclared (first use in this function)
2    wget http://www.freedesktop.org/softw ... onfig-2.10.1.tar.gz
3    tar –xzf fontconfig-2.10.1.tar.gz
4    cd fontconfig-2.10.1
5    ./configure
6    make && make install
7    # CentOS 6可以直接从这里开始
8    wget http://ftp.gnome.org/pub/gnome/s ... pango-1.30.1.tar.xz
9    xz -d pango-1.30.1.tar.xz
10    tar -xf pango-1.30.1.tar
11    cd pango-1.30.1
12    ./configure
13    make && make install
14    cd ..

18.3.5、ATK

1    wget http://ftp.acc.umu.se/pub/gnome/sources/atk/2.4/atk-2.4.0.tar.xz
2    xz -d atk-2.4.0.tar.xz
3    tar -xf atk-2.4.0.tar
4    cd atk-2.4.0
5    ./configure --enable-introspection=yes
6    make && make install
7    cd ..

18.3.6、GTK+

1    wget http://ftp.gnome.org/pub/gnome/s ... gtk+-2.24.12.tar.xz
2    xz -d gtk+-2.24.12.tar.xz
3    tar -xf gtk+-2.24.12.tar
4    cd gtk+-2.24.12
5    ./configure
6    make && make install
7    cd ..

现在依赖基本安装完成,开始pygobject

1    yum install pycairo pycairo-devel -y
2    wget http://ftp.gnome.org/pub/GNOME/s ... bject-2.28.6.tar.xz
3    xz -d pygobject-2.28.6.tar.xz
4    tar -xf pygobject-2.28.6.tar
5    cd pygobject-2.28.6
6    ./configure --disable-introspection #对CentOS 6需要--disable-introspection
7    make && make install

如果make时遇到uid前面缺括号的错误,把/usr/include/python2.6/modsupport.h中的几行注释掉,如下

1    PyAPI_DATA(char *) _Py_PackageContext;
2     
3    /*
4      RHEL-specific extension: support for dealing with uid_t and gid_t without
5      integer overflow
6     */
7    /*
8    PyAPI_FUNC(PyObject *) _PyObject_FromUid(uid_t uid);
9    PyAPI_FUNC(PyObject *) _PyObject_FromGid(gid_t gid);
10     
11    PyAPI_FUNC(int) _PyArg_ParseUid(PyObject *in_obj, uid_t *out_uid);
12    PyAPI_FUNC(int) _PyArg_ParseGid(PyObject *in_obj, gid_t *out_gid);
13    */
14    #ifdef __cplusplus
15    }
16    #endif
17    #endif /* !Py_MODSUPPORT_H */

18.4、pyGTK

1    wget http://ftp.gnome.org/pub/GNOME/s ... pygtk-2.24.0.tar.gz
2    tar -xzf pygtk-2.24.0.tar.gz
3    cd pygtk-2.24.0
4    ./configure
5    make
6    make install
7    cd ..

19、librsvg

1    yum install librsvg* -y

20、xdg-utils

1    yum install xdg-utils -y

21、mako

1    yum install python-mako -y

22、deluge

1    wget http://download.deluge-torrent.org/source/deluge-1.3.5.tar.gz
2    tar -xzf deluge-1.3.5.tar.gz
3    cd deluge-1.3.5
4    python setup.py clean -a
5    python setup.py build
6    python setup.py insall

欢迎回复讨论,也可移步我的技术Blog http://shujiantech.org/archives/33

评论3

aubert22 发表于 2012-10-9 19:51:04 | 查看全部
超级无敌麻烦~话说deluge官网都没有centos的安装方法?

你敢点我吗?OVH喔
回复 点赞

使用道具 举报

元亨利贞Lv.9 发表于 2012-10-9 19:54:24 来自手机 | 查看全部
楼主是高手啊,突然想起来ovh默认安装的是debian,debian可是要花钱买服务吧?看来大公司就是有钱啊
回复 点赞

使用道具 举报

芬兰冰宁Lv.5 发表于 2012-10-9 19:58:31 | 查看全部
又是一个值得好好看的帖子,一直用一键安装没有技术含量啊
回复 点赞

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

淘宝小店

邀请码

VIP会员

微信客服

公众号

微信群

投诉/建议联系

support@gebi1.cn

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2024 隔壁网 版权所有 All Rights Reserved. 粤ICP备14056481号-1
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表