Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- install scmgit postgresql84-server ruby18-postgres-pr ruby18-RMagick thin
- gem install rail -v=*
- cp /mnt/usb/redmine-1.1.1.tar.gz /home/david
- # cp /usr/pkg/share/examples/rc.d/pgsql /etc/rc.d/pgsql
- # echo "pgsql=YES" >> /etc/rc.conf
- $ /etc/rc.d/pgsql initdb -E unicode
- /etc/rc.d/pgsql start
- # su - pgsql
- # createuser -I -E -P -S -R -D redmine # Enter the desired password we asked
- # createdb -T template0 -O redmine -E UTF8
- # cd ~_redmine
- # tar xvfz redmine-0.8.6.tar.gz
- # mv redmine-0.8.6 redmine # non obligatoire
- # cd redmine
- # cp config/database.yml.example config/database.yml
- nano config/database.yml and add
- production:
- adapter: postgresql
- database: redmine
- host: localhost
- username: redmine
- password: my_pwd
- RAILS_ENV=production rake db:migrate
- RAILS_ENV=production rake redmine:load_default_data
- # mkdir tmp public/plugin_assets
- # sudo chown -R _redmine:_redmine files log tmp public/plugin_assets
- # sudo chmod -R 755 files log tmp public/plugin_assets
- Configure the thin server
- Consider here that redmine is installed in /home/_redmine/redmine
- We need to create a rcng script to be able to start thin at boot time: /etc/rc.d/thin
- #!/bin/sh
- #
- # PROVIDE: thin
- # REQUIRE: DAEMON
- . /etc/rc.subr
- name="thin"
- rcvar=$name
- command="/usr/pkg/bin/$name"
- stop_cmd="/usr/pkg/bin/thin -c /home/_redmine/redmine -e production stop"
- command_args="-c /home/_redmine/redmine -e production -d -u _redmine -g _redmine start"
- load_rc_config $name
- run_rc_command $1
- Now activate it
- # chmod 755 /etc/rc.d/thin
- # echo "thin=YES" >> /etc/rc.conf
- # /etc/rc.d/thin start
- Configure the git-daemon
- Here consider that the repositories will be in /home/_git/repos.
- As for thin we will need create a rcng script: /etc/rc.d/gitdaemon
- #!/bin/sh
- #
- # PROVIDE: gitdaemon
- # REQUIRE: DAEMON
- . /etc/rc.subr
- name="gitdaemon"
- rcvar=$name
- pidfile="/var/run/$name.pid"
- command="/usr/pkg/libexec/git-core/git-daemon"
- command_args="--detach --base-path=/home/_git/repos --user=_git --group=_git --pid-file=$pidfile"
- load_rc_config $name
- run_rc_command $1
- Activate it:
- # chmod 755 /etc/rc.d/gitdaemon
- # echo "gitdaemon=YES" >> /etc/rc.conf
- # /etc/rc.d/gitdaemon start
- When adding new daemon export ready repositories, in /home/_git/repos, they will be automatically available.
- For example, considering we have /home/_git/repos/CBlog.git you can clone it like this:
- git clone git://mybeautifulserver/Cblog.git
- To be able tu push, you just have to play with ssh and the authorized_keys.
- You can also restrict the shell using git-shell instead of /bin/sh for the _git user.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement