08.06.2010 by star - 0 Comment
Posted in Tech Tools
Error message displayed on the console: ACPI: Unable to turn cooling device ‘on’
系统:CentOS 5.2
[root@localhost ~]# uname -a
Linux keygon 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i386 GNU/Linux
原因:服务器温度过高;
解决方法:降低环境温度,增加散热;
grub 启动参数:noacpi
Check your temperature threshold
# cat /proc/acpi/thermal_zone/THRM/trip_points
Set to higher/proper threshold and the spam went away:
# echo -n “65:60:50:55:50:45″ > /proc/acpi/thermal_zone/THRM/trip_points
Refer to: http://www.centos.org/modules/newbb/viewtopic.php?topic_id=8158
Tag after centos, faq, linux
04.22.2010 by star - 0 Comment
Posted in Tech Tools
Requied RPMs
yum-2.4.3-4.el4.centos.noarch.rpm
python-elementtree-1.2.6-5.el4.centos.i386.rpm
python-sqlite-1.1.7-1.2.1.i386.rpm
python-urlgrabber-2.9.8-2.noarch.rpm
sqlite-3.3.6-2.i386.rpm
yum-2.4.3-4.el4.centos.noarch.rpm
yum-metadata-parser-1.0-8.el4.centos.i386.rpm
centos-yumconf-4-4.5.noarch.rpm
Update repo of yum
/etc/yum.repos.d/dag.repo
[dag]
name=Dag RPM Repository for RHEL4
#baseurl=http://mirror.be10.com/centos/4/addons/i386/
baseurl=http://mirrors.kernel.org/centos/4/addons/i386/
#mirrorlist=http://mirror.centos.org/centos/4/addons/i386/
#mirrorlist=http://mirrors.kernel.org/centos/4/addons/i386/
enabled=1
gpgcheck=1
gpgkek=http://mirrors.kernel.org/centos/RPM-GPG-KEY-CentOS-4
#gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-4
/etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever – Base
#baseurl=http://mirror.be10.com/centos/4/os/$basearch/
baseurl=http://mirrors.kernel.org/centos/4/os/$basearch/
#mirrorlist=http://mirror.centos.org/centos/4/os/$basearch/
#mirrorlist=http://mirrors.kernel.org/centos/4/os/$basearch/
gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
gpgkey=http://mirrors.kernel.org/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-$releasever – Updates
#baseurl=http://mirror.be10.com/centos/4/updates/$basearch/
baseurl=http://mirrors.kernel.org/centos/4/updates/$basearch/
#mirrorlist=http://mirror.centos.org/centos/4/updates/$basearch/
#mirrorlist=http://mirrors.kernel.org/centos/4/updates/$basearch/
gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
gpgkey=http://mirrors.kernel.org/centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever – Addons
#baseurl=http://mirror.be10.com/centos/4/addons/$basearch/
baseurl=http://mirrors.kernel.org/centos/4/addons/$basearch/
#mirrorlist=http://mirror.centos.org/centos/4/addons/$basearch/
#mirrorlist=http://mirrors.kernel.org/centos/4/addons/$basearch/
gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
gpgkey=http://mirrors.kernel.org/centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
#baseurl=http://mirror.be10.com/centos/4/extras/$basearch/
baseurl=http://mirrors.kernel.org/centos/4/extras/$basearch/
#mirrorlist=http://mirror.centos.org/centos/4/extras/$basearch/
#mirrorlist=http://mirrors.kernel.org/centos/4/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.kernel.org/centos/RPM-GPG-KEY-centos4
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Update system
# yum update
注:国内的镜像可以使用网易开源镜像站,据说服务器是在杭州的,赞一个。
Refer to:
启用yum升级RedHat Linux Enterprise
网易的开源软件镜像站点
Tag after linux, redhat, yum
04.15.2010 by star - 0 Comment
Posted in Tech Tools
默认设置情况下,在分配传票时,“分配用户”选项(“Assign to:”/“reassign to”)里使用的是一个编辑框输入一个接受该传票的用户的名字。我们希望通过一个已有的用户列表来选择一个目标用户。
修改配置文件:/var/www/trac/conf/trac.ini ,找到[ticket]段修改
# Original item
restrict_owner=false
# Updated item
restrict_owner=true
修改配置文件:/var/www/trac/conf/trac.ini ,找到[ticket-workflow]段添加
testing = new,accepted,needs_work -> testing
testing.name = Submit to reporter for testing
testing.permissions = TICKET_MODIFY
reject = testing -> needs_work
reject.name = Failed testing, return to developer
pass = testing -> closed
pass.name = Passes Testing
pass.operations = set_resolution
pass.set_resolution = fixed
注:Trac 配置修改后即时生效,无需重启服务。
Issue: 为Trac选择数据库
Database connection string [sqlite:db/trac.db]>
1. SQLite:
sqlite:db/project.db
2. Postgres:
postgres://user:pass@server/database?schema=yourschemaname
3. MySQL:
mysql://user:password@host:port/database
注:
登陆MySQL
#mysql mysql -u root -p
创建用户trac
mysql>GRANT ALL PRIVILEGES ON *.* TO trac@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
创建数据库,注意:如果你想在Trac中使用中文,必须设定数据库编码是utf8,MySQL缺省编码方式是latin1
mysql>CREATE DATABASE IF NOT EXISTS trac_telecom default charset utf8 COLLATE utf8_general_ci;
Issue: 创建新的Trac/SVN项目
1. SVN
svnadmin create /path/to/svn/project
2. Trac
trac-admin /path/to/trac/project initenv
3. 修改配置 trac.ini
database = mysql://user:password@host:port/database
default_charset = utf-8
repository_dir = /path/to/svn/project
[project] name = project
Issue: 多项目Trac配置
修改 /etc/httpd/conf.d/trac.conf
PythonOption TracEnvParentDir /path/to/trac
PythonOption TracEnv /path/to/trac/project
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/trac
PythonOption TracUriRoot /projects
Refer to: http://trac.edgewall.org/wiki/TracModPython
Issue: Trac installation for CentOS 5.2
1. Download the trac package
cd tools
wget http://ftp.edgewall.com/pub/trac/Trac-0.12.tar.gz
tar zxvf Trac-0.12.tar.gz
2. Prepare
cd tools
wget wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
easy_install Genshi
3. Installation
cd tools/Trac-0.12
python ./setup.py install
4. Create one trac
trac-admin /var/www/trac/callbay initenv
To be continued…
Tag after faq, linux, scm, trac, Ubuntu