wget http://sphinxsearch.com/files/sphinx-0.9.9.tar.gz && \
tar -xzf sphinx-0.9.9.tar.gz && \
cd sphinx-0.9.9 && \
./configure --prefix=/usr && \
make all install
We need to create an additional symlink, because all the startup scripts have RUBY_HOME set to /opt/ruby-enterprise (alternatively we could just patch the files, but this way it is easier and you can update the scripts if needed):
ln -s /usr/ /opt/ruby-enterprise
Fixing git-ultrasphinx
As of March 2013 the git-ultrasphinx script is broken and will fail to start. Please edit /etc/init.d/git-ultrasphinx and check that the start, stop and restart commands are as follows (replace ultrasphinx:daemon with ts if necessary):
The passenger configuration script will tell you exactly what you’ll need to add to your apache configuration. The part you need to copy looks like this:
Please edit your Apache configuration file, and add these lines:
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!
These three lines need to be inserted into
Now edit the config/database.yml and make sure you set the correct username and password in the production section. After that, we need to set a couple of things in config/gitorious.yml:
Make sure you are configuring the right section (not test:, but production:)
repository_base_path should be /var/www/gitorious/repositories
cookie_secret needs to be set to a random value >= 30 characters
gitorious_client_port should be 80
gitorious_host needs to be the exact hostname that clients will use (cookies get messed up otherwise)
archive_cache_dir should be /var/www/gitorious/tarballs
archive_work_dir should be something like /tmp/tarballs-work
hide_http_clone_urls should be true (they require extra unknown setup to work)
is_gitorious_dot_org should be false
Creating the Gitorious database
Because of an incompatibility of RubyGems with Rails < 2.3.11 you need to add the following line at the top of config/boot.rb:
Update: As of Gitorious 3.2 (beginning of 2015) gitorious supports ubuntu directly. See https://gitorious.org/gitorious/ce-installer/ for installation instructions.
Original instructions:
To install gitorious the latest one from git, follow these steps
First, lets go root by using
Installing packages
When installing all these packages, you will be asked for a MySQL root password, which you should remember, because you will need it later on.
Installing the Ruby Gems
Gem.source_index
is being deprecated. Using system 1.8.25 avoids the source_index error.Now we can install all the necessary gems:
Installing the Sphinx Search Server
Getting Gitorious
Easy as pie. Now we just need to put the Gitorious binary on our path:
Configuring services
Gitorious needs a bunch of background services, so we need to copy the supplied startup scripts:
and enable them:
We need to create an additional symlink, because all the startup scripts have RUBY_HOME set to /opt/ruby-enterprise (alternatively we could just patch the files, but this way it is easier and you can update the scripts if needed):
Fixing git-ultrasphinx
As of March 2013 the git-ultrasphinx script is broken and will fail to start. Please edit
/etc/init.d/git-ultrasphinx
and check that thestart
,stop
andrestart
commands are as follows (replaceultrasphinx:daemon
withts
if necessary):Configuring Apache
Passenger
First of all, we need to compile the Apache2 passenger module:
$(gem contents passenger | grep passenger-install-apache2-module)
The passenger configuration script will tell you exactly what you’ll need to add to your apache configuration. The part you need to copy looks like this:
Please edit your Apache configuration file, and add these lines:
After you restart Apache, you are ready to deploy any number of Ruby on Rails applications on Apache, without any further Ruby on Rails-specific configuration! These three lines need to be inserted into
Enabling necessary modules
Creating the Apache2 sites
Type in :
And copy paste the following text
Type in
And copy paste the following text
Now we need to disable the default site, and enable our freshly created Gitorious sites:
Creating a MySQL user for gitorious
Enter the password you made while installing MySQL after the following prompt
Type this in line by line excluding the
mysql>
and changing<insert password>
with your MySQL password you made while installing MySQLConfiguring Gitorious
First of all, we need to make sure we have all gems in the correct version for Gitorious, so we run the following:
Now we can create the user under which Gitorious will run and serve the Git repositories:
Then we need to create some stuff that Gitorious needs to run:
Creating the Gitorious configuration
Lets copy the sample configuration files to the correct path:
Now edit the config/database.yml and make sure you set the correct username and password in the production section. After that, we need to set a couple of things in config/gitorious.yml:
Make sure you are configuring the right section (not test:, but production:)
Because of an incompatibility of RubyGems with Rails < 2.3.11 you need to add the following line at the top of config/boot.rb:
Now we let rake do all the work for us:
Create the Sphinx Cronjob
Create an admin user
Reboot
You’re finally done. Reboot your Ubuntu machine, and your Gitorious installation should be up and running.
Checking possible problems
Browse http://your.server.com/admin/diagnostics in order to check for possible problems.
Source: http://coding-journal.com/installing-gitorious-on-ubuntu-11-04/
You can also try my auto-installer :
http://blog.celogeek.com/201211/272/gitorious-installer-for-ubuntu/
https://gitorious.celogeek.com/gitorious-installer
Tell me if it work for you.