Tuesday, November 17, 2009

Thursday, November 12, 2009

SVN on Windows

SVN Server
Download windows installer
Choose an installation path without white space in it to make things easier (or remember to escape spaces in the path)
Go for svnserve for an easy setup
Run install with the above choices
Open firewall poer 3690
Verify that the user the service is running as has write access to the repository folder
Create repository (command line)
Edit ./conf/svnserve.conf and ./conf/passwd

Tortoise SVN Client
Download tortoise svn client (explorer shell extension)
Exclude folders not used for workspaces (ie Exclude paths: , Include paths: C:\svnwc\)

Started with a repository under N:\Development\SVN_Rep and in that the folder structure like pbweb/trunk/.... I.e. the repository was supposed to store several projects.

Since trac wants to match it’s projects with a specific svn repository I changed the repository layout to only one project in each repository. So now the repository is in N:\Development\SVN_Rep\projectname. And the folder structure starts with trunk/....

The server serves all repositories under N:\Development\SVN_Rep.

Some CentOS basics

First try
Some basic app admin
chkconfig, activate/deactivate services,
service, start and stop services

Get VNC up and running
Follow the instructions.
If you get an error that says bad display name when starting the vgcnserver at the end make sure that the machine recognizes it’s name. If not add it to /etc/hosts.
Open up the firewall for 5901 (and perhaps more) by running system-config-securitylevel

service httpd start
chkconfig httpd on
Works to connect from my windows machine after this

Followed the instructions approximately.
Got an error at the Starting postgresql service: prompt.
Read something about SELinux causing problems so I shut it down and rebooted and the server seems to be running. Don’t know if it was related with SELinux though.

Second try
During installation
For tasks, choose “Desktop – Gnome” and Server
Disable firewall and SELinux

Installed software
Perl 5.8.8
mod_perl 2.0.4
httpd 2.2.3
PostgreSQL not installed
Check installed version:

# rpm -q

As above.

8.3.6 install
# rpm -Uvh http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-6.noarch.rpm
# yum install postgresql-server
Followed the book then a bit for initdb:

# su - postgres
-bash-3.2$ initdb
-bash-3.2$ exit
Start service and autostart at reboot:

# service postgresql start
# chkconfig postgresql on

Ended up with 8.3.9 but that should be ok.

Createuser and db:

# su - postgres
-bash-3.2$ createuser XYZ
-bash-3.2$ createdb -O XYZ XYZ

service vsftpd start
chkconfig vsftpd on

Add data to db
# psql -U XYZ < XYZ.sql

As above.

Perl stuff

Started with:

# yum install postgresql-devel.x86_64
# yum install gcc
since pg_config and gcc is needed when running:

# cpan install Bundle::DBD::Pg
When checking things out with get_datasources.pl (from the book) make sure to use a user that can read db and script. I added XYZ as a unix user and copied the script to ~ before getting it to work. Don’t know why though.

# cpan install Catalyst::Devel
Results in a million dependencies, just said yes to everything. Something was installed.

Readability and Instapaper

Great tools for reading articles:

Open stuff for web development