你好,游客 登录 注册 搜索
背景:
阅读新闻

Submin2安装在CentOS 5和Apache2.4.4

[日期:2013-03-31] 来源:Linux社区  作者:jackeyj [字体:大 中 小]

5. 问题汇总
Please provide a location for the Subversion repositories. For new Subversion
repositories, the default setting is ok. If the path is not absolute, it will
be relative to the submin environment. If you want to use an existing
repository, please provide the full pathname to the Subversion parent
directory (ie. /var/lib/svn).

Path to the repository? [svn]>

Please provide a location for the git repositories. For new git repositories,
the default setting is ok. If the path is not absolute, it will be relative to
the submin environment. If you want to use an existing repository, please
provide the full pathname to the git parent directory (ie. /var/lib/git).

Path to the git repositories? [git]>

Please provide a location for the parent dir of Trac environments. For a new
installation, the default setting is ok. If you don't want to use Trac, the
default setting is also ok. For existing Trac environments, please provide
the full path.

Path to trac environment? [trac]>

Please provide a hostname that can be used to reach the web interface. This
hostname will be used in communication to the user (a link in email, links
in the web interface).

Hostname? [localhost]>

The HTTP path tells Submin where the website is located relative to the root.
This is needed for proper working of the website. Submin will be accesible
from /submin, Subversion will be accessible from /svn.
If you use Trac, it will be accessible from /trac.

HTTP base? [/]>
Traceback (most recent call last):
File "/usr/bin/submin2-admin", line 6, in
sa.run()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/subminadmin.py", line 82, in run
return self.execute(self.argv[2:])
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/subminadmin.py", line 158, in execute
rc = Class.run()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_initenv.py", line 200, in run
self.interactive()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_initenv.py", line 118, in interactive
self.create_env()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_initenv.py", line 175, in create_env
self.sa.execute(['unixperms', 'fix'])
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/subminadmin.py", line 158, in execute
rc = Class.run()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_unixperms.py", line 128, in run
subcmd(self.argv[1:])
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_unixperms.py", line 38, in subcmd_fix
self._fix('')
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_unixperms.py", line 49, in _fix
user = apache.pw_uid
AttributeError: 'NoneType' object has no attribute 'pw_uid'
[root@localhost conf]#

----------------------------------------------------------------------------
def apache_user(self, preferred=''):
"""Returns most probably www-user"""
from pwd import getpwnam
users = []
known = [preferred, 'www-data', 'httpd', 'apache', '_www',
'wwwrun', 'www', 'nobody']
"c_unixperms.py" 128L, 3021C written
-----------------------------------------------------------------------------


[root@localhost conf]# rm -rf /var/lib/submin/
[root@localhost conf]#
[root@localhost conf]# submin2-admin /var/lib/submin initenv jackey.jiao@infowarelab.com

Please provide a location for the Subversion repositories. For new Subversion
repositories, the default setting is ok. If the path is not absolute, it will
be relative to the submin environment. If you want to use an existing
repository, please provide the full pathname to the Subversion parent
directory (ie. /var/lib/svn).

Path to the repository? [svn]>

Please provide a location for the git repositories. For new git repositories,
the default setting is ok. If the path is not absolute, it will be relative to
the submin environment. If you want to use an existing repository, please
provide the full pathname to the git parent directory (ie. /var/lib/git).

Path to the git repositories? [git]>

Please provide a location for the parent dir of Trac environments. For a new
installation, the default setting is ok. If you don't want to use Trac, the
default setting is also ok. For existing Trac environments, please provide
the full path.

Path to trac environment? [trac]>

Please provide a hostname that can be used to reach the web interface. This
hostname will be used in communication to the user (a link in email, links
in the web interface).

Hostname? [localhost]>

The HTTP path tells Submin where the website is located relative to the root.
This is needed for proper working of the website. Submin will be accesible
from /submin, Subversion will be accessible from /svn.
If you use Trac, it will be accessible from /trac.

HTTP base? [/]>
Apache files created:
/var/lib/submin/conf/apache-webui-cgi.conf
/var/lib/submin/conf/apache-webui-wsgi.conf
/var/lib/submin/conf/apache-svn.conf
/var/lib/submin/conf/apache-trac-modpython.conf
/var/lib/submin/conf/apache-trac-cgi.conf
/var/lib/submin/conf/apache-trac-fcgid.conf
/var/lib/submin/conf/apache-trac-modwsgi.conf

Please include the relevent files in your apache config. If you have
selected to generate all files (recommended), do not include all files,
but only select one version (e.g. svn and webui-cgi but not webui-wsgi).

Also make sure that you have the appropriate modules installed and enabled.
Depending on your choices, these may include: mod_dav_svn, mod_authz_svn,
mod_authn_dbd, mod_dbd, mod_wsgi, mod_cgi, mod_cgid and mod_python
Traceback (most recent call last):
File "/usr/bin/submin2-admin", line 6, in
sa.run()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/subminadmin.py", line 82, in run
return self.execute(self.argv[2:])
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/subminadmin.py", line 158, in execute
rc = Class.run()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_initenv.py", line 200, in run
self.interactive()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_initenv.py", line 118, in interactive
self.create_env()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_initenv.py", line 178, in create_env
self.sa.execute(['trac', 'init'])
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/subminadmin.py", line 158, in execute
rc = Class.run()
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_trac.py", line 96, in run
subcmd(self.argv[1:])
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/c_trac.py", line 39, in subcmd_init
if not trac.exists():
File "/usr/local/lib/python2.7/site-packages/submin/subminadmin/trac.py", line 17, in exists
return trac.tracAdminExists()
File "/usr/local/lib/python2.7/site-packages/submin/models/trac.py", line 61, in tracAdminExists
if e.errno == errno.ENOENT: # could not find executable
NameError: global name 'errno' is not defined
[root@localhost conf]# [root@localhost conf]#

------------------------------------------------------------------------------
55 raise TracAdminError(' '.join(cmd), e.returncode, e.output)
56
57 def tracAdminExists():
58 try:
59 trac_admin_command('/tmp', ['help'])
60 except OSError, e:
61 if e.errno == os.errno.ENOENT: # could not find executable
62 return False
63 raise
64
65 return True


---------------------------------------------------------------------------------


HTTP base? [/]>
Apache files created:
/var/lib/submin/conf/apache-webui-cgi.conf
/var/lib/submin/conf/apache-webui-wsgi.conf
/var/lib/submin/conf/apache-svn.conf
/var/lib/submin/conf/apache-trac-modpython.conf
/var/lib/submin/conf/apache-trac-cgi.conf
/var/lib/submin/conf/apache-trac-fcgid.conf
/var/lib/submin/conf/apache-trac-modwsgi.conf

Please include the relevent files in your apache config. If you have
selected to generate all files (recommended), do not include all files,
but only select one version (e.g. svn and webui-cgi but not webui-wsgi).

Also make sure that you have the appropriate modules installed and enabled.
Depending on your choices, these may include: mod_dav_svn, mod_authz_svn,
mod_authn_dbd, mod_dbd, mod_wsgi, mod_cgi, mod_cgid and mod_python
Could not find 'trac-admin' command. If you want to use Trac, please install trac and run: `submin2-admin /var/lib/submin trac init`
You have new mail in /var/spool/mail/root
[root@localhost conf]#

---------------------------------------------------------
与apache2.4.4存在兼容性问题,权限控制有所不同。需要修改submin产生的apache配置文件访问权限控制
参考:http://httpd.apache.org/docs/2.4/upgrading.html#access

[Thu Mar 28 03:04:39.708109 2013] [mpm_event:notice] [pid 29444:tid 47465972401248] AH00489: Apache/2.4.4 (Unix) configured -- resuming normal operations
[Thu Mar 28 03:04:39.708399 2013] [core:notice] [pid 29444:tid 47465972401248] AH00094: Command line: '/opt/apache25/bin/httpd'
[Thu Mar 28 03:05:33.391673 2013] [authz_core:error] [pid 29448:tid 1116485952] [client 172.16.2.52:51455] AH01630: client denied by server configuration: /usr/local/lib/python2.7/site-packages/submin/static/www
[Thu Mar 28 03:05:37.697600 2013] [authz_core:error] [pid 29448:tid 1126975808] [client 172.16.2.52:51455] AH01630: client denied by server configuration: /usr/local/lib/python2.7/site-packages/submin/static/www/
[Thu Mar 28 03:05:42.465937 2013] [authz_core:error] [pid 29448:tid 1137465664] [client 172.16.2.52:51455] AH01630: client denied by server configuration: /usr/local/lib/python2.7/site-packages/submin/static/www/a.html
[Thu Mar 28 03:06:04.876683 2013] [mpm_event:notice] [pid 29444:tid 47465972401248] AH00494: SIGHUP received. Attempting to restart


Order allow,deny
Allow from all
Options ExecCGI FollowSymLinks
AddHandler cgi-script py cgi pl

SetEnv SUBMIN_ENV /var/lib/submin

Require all granted
Options ExecCGI FollowSymLinks
AddHandler cgi-script py cgi pl

SetEnv SUBMIN_ENV /var/lib/submin

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

linux
相关资讯       Submin  Apache2.4.4 
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* 匿名 发表于 2013/8/23 17:32:49
安装的说明不详细啊,我的安装好后,总是无法访问,error如下(相关文件夹已经授777的权限):

[Fri Aug 23 17:15:24 2013] [error] [client 192.168.1.25] (13)Permission denied: exec of '/var/lib/submin/cgi-bin/submin.cgi' failed
[Fri Aug 23 17:15:24 2013] [error] [client 192.168.1.25] Premature end of script headers: submin.cgi
[Fri Aug 23 17:15:24 2013] [error] [client 192.168.1.25] (13)Permission denied: file permissions deny server access: /var/www/html/redmine/public/favicon.ico
[Fri Aug 23