Created
November 2, 2010 15:18
-
-
Save ddunlop/659756 to your computer and use it in GitHub Desktop.
gitorious install on centos 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
as root | |
$ yum update | |
$ shutdown -r 0 | |
back as root | |
$ cd /usr/local/src | |
$ wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
$ rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
$ yum -y install git apg geoip httpd mysql mysql-server mysql-devel sqlite sqlite-devel httpd-devel libjpeg libjpeg-devel readline-devel curl-devel pcre pcre-devel zlib zlib-devel openssl openssl-devel libyaml libyaml-devel gcc gcc-c++ autoconf automake java-1.6.0-openjdk java-1.6.0-openjdk-devel sphinx mod_xsendfile memcached | |
$ service mysqld start | |
$ mysqladmin -u root password '[MYSQL_PASSWORD]' | |
$ mysql -u root -p | |
> CREATE DATABASE gitorious; | |
> CREATE USER 'gitorious'@'localhost' IDENTIFIED BY '[GITORIOUS_MYSQL_PASSWORD]'; | |
> GRANT ALL PRIVILEGES ON gitorious.* TO 'gitorious'@'localhost'; | |
chkconfig mysqld on | |
edit /etc/profile | |
** TODO why did I have to edit /etc/bashrc instead of /etc/profile | |
*** when this was in /etc/profile then env couldn't find rails | |
add | |
export PATH=/opt/ruby-enterprise/bin:$PATH | |
export LD_LIBRARY_PATH="/usr/local/lib" | |
export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib" | |
/etc/ld.so.conf | |
prepend | |
/usr/local/lib | |
$ source /etc/profile | |
$ ldconfig | |
$ cd /usr/local/src | |
$ wget 'http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz' | |
$ tar -zxvf onig-5.9.1.tar.gz | |
$ cd onig-5.9.1 | |
$ ./configure | |
$ make && make install | |
$ cd .. | |
$ wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.5-5.tar.bz2 | |
$ tar jxvf ImageMagick-6.6.5-5.tar.bz2 | |
$ cd ImageMagick-6.6.5-5 | |
$ ./configure --prefix=/usr | |
$ make && make install | |
$ cd .. | |
$ wget 'http://apache.spd.co.il/activemq/apache-activemq/5.3.2/apache-activemq-5.3.2-bin.tar.gz' | |
$ tar xzvf apache-activemq-5.3.2-bin.tar.gz -C /opt/ | |
$ ln -s /opt/apache-activemq-5.3.2 /opt/apache-activemq | |
$ sh -c 'echo "export ACTIVEMQ_HOME=/opt/apache-activemq" >> /etc/activemq.conf' | |
$ sh -c 'echo "export JAVA_HOME=/usr/" >> /etc/activemq.conf' | |
$ sh -c 'echo "export ACTIVEMQ_OPTS=\"-Xmx512M\"" >> /etc/activemq.conf' | |
Change the config to work with: http://activemq.apache.org/web-console.html | |
$ vi /opt/apache-activemq/webapps/camel/WEB-INF/applicationContext.xml | |
backup activemq.xml | |
$ mv /opt/apache-activemq/conf/activemq.xml /opt/apache-activemq/conf/activemq.xml.org | |
use stomp config: | |
$ cp /opt/apache-activemq/conf/activemq-stomp.xml /opt/apache-activemq/conf/activemq.xml | |
*** TODO add this as a startup script | |
I setup the /etc/init.d/activemq but didn't use it did: | |
$ /opt/apache-activemq/bin/linux-x86-64 | |
$ ./activemq start | |
http://activemq.apache.org/unix-service.html | |
RUBY | |
$cd /usr/local/src | |
$ wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz | |
$ tar zxvf ruby-enterprise-1.8.7-2010.02.tar.gz | |
$ cd ruby-enterprise-1.8.7-2010.02 | |
$ ./installer | |
$ ln -s /opt/ruby-enterprise-1.8.7-2010.02 /opt/ruby-enterprise | |
$ export RUBY_HOME=/opt/ruby-enterprise | |
$ export GEM_HOME=$RUBY_HOME/lib/ruby/gems/1.8 | |
$ export PATH=$RUBY_HOME/bin:$PATH | |
gem install -b --no-ri --no-rdoc rmagick | |
gem install -b --no-ri --no-rdoc chronic | |
gem install -b --no-ri --no-rdoc geoip | |
gem install -b --no-ri --no-rdoc daemons | |
gem install -b --no-ri --no-rdoc hoe | |
gem install -b --no-ri --no-rdoc echoe | |
gem install -b --no-ri --no-rdoc ruby-yadis | |
gem install -b --no-ri --no-rdoc ruby-openid | |
gem install -b --no-ri --no-rdoc mime-types | |
gem install -b --no-ri --no-rdoc diff-lcs | |
gem install -b --no-ri --no-rdoc json | |
gem install -b --no-ri --no-rdoc ruby-hmac | |
gem install -b --no-ri --no-rdoc rake | |
gem install -b --no-ri --no-rdoc stompserver | |
gem install -b --no-ri --no-rdoc rails | |
gem install -b --no-ri --no-rdoc ultrasphinx | |
gem install -b --no-ri --no-rdoc -v 1.0 raspell | |
gem install -b --no-ri --no-rdoc -v 1.0.1 rack | |
gem install -b --no-ri --no-rdoc -v 1.3.1.1 rdiscount | |
gem install -b --no-ri --no-rdoc -v 1.1 stomp | |
gem uninstall -v 3.0.0 passenger | |
gem install -b --no-ri --no-rdoc -v 2.2.11 passenger | |
gem uninstall -v 1.2.1 rack | |
gem uninstall i18n | |
$ git clone git://gitorious.org/gitorious/mainline.git gitorious | |
$ ln -s /opt/gitorious/ /var/www/gitorious | |
$ ln -s /opt/gitorious/script/gitorious /usr/local/bin/gitorious | |
$ rm -f /opt/gitorious/public/.htaccess | |
$ cd /var/www/gitorious | |
$ mkdir tmp/pids | |
$ mkdir public/tarballs-cache | |
$ mkdir public/tarballs-work | |
adduser git | |
chown -R git:git /opt/gitorious | |
mkdir /var/git | |
chown -R git:git /var/git | |
su - git | |
edit .bash_profile | |
append: | |
export RUBY_HOME=/opt/ruby-enterprise | |
export GEM_HOME=$RUBY_HOME/lib/ruby/gems/1.8 | |
export PATH=$RUBY_HOME/bin:$PAT | |
source .bash_profile | |
mkdir ~/.ssh | |
chmod -R 700 /home/git/.ssh | |
touch /home/git/.ssh/authorized_keys | |
chmod 600 /home/git/.ssh/authorized_keys | |
mkdir /opt/gitorious/repos | |
chmod -R 700 /opt/gitorious/repos | |
cd /var/www/gitorious | |
cp database.sample.yml database.yml | |
cp gitorious.sample.yml gitorious.yml | |
cp broker.yml.example broker.yml | |
edit database.yml - make sure to change production | |
edit gitorious.yml -- use `apg -m 64` for cookie_secret then put on one line make sure your changing production | |
** TODO - show config | |
$ rake gems:install RAILS_ENV=production | |
$ rake db:migrate RAILS_ENV=production | |
$ rake ultrasphinx:bootstrap RAILS_ENV=production | |
$ crontab -e | |
* */1 * * * cd /var/www/gitorious && /usr/local/ruby/rake ultrasphinx:index RAILS_ENV=production | |
disable girorious ssl: | |
edit config/environments/production.rb and add a line: | |
SslRequirement.disable_ssl_check = true | |
passenger-install-apache2-module | |
edit /etc/httpd/conf.d/gitorious | |
LoadModule passenger_module /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so | |
PassengerRoot /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.11 | |
PassengerRuby /opt/ruby-enterprise/bin/ruby | |
<VirtualHost *:80> | |
ServerName git.forbes.com | |
DocumentRoot /var/www/gitorious/public | |
<Directory /var/www/gitorious/public> | |
AllowOverride all | |
Options -MultiViews | |
</Directory> | |
</VirtualHost> | |
$ chkconfig httpd on | |
$ service httpd start | |
$ cd /etc/init.d | |
$ cp /opt/gitorious/doc/templates/centos/git-daemon . | |
$ chmod +x git-daemon | |
$ chkconfig --add git-daemon | |
$ chkconfig git-daemon on | |
$ service git-daemon start | |
$ cp /opt/gitorious/doc/templates/centos/git-ultrasphinx . | |
$ chmod +x git-ultrasphinx | |
$ chkconfig --add git-ultrasphinx | |
$ service git-ultrasphinx restart | |
$ chkconfig memcached on | |
$ service memcached start | |
edit /etc/init.d/gitorious-poller | |
#!/bin/sh | |
# | |
# poller Startup script for Gitorious's poller | |
# | |
# chkconfig: - 86 15 | |
# description: Gitorious's poller script is simple worker that polls \ | |
# tasks from stomp server queue and executes them. | |
# processname: poller | |
/bin/su - git -c "cd /var/www/gitorious; RAILS_ENV=production ./script/poller $@" | |
$ chmod +x gitorious-poller | |
$ chkconfig --add gitorious-poller | |
$ chkconfig gitorious-poller on | |
$ service gitorious-poller start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment