開発環境サーバ(Linux仮想 - develop)のセットアップ
Subversion + Trac + CIツール。
Subversionのインストール
[root@develop ~]# yum -y install mod_dav_svn [root@develop ~]# # 下記に内容を示します。 [root@develop ~]# vi /etc/init.d/subversion [root@develop ~]# chmod 755 /etc/init.d/subversion [root@develop ~]# chkconfig --add subversion [root@develop ~]# # 下記に内容を示します。 [root@develop ~]# vi /etc/httpd/conf.d/subversion.conf [root@develop ~]# /usr/bin/htpasswd -c /etc/httpd/dav_trac_svn.passwd cepoc [root@develop ~]# mkdir /var/svn/ [root@develop ~]# chown -R apache:apache /var/svn
/etc/init.d/subversion
#!/bin/sh # # chkconfig: 345 80 10 # description: start/stop subversion server. . /etc/rc.d/init.d/functions if ! [ -x /usr/bin/svnserve ]; then exit 0 fi case "$1" in start) echo -n "Starting subversion server:" echo -n " svnserve" ; /usr/bin/svnserve -d echo "." ;; stop) echo -n "Stopping subversion server:" echo -n " svnserve" ; killproc svnserve echo "." ;; *) echo "Usage: /etc/init.d/subversion {start|stop}" exit 1 ;; esac exit 0
/etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so <Location /svn> DAV svn SVNParentPath /var/svn # our access control policy AuthzSVNAccessFile /var/svn/cepoc/conf/authz # only authenticated users may access the repository AuthType Basic AuthName "Subversion repository" AuthUserFile /etc/httpd/dav_trac_svn.passwd Require valid-user </Location>
Tracのインストール
[root@develop ~]# yum -y install mod_python trac [root@develop ~]# # 日本語化する [root@develop ~]# wget http://www.i-act.co.jp/project/products/downloads/trac-0.10.3.1-ja-1.zip [root@develop ~]# unzip trac-0.10.3.1-ja-1.zip [root@develop ~]# python ./trac-0.10.3.1-ja-1/setup.py install [root@develop ~]# # 下記に内容を示します。 [root@develop ~]# vi /etc/httpd/conf.d/trac.conf [root@develop ~]# mkdir /var/trac [root@develop ~]# chown -R apache:apache /var/trac [root@develop ~]# chmod -R a+wr /var/trac [root@develop ~]# chkconfig httpd on [root@develop ~]# service httpd start
Alias /trac/ "/usr/share/trac/htdocs/" <Location "/projects"> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracUriRoot /projects PythonOption TracEnvParentDir /var/trac </Location> <LocationMatch "^/projects"> AuthType Basic AuthName "Trac" AuthUserFile /etc/httpd/dav_trac_svn.passwd Require valid-user </LocationMatch>
プロジェクト作成
[root@develop ~]# mkdir /var/svn/cepoc [root@develop ~]# svnadmin create --fs-type=fsfs /var/svn/cepoc [root@develop ~]# chown -R apache:apache /var/svn/cepoc [root@develop ~]# vi /var/svn/cepoc/conf/svnserve.conf [root@develop ~]# # 適宜修正 [root@develop ~]# vi /var/svn/cepoc/conf/passwd [root@develop ~]# chmod 600 /var/svn/cepoc/conf/passwd [root@develop ~]# # 適宜修正 [root@develop ~]# vi /var/svn/cepoc/conf/authz [root@develop ~]# svn mkdir file:///var/svn/cepoc/trunk file:///var/svn/cepoc/tags file:///var/svn/cepoc/branches -m "Create trunk, tags, branches." [root@develop ~]# mkdir /var/trac/cepoc [root@develop ~]# trac-admin /var/trac/cepoc initenv Creating a new Trac environment at /var/trac/cepoc Trac will first ask a few questions about your environment in order to initalize and prepare the project database. Please enter the name of your project. This name will be used in page titles and descriptions. Project Name [My Project]> Cepoc Please specify the connection string for the database to use. By default, a local SQLite database is created in the environment directory. It is also possible to use an already existing PostgreSQL database (check the Trac documentation for the exact connection string syntax). Database connection string [sqlite:db/trac.db]> Please specify the type of version control system, By default, it will be svn. If you don't want to use Trac with version control integration, choose the default here and don't specify a repository directory. in the next question. Repository type [svn]> Please specify the absolute path to the version control repository, or leave it blank to use Trac without a repository. You can also set the repository location later. Path to repository [/path/to/repos]> /var/svn/cepoc Please enter location of Trac page templates. Default is the location of the site-wide templates installed with Trac. Templates directory [/usr/share/trac/templates]> Creating and Initializing Project Installing default wiki pages /usr/share/trac/wiki-default/TracJa => TracJa /usr/share/trac/wiki-default/WikiDeletePage => WikiDeletePage /usr/share/trac/wiki-default/InterWiki => InterWiki /usr/share/trac/wiki-default/TracModPython => TracModPython /usr/share/trac/wiki-default/WikiNewPage => WikiNewPage /usr/share/trac/wiki-default/TracUnicode => TracUnicode /usr/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText /usr/share/trac/wiki-default/TracSupport => TracSupport /usr/share/trac/wiki-default/TracQuery => TracQuery /usr/share/trac/wiki-default/TracFastCgi => TracFastCgi /usr/share/trac/wiki-default/WikiProcessors => WikiProcessors /usr/share/trac/wiki-default/TracPlugins => TracPlugins /usr/share/trac/wiki-default/TracStandalone => TracStandalone /usr/share/trac/wiki-default/TracBrowser => TracBrowser /usr/share/trac/wiki-default/TracUpgrade => TracUpgrade /usr/share/trac/wiki-default/TracReports => TracReports /usr/share/trac/wiki-default/WikiPageNames => WikiPageNames /usr/share/trac/wiki-default/CamelCase => CamelCase /usr/share/trac/wiki-default/TracNotification => TracNotification /usr/share/trac/wiki-default/WikiFormatting => WikiFormatting /usr/share/trac/wiki-default/TracLinks => TracLinks /usr/share/trac/wiki-default/TracSearch => TracSearch /usr/share/trac/wiki-default/TracRevisionLog => TracRevisionLog /usr/share/trac/wiki-default/TracTermsJa => TracTermsJa /usr/share/trac/wiki-default/TracIni => TracIni /usr/share/trac/wiki-default/TracTimeline => TracTimeline /usr/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring /usr/share/trac/wiki-default/TracInterfaceCustomization => TracInterfaceCustomization /usr/share/trac/wiki-default/TracCgi => TracCgi /usr/share/trac/wiki-default/TracAccessibility => TracAccessibility /usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields /usr/share/trac/wiki-default/WikiHtml => WikiHtml /usr/share/trac/wiki-default/SandBox => SandBox /usr/share/trac/wiki-default/TitleIndex => TitleIndex /usr/share/trac/wiki-default/TracLogging => TracLogging /usr/share/trac/wiki-default/TracInstall => TracInstall /usr/share/trac/wiki-default/TracWiki => TracWiki /usr/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks /usr/share/trac/wiki-default/TracRoadmap => TracRoadmap /usr/share/trac/wiki-default/TracChangeset => TracChangeset /usr/share/trac/wiki-default/InterTrac => InterTrac /usr/share/trac/wiki-default/InterMapTxt => InterMapTxt /usr/share/trac/wiki-default/TracPermissions => TracPermissions /usr/share/trac/wiki-default/TracGuide => TracGuide /usr/share/trac/wiki-default/TracImport => TracImport /usr/share/trac/wiki-default/WikiMacros => WikiMacros /usr/share/trac/wiki-default/TracBackup => TracBackup /usr/share/trac/wiki-default/WikiStart => WikiStart /usr/share/trac/wiki-default/TracEnvironment => TracEnvironment /usr/share/trac/wiki-default/RecentChanges => RecentChanges /usr/share/trac/wiki-default/TracAdmin => TracAdmin /usr/share/trac/wiki-default/TracTickets => TracTickets /usr/share/trac/wiki-default/TracRss => TracRss Indexing repository --------------------------------------------------------------------- Project environment for 'Cepoc' created. You may now configure the environment by editing the file: /var/trac/cepoc/conf/trac.ini If you'd like to take this new project environment for a test drive, try running the Trac standalone web server `tracd`: tracd --port 8000 /var/trac/cepoc Then point your browser to http://localhost:8000/cepoc. There you can also browse the documentation for your installed version of Trac, including information on further setup (such as deploying Trac to a real web server). The latest documentation can also always be found on the project website: http://trac.edgewall.org/ Congratulations! [root@develop ~]# chown -R apache:apache /var/trac/cepoc [root@develop ~]# chmod -R a+wr /var/trac/cepoc [root@develop ~]# # 適宜修正 [root@develop ~]# vi /var/trac/cepoc/conf/trac.ini
Continuumのインストール
[root@develop ~]# # まずJDKが必要 [root@develop ~]# chmod +x ./jdk-1_5_0_11-linux-i586-rpm.bin [root@develop ~]# yes | ./jdk-1_5_0_11-linux-i586-rpm.bin (略) [root@develop ~]# ln -s /usr/java/jdk1.5.0_11 /usr/local/java [root@develop ~]# export JAVA_HOME=/usr/local/java/ [root@develop ~]# export CLASSPATH=$JAVA_HOME/lib [root@develop ~]# export PATH=$PATH:$JAVA_HOME/bin [root@develop ~]# # Mavenも要る [root@develop ~]# wget http://ftp.kddilabs.jp/infosystems/apache/maven/binaries/maven-2.0.6-bin.tar.gz [root@develop ~]# tar zxf maven-2.0.6-bin.tar.gz -C /usr/local/ [root@develop ~]# export MAVEN_HOME=/usr/local/maven-2.0.6 [root@develop ~]# export PATH=$PATH:/usr/local/maven-2.0.6/bin [root@develop ~]# # リンクしないとなぜかcontinuumが動かない [root@develop ~]# ln -s /usr/local/maven-2.0.6/bin/mvn /usr/bin/mvn [root@develop ~]# # Continuumのインストール [root@develop ~]# wget http://ftp.kddilabs.jp/infosystems/apache/maven/binaries/continuum-1.0.3-bin.tar.gz [root@develop ~]# tar zxf continuum-1.0.3-bin.tar.gz -C /usr/local/ [root@develop ~]# ln -s /usr/local/root/continuum-1.0.3/bin/linux/run.sh /etc/init.d/continuum [root@develop ~]# 初回起動 [root@develop ~]# /usr/local/continuum-1.0.3/bin/linux/run.sh console