Ubuntu搭建trac平台步骤

Ubuntu搭建trac平台步骤:

# apt-get install apache2

# apt-get install libapache2-mod-python

# apt-get install libapache2-mod-authnz-external

# a2enmod authnz_ldap

# apt-get install mysql-server-5.5  (设置root密码,如:123456)

# apt-get install python-mysqldb

# apt-get install python-setuptools

# easy_install Genshi==0.6

# easy_install Babel==0.9.6

# easy_install Trac==0.12.2

# mysql -u root -p123456

mysql> create database trac;

mysql> grant all on trac.* to [email protected]‘localhost‘ identified by ‘123456‘;

mysql>  flush privileges;

mysql> quit

# mkdir -p /var/www/ming   (创建trac项目ming)

# trac-admin /var/www/ming initenv

ming

mysql://tracadmin:[email protected]/trac

# chown -R www-data:www-data /var/www/ming

# cp /etc/apache2/sites-available/default /etc/apache2/site-available/ming

#  vi /etc/apache2/site-available/ming

按a或i进入编辑模式

<VirtualHost 10.0.0.3:80>  (原为<VirtualHost *:80>)

DocumentRoot /var/www

<Location />

SetHandler mod_python

PythonInterpreter main_interpreter

PythonHandler trac.web.modpython_frontend

PythonOption  TracEnv /var/www/ming

PythonOption  TracUriRoot /

SetEnv  PYTHON_EGG_CACHE /tmp

</Location>

<Location /login>

AuthType Basic

AuthName "Trac"

AuthBasicProvider "ldap"

AuthLDAPURL  "ldap://10.0.0.3:3268/DC=ming,dc=com?sAMAccountName?sub?(objectClass=user)"

AuthLDAPBindDN  [email protected]

AuthLDAPBindPassword "123456"

authzldapauthoritative Off

require valid-user CN=Users,dc=ming,dc=com

</Location>

其它不变

按Esc键退出编辑模式

:wq (保存并退出)

# ln -s /etc/apache2/site-available/ming /etc/apache2/site-enabled/

# service apache2 restart

注:

如果报错:TimeoutError:Unable to get database connection within 0 seconds. (TracError

(<babel.support.LazyProxy object at 0x7fe1d6e089b0>,))

是trac.ini的权限没设置好

# chown www-data:www-data /var/www/ming/conf/trac.ini即可

时间: 2024-10-13 16:17:17

Ubuntu搭建trac平台步骤的相关文章

Ubuntu搭建Openstack平台(kilo)(七.Dashboard)

安装Dashboard 参考文档:http://docs.openstack.org/mitaka/install-guide-ubuntu/horizon-install.html - 安装dashboard apt-get install openstack-dashboard 修改配置 vim /etc/openstack-dashboard/local_settings.py OPENSTACK_HOST = "controller" #允许所有的主机访问dashboard A

Ubuntu搭建Openstack平台(kilo)(二.keystone)

一.keystone安装 参考文档:http://www.aboutyun.com/thread-13080-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-install.html 1.创建keystone数据库并授权 mysql -u root -p 创建keystone数据库: CREATE DATABASE keystone; 授权(并设置keystone密码,此密码在后面同步数据库时会用到,

Ubuntu搭建Openstack平台(kilo)(一.整体环境)

一.环境 OS:Ubuntu 14.04 网卡要求:每台主机最少两块网卡,网络节点最少三块 eth0作为管理网卡,eth1作为数据网卡,eth2作为外部网卡 网络类型如图: 管理网络(Management Network): 10.0.0.0/24 数据网络(Data Network): 10.0.0.1.0/24 外部网络(External Network) 203.0.113.0/24 API Network 125.220.254.** 二.网络配置(设置后使用/etc/init.d/ne

Ubuntu搭建Openstack平台(kilo)(三.glance)

一.Glance环境 参考文档:http://www.aboutyun.com/thread-13080-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-install.html 1.创建glance的数据库并授权 创建 mysql -u root -p CREATE DATABASE glance; 授权(自己设定密码,连接数据库时用,我的glance) GRANT ALL PRIVILEGES ON

Ubuntu搭建Openstack平台(kilo)(四.nova)

一.nova环境 参考文档:http://www.aboutyun.com/thread-13089-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/nova-controller-install.html 1.创建nova数据库并授权 创建 mysql -u root -p CREATE DATABASE nova; 授权(自己设定密码,连接数据库时用,我的nova) GRANT ALL PRIVILEGES ON

Ubuntu搭建Openstack平台(kilo)(六.实例化网络,创建实例)

实例化网络 参考文档:http://www.aboutyun.com/thread-13187-1-1.html http://www.aboutyun.com/thread-14639-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance.html#create-virtual-networks 一.创建外部网络 加载环境 source admin-openrc.sh 创建网络 neutro

Ubuntu 搭建LAMP平台

$ sudo apt-get install apache2 $ sudo apt-get install mysql-server-5.5   (root密码随意,如:123456) $ sudo apt-get install php5 $ sudo apt-get install libapache2-mod-php5  (解决apache识别php页面) $ sudo apt-get install php5-mysql    (解决php连接mysql) $ sudo ls /etc/

Ubuntu搭建Openstack平台(kilo)(五.neutron(二)网络节点与计算节点)

参考文档:http://www.aboutyun.com/thread-13116-1-1.html http://www.aboutyun.com/thread-13117-1-1.html 网络节点 一.配置参数 环境配置 vim /etc/sysctl.conf net.ipv4.ip_forward=1 net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.default.rp_filter=0 使配置生效 sysctl -p 二.安装neutron组件

Ubuntu搭建Openstack平台(kilo)(五.neutron(一)控制节点)

一.neutron环境 参考文档:http://www.aboutyun.com/thread-13108-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install.html 1.创建neutron数据库并授权 创建 mysql -u root -p CREATE DATABASE neutron; 授权 GRANT ALL PRIVILEGES ON neutron.* T