Body of Knowledge

knowledge sharing - wiki brain

Archive for August, 2006

Subversion cookbook installation

This is a cookbook for a SubVersion (aka svn) installation on debian and apache2 with LDAP integration authentication.

  1. Install subversion
  2. # apt-get install subversion

  3. Configure subversion
  4. # mkdir /var/lib/svn
    # svnadmin create /var/lib/svn/repos
    # chown www-data:www-data /var/lib/svn/repos/ -R
    

  5. Install Apache2
  6. # apt-get install apache2
  7. Set apache2 modules
  8. # apt-get install libapache-mod-ldap libapache-auth-ldap libapache2-svn

    If needed enable modules

    # a2enmod ldap
    # a2enmod auth_ldap
    

  9. Setup Apache2 website
    • Create folder
    • # mkdir /var/www/svnwebsite

    • Create website configuration file usually in /etc/apache2/sites-available
    • NameVirtualHost svnserver.dev
      <VirtualHost svnserver.dev>
         ServerAdmin webmaster@localhost
      
      DocumentRoot /var/www/svnserver
      
      <Directory />
         Options Indexes FollowSymLinks MultiViews
         Order allow,deny
         allow from all
      
         ### LDAP AUTHENTICATION SPECIFICS
         # Do not check other data besides LDAP
         AuthLDAPAuthoritative on
         # Do basic password authentication in the clear
         AuthType Basic
         # The name of the protected area or “realm”
         AuthName “SVN”
         # AD requires an authenticating DN to access records
         AuthLDAPBindDN “cn=user,ou=Users,dc=domain
         # This is the password for the AuthLDAPBindDN user in AD
         AuthLDAPBindPassword “password”
         # The LDAP query URL
         AuthLDAPURL “ldap://ldapserver:389/ou=Users,dc=domain
         #authorization
         require valid-user
      </Directory>
      
      <Location /repos >
        DAV svn
        SVNParentPath /var/lib/svn/
        AuthzSVNAccessFile /etc/apache2/dav_svn.authz
      </Location>
      

    • Enable new website
    • # a2ensite svnserver

    • Reload new configuration
    • # /etc/init.d/apache2 reload


LINKS
http://www.debian-administration.org/articles/374
http://cedar-solutions.com/JSPWiki/Wiki.jsp?page=SubversionApache2
http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV
http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html

No comments

Web 2.0 - overview in links

Consciousness about what is Web 2.0 has been growing. So tutorials and explanations are showing up everywhere as a way to try and capture the value created by this phenomenon.
With the collaboration of the Gartner Group check these interesting links:

http://www.out-law.com/page-7183
http://news.zdnet.co.uk/business/0,39020645,39280643,00.htm

Growing list of the web 2.0 Son’s (unordered, incomplete):
http://wikipedia.org
http://www.stumbleupon.com
http://digg.com
http://youtube.com
http://del.icio.us
http://www.gravatar.com
youtube.com
http://www.flickr.com
http://maps.google.com
http://technorati.com
linkedin.com

LINKS
http://www.squidoo.com/introtoweb20/

No comments

Multiple web sites installation on wordpress

Here are the basic steps to install another wordpress weblog on a multiple web sites infrastructure over apache2 on debian.

  1. Create the new database
  2. In order to pick a consistent database name, check the existing databases and create a new one. Then create a new username and give it full access.

    mysql> show databases;
    mysql> create database <databasename>;
    mysql> select User, Password, Host from user;
    mysql> grant all privileges on <databasename>.* to <username>@<hostname> identified by “<password>”;
    mysql> flush privileges;
    mysql> exit;

  3. Setup the wp-config file
  4. #copy wp-config.php to config-<website>.php

    Update config-website.php constants with the info from above.

    define(’DB_NAME’, ‘<databasename>’); // The name of the database
    define(’DB_USER’, ‘<username>’); // Your MySQL username
    define(’DB_PASSWORD’, ‘<password>’); // …and password
    define(’DB_HOST’, ‘<hostname>’); // 99% chance you won’t need to change this value

  5. Setup Apache2 web site

Create a website path

#ln -s /usr/share/wordpress /var/www/<website>

Create logs folder

#mkdir /var/log/apache2/<website>

Create a new apache configuration file for the website

/etc/apache2/sites-available/<website>

<VirtualHost *:80>
        ServerName <website>
        ServerAdmin webmaster@<domain>

        DocumentRoot /var/www/<website>/
        <Directory /var/www/<website>>
                Options …

                # hack for nice URIs
                <IfModule mod_rewrite.c>
                        RewriteEngine On
                        RewriteBase /
                        RewriteCond %{REQUEST_FILENAME} !-f
                        RewriteCond %{REQUEST_FILENAME} !-d
                        RewriteRule . /index.php [L]
                </IfModule>

        </Directory>
        …
        LogLevel warn
        ErrorLog /var/log/apache2/<website>/error.log
        CustomLog /var/log/apache2/<website>/access.log combined
        …
</VirtualHost>

Enable the new website

#a2ensite website

Reload Apache2 configuration

#/etc/init.d/apache2 reload

Run the install script: http://<website>/wp-admin/install.php

And Voila, you have a new weblog.

Additional Info:
http://codex.wordpress.org/Installing_WordPress
http://codex.wordpress.org/Installing_Multiple_Blogs

No comments

About

This weblog is an on-going howto tool & memory remainder. Primary principle - have a simple, cookbook-like place with useful information, to come back to, whenever one needs to do or remember something. Do you remember that Brain application while back with thoughts, relations and content clipping, this is what we hope to accomplish here.

If you are looking for the right way to do stuff, the perfect miracle, the most optimized and secured way to do it, the most complete guide to anything… you are in the wrong place.

No comments