2010-01-24 14:34:03 +00:00
|
|
|
|
|
|
|
CODEPOT
|
|
|
|
|
|
|
|
Codepot is a simple web-based source code manager. It incorporates the
|
|
|
|
subversion revision control system and wiki-based documentation, and supports
|
2015-04-10 14:48:38 +00:00
|
|
|
authentication via LDAP or DBMS.
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
INSTALLATION ON CENTOS
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2015-04-09 04:55:39 +00:00
|
|
|
A RPM package is provided for RedHat/CentOS Linux. The RPM package specifies
|
|
|
|
dependency which must be met prior to or at the same time as the installation
|
2015-04-10 14:48:38 +00:00
|
|
|
of the rpm package. Some required packages are available in RPMforge. You may
|
|
|
|
have to add the RPMforge repository for automatic installation with yum.
|
2014-05-20 01:55:47 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
$ rpm -ivh codepot-X.X.X-Y.Y.Y.Y.rpm
|
2014-05-20 01:55:47 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
You can use the yum utility to be hassle-free instead. However, some required
|
|
|
|
packages are not available in the base CentOS repository but in the RPMforge
|
|
|
|
repository. You may be required to add the RPMforge repository to the system.
|
|
|
|
View http://wiki.centos.org/AdditionalResources/Repositories/RPMForge for
|
|
|
|
RPMforge set-up.
|
2014-05-20 01:55:47 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
$ yum localinstall --nogpgcheck codepot-X.X.X-Y.Y.Y.Y.rpm
|
2014-05-20 01:55:47 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
Once you have all required package installed, you can proceed to configure
|
|
|
|
the system. The following steps shown assume the default installation of
|
|
|
|
CentOS 5.
|
2014-05-20 01:55:47 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
X.X.X is the version number and Y.Y.Y.Y is the release number. For example,
|
|
|
|
to install Codepot 0.2.0 for a 32-bit x86 CentOS 5 server running PHP 5.3,
|
|
|
|
you should get the RPM package file - codepot-0.2.0-php53.1.el5.i686.rpm.
|
|
|
|
|
|
|
|
1. Add the following line to /etc/httpd/conf.d/perl.conf. It must be placed
|
|
|
|
after 'LoadModule perl_module modules/mod_perl.so'.
|
|
|
|
|
|
|
|
PerlSwitches -Mlib=/etc/codepot/perl
|
|
|
|
|
|
|
|
2. Customize the Subversion WebDAV access in /etc/httpd/conf.d/codepot.conf
|
|
|
|
which the RPM package copies from /etc/codepot/codepot.http upon fresh
|
|
|
|
installation. You can skip this step if you don't need any customizations.
|
|
|
|
|
|
|
|
3. Create a database named 'codepot' into the running MySQL server. The
|
|
|
|
schema is defined in /etc/codepot/codepot.mysql. You can execute the following
|
|
|
|
in the MySQL command prompt.
|
|
|
|
|
|
|
|
mysql> create database codepot;
|
|
|
|
mysql> use codepot;
|
|
|
|
mysql> source /etc/codepot/codepot.mysql;
|
|
|
|
|
|
|
|
4. Customize various configuration items in /etc/codepot/codepot.ini.
|
|
|
|
Set all items beginning with database_ to match the database settings.
|
|
|
|
Customize the values to match your system database.
|
|
|
|
|
|
|
|
database_hostname = "localhost"
|
|
|
|
database_username = "root"
|
|
|
|
database_password = ""
|
|
|
|
database_name = "codepot"
|
|
|
|
database_driver = "mysql"
|
|
|
|
database_prefix = ""
|
|
|
|
|
|
|
|
5. Add a local user using the 'codepot-user' command. This command is used
|
|
|
|
to add a user to the database and a user entry added is effective if codepot
|
|
|
|
is configured to use 'DbLoginModel'. You can change it by chaning the value
|
|
|
|
of 'login_mode' in /etc/codepot/codepot.ini.
|
|
|
|
|
|
|
|
$ codepot-user add username password username@your.domain
|
|
|
|
|
|
|
|
6. Enable the user added.
|
2014-05-20 01:55:47 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
$ codepot-user enable username
|
|
|
|
|
|
|
|
7. Optionally, you can set this user to be a system administrator
|
|
|
|
in /etc/codepot/codepot.ini.
|
|
|
|
|
|
|
|
sysadmin_userids = "username"
|
|
|
|
|
|
|
|
8. If you don't have the right subversion extension for PHP installed, you can
|
|
|
|
install the codepot-peclsvn package. Codepot requires the 'svn.so' extension
|
|
|
|
built of at least r333800 from http://svn.php.net/repository/pecl/svn/trunk.
|
|
|
|
|
|
|
|
$ rpm -ivh codepot-peclsvn-X.X.X-Y.Y.Y.Y.rpm
|
|
|
|
|
|
|
|
9. If you have SELinux on in the enforcing mode, check if the data directories
|
|
|
|
used by Codepot has the right context set. The 'httpd_sys_content_t' context
|
|
|
|
type should be set. The Codepot RPM package sets the context type upon fresh
|
|
|
|
installation only.
|
|
|
|
|
|
|
|
$ ls -Zd /var/lib/codepot
|
|
|
|
drwxr-xr-x root root user_u:object_r:httpd_sys_content_t /var/lib/codepot
|
|
|
|
|
|
|
|
$ ls -Z /var/lib/codepot
|
|
|
|
drwxr-xr-x apache apache system_u:object_r:httpd_sys_content_t attachments
|
|
|
|
drwxr-xr-x apache apache system_u:object_r:httpd_sys_content_t files
|
|
|
|
drwxr-xr-x apache apache system_u:object_r:httpd_sys_content_t svnrepo
|
|
|
|
drwxr-xr-x apache apache system_u:object_r:httpd_sys_content_t usericons
|
|
|
|
|
|
|
|
$ ls -lZd /var/cache/codepot
|
|
|
|
drwxr-xr-x apache apache system_u:object_r:httpd_sys_content_t /var/cache/codepot
|
|
|
|
|
2015-04-10 15:34:16 +00:00
|
|
|
10. If you have SELinux on in the enforcing mode, ensure to allow httpd to
|
|
|
|
execute an external command.
|
|
|
|
|
|
|
|
$ /usr/sbin/getsebool httpd_ssi_exec
|
|
|
|
httpd_ssi_exec --> off
|
|
|
|
|
|
|
|
If httpd_ssi_exec is off, switch it to on.
|
|
|
|
|
|
|
|
$ /usr/sbin/setsebool -P httpd_ssi_exec=1
|
|
|
|
$ /usr/sbin/getsebool httpd_ssi_exec
|
|
|
|
httpd_ssi_exec --> on
|
|
|
|
|
|
|
|
The only external command Codepot executes is '/etc/codepot/cloc.pl' which
|
|
|
|
is configured under 'cloc_command_path' in /etc/codepot/codepot.ini. Some
|
|
|
|
CLOC graphs won't work properly when the execution of this command fails.
|
|
|
|
|
|
|
|
11. Restart httpd.
|
2015-04-10 14:48:38 +00:00
|
|
|
|
|
|
|
$ service httpd restart
|
|
|
|
|
2015-04-10 15:34:16 +00:00
|
|
|
12. Access http://your-server/codepot/
|
2015-04-10 14:48:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
INSTALLATION ON DEBIAN
|
|
|
|
|
|
|
|
Here is how to install Codepot into the standard locations under Debian Linux.
|
2010-01-24 14:34:03 +00:00
|
|
|
|
|
|
|
* Install required packages.
|
|
|
|
$ sudo apt-get install subversion
|
|
|
|
$ sudo apt-get install apache2-mpm-prefork
|
|
|
|
$ sudo apt-get install libapache2-svn
|
2010-02-23 13:46:25 +00:00
|
|
|
$ sudo apt-get install libapache2-mod-auth-mysql # optional
|
2010-01-24 14:34:03 +00:00
|
|
|
$ sudo apt-get install php5 php5-ldap php5-mysql
|
|
|
|
$ sudo apt-get install php5-svn # if available
|
|
|
|
|
|
|
|
* Install the mysql server if you want to store projects in a local mysql
|
|
|
|
database.
|
|
|
|
$ sudo apt-get install mysql-server
|
|
|
|
|
|
|
|
* Install the openldap server if you want to use a local LDAP server.
|
|
|
|
$ sudo apt-get install slapd
|
|
|
|
|
|
|
|
* Enable the apache server modules
|
|
|
|
$ sudo a2enmod php5
|
2010-02-23 13:46:25 +00:00
|
|
|
$ sudo a2enmod authnz_ldap # enable ldap-based authentication
|
2010-01-24 14:34:03 +00:00
|
|
|
$ sudo a2enmod dav_svn
|
|
|
|
$ sudo a2enmod userdir # to enable $HOME/public_html
|
|
|
|
$ sudo /etc/init.d/apache2 restart
|
|
|
|
|
|
|
|
* Install source code
|
|
|
|
$ ./configure \
|
|
|
|
--with-wwwdir=/var/www/codepot \
|
|
|
|
--with-cfgdir=/etc/codepot \
|
|
|
|
--with-depotdir=/var/lib/codepot \
|
|
|
|
--with-logdir=/var/log/codepot \
|
|
|
|
--with-cachedir=/var/cache/codepot
|
|
|
|
$ make install
|
|
|
|
$ mkdir -p /var/lib/codepot/svnrepo /var/lib/codepot/files
|
|
|
|
$ mkdir -p /var/cache/codepot /var/log/codepot
|
|
|
|
|
2014-05-20 02:17:35 +00:00
|
|
|
* Customize CFGDIR/codepot.ini
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2011-07-21 14:23:25 +00:00
|
|
|
* Initialize database using CFGDIR/codepot.mysql
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2014-05-20 02:17:35 +00:00
|
|
|
* Configure apache web server authentication for subversion webdav access
|
|
|
|
based on CFGDIR/codepot.httpd
|
2010-01-24 14:34:03 +00:00
|
|
|
|
|
|
|
* To enable SSL
|
|
|
|
$ sudo a2enmod ssl
|
|
|
|
$ sudo a2ensite default-ssl
|
|
|
|
$ sudo hostname actual.domain.name
|
|
|
|
$ sudo make-ssl-cert generate-default-snakeoil --force-overwrite
|
|
|
|
$ sudo hostname ${HOSTNAME}
|
|
|
|
$ sudo /etc/init.d/apache2 restart
|
2010-02-05 13:28:57 +00:00
|
|
|
|
|
|
|
Note that make-ssl-cert is provided by the ssl-cert package.
|
2010-01-24 14:34:03 +00:00
|
|
|
|
2015-04-10 14:48:38 +00:00
|
|
|
|
2010-01-24 14:34:03 +00:00
|
|
|
LICENSE
|
|
|
|
|
|
|
|
This software is licensed under the GNU General Public License.
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
This software contains the following third-party components.
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
Name License
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
CodeIgniter 1.7.2 See src/system/license.txt
|
|
|
|
Google code prettify Apache License 2.0
|
|
|
|
JavaScript Creole 1.0 Wiki Markup Parser See src/js/creole.js
|
2010-04-13 11:38:26 +00:00
|
|
|
jQuery JavaScript Library v1.4.2 See http://jquery.org/license
|
|
|
|
jQuery UI 1.8 MIT or GPL
|
2015-02-03 12:48:20 +00:00
|
|
|
PHPGraphLib MIT
|
2015-02-05 13:12:37 +00:00
|
|
|
CLOC 1.62 GPL
|
2015-03-29 05:03:17 +00:00
|
|
|
Flot https://github.com/flot/flot/blob/master/LICENSE.txt
|
2010-01-24 14:34:03 +00:00
|
|
|
------------------------------------------------------------------------
|
|
|
|
|