[Camps-users] setting up camps on Debian Lenny with Interchange, Mysql and Apache - tutorial

Gert van der Spoel gert at 3edge.com
Mon Jan 25 22:33:29 UTC 2010


Update on the steps ... 


setting up a camp on Debian Lenny with Interchange, Mysql and Apache:

-- prerequisites:
1)  Perl & Module requirements:
http://github.com/devcamps/camps/blob/master/README
2)  git installed
3)  mysql installed
4)  rsync installed
5)  interchange installed

-- setting up camp user and add camp group to the user who will be using
camps (assumes user exists else add it)
1) useradd camp   (assumes /home/camp)
2) chmod g+rx ~camp
3) usermod -a -G camp $produser

-- set up camp binaries
3) git clone git://github.com/devcamps/camps.git /usr/local/camp
4) su - camp
5) ln -s /usr/local/camp/bin .
6) ln -s /usr/local/camp/lib .
7) edit .profile 
# add /usr/local/camp/bin to PATH
PATH="/usr/local/camp/bin:$PATH"
8) source .profile

- at this point you can do 'mkcamp' and it should tell:
  'No camp database configuration found (/home/camp/camp-db-config)!'

-- setting up camp database
9) mysql -u root -p mysql
10) insert into db
values('localhost,','$campdb','$campmngr','Y','Y','Y','Y','Y','Y','N','Y','Y
','Y','Y','Y','Y','Y','Y','N','N');
11) insert into user(Host,User,Password)
values('localhost','$campmngr',password('$password'));
12) create database $campdb;
13) flush privileges;
14) quit;

15) edit camp-db-config
dsn:dbi:mysql:dbname=$campdb
user:$campmngr
password:$password

16) mysql -u $campmngr -p $campdb < schema/mysql.sql

-- add a camp_type to the DB
17) echo "insert into camp_types values('$camptype','$campdescription');" |
mysql -u $campmngr -p $campdb


-- start building up the repository for the base camp
18) mkdir -p $camptype/$camptype.git
19) cd $camptype/$camptype.git
20) git --bare init --shared=group

21) su - $produser
22) mkdir -p tmp/holding
23) cd tmp/holding
24) git init
25) git remote add origin /home/camp/$camptype/$camptype.git
26) touch .gitignore
27) git add .
28) git commit -m "Initial commit"
29) git push --all

-- fill repository with the needed files/directories
30) cp -a $docroot $catroot $interchange .
31) mkdir bin crontab doc migrations tmp
32) touch crontab/.gitignore
33) touch doc/.gitignore
34) touch migrations/.gitignore
35) edit tmp/.gitignore
*





More information about the Camps-users mailing list