搜尋此網誌

2016年7月13日 星期三

CentOS安裝Trac(python 安裝)

官網說明
https://trac.edgewall.org/wiki/TracInstall#MandatoryDependencies
需下列套件
  • Python, version ≥ 2.5 and < 3.0 (note that we dropped the support for Python 2.4 in this release)
  • setuptools, version ≥ 0.6
  • Genshi, version ≥ 0.6


1.安装python

yum intall python.x86_64


2.安装setuptools软件包

可以先打开setuptools的python官网看看setuptools软件包如何安装:
> wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
> python ez_setup.py --user

也可以下载setuptools软件包后安装:
(1)下载setuptools包
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz
(2)解压setuptools包
tar zxvf setuptools-2.0.tar.gz
# cd setuptools-2.0
(3)编译setuptools
python setup.py build
(4)开始执行setuptools安装
# python setup.py install

3.安装Genshi软件包

(1)請下載>0.6   <0.7的版本,就是0.6.1
tar zxf  Genshi-0.6.1.tar.gz
cd Genshi-0.6.1
python setup.py install

4.安装Trac

tar zxf Trac-0.12.7.tar.gz
cd Trac-0.12.7
python setup.py install

CentOS 6.8 安裝php5.4(不使用yum)

因為在主機無法連到外部yum server
所以網路上教學的無法使用
http://xyz.cinc.biz/2014/04/centos6-php-54.html

所以採用直接到centos去抓rpm
http://mirror.centos.org/centos/6/sclo/x86_64/rh/php54/
下列rpm套件可到上述網只抓取

1.首先需安裝
yum install policycoreutils-python

=========PHP5.4套件
rpm -ivh php54-php-5.4.40-3.el6.x86_64.rpm  php54-php-common-5.4.40-3.el6.x86_64.rpm  php54-php-cli-5.4.40-3.el6.x86_64.rpm php54-runtime-2.0-1.el6.x86_64.rpm

==========mysql套件
rpm -ivh php54-php-pdo-5.4.40-3.el6.x86_64.rpm php54-php-mysqlnd-5.4.40-3.el6.x86_64.rpm

==========gd套件
# rpm -ivh php54-php-gd-5.4.40-3.el6.x86_64.rpm
直接安裝會出現下列訊息
warning: php54-php-gd-5.4.40-3.el6.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f2ee9d55: NOKEY
error: Failed dependencies:
        libt1.so.5()(64bit) is needed by php54-php-gd-5.4.40-3.el6.x86_64
解法:
先安裝
yum install t1lib.x86_64
才能安裝
rpm -ivh php54-php-gd-5.4.40-3.el6.x86_64.rpm

設定檔在這邊
/opt/rh/php54/root/etc/php.ini