Install Satis On Ubuntu Sever 13.10/13.04

by
Share this Article: Facebook0Google+0Twitter10LinkedIn0Reddit0StumbleUpon1

Unixmen-packages

Satis is a simple static composer repository generator.

It is used in any composer.json file as input and dumps all the required packages to a composer repository.

Installation OS: Ubuntu Server 13.04

Log in as root and issue the following command to install the required packages.

Note: Make sure you’ve installed PHP 5.3+ packages.

apt-get install apache2 php5 php5-json curl git

Install Composer

cd /usr/local/bin 
curl -sS https://getcomposer.org/installer | php
mv composer.phar composer

Install satis

cd /var/www
composer create-project composer/satis --stability=dev

Install-satis

Build a custom repository

First, We need to define a Satis configuration. Go to satis directory and create a file satis.json as shown below.

cd /var/www/satis
vi satis.json

With this content, We can change these repositories depend on our repository package that we want to download for the future usage:

{
 "name": "Unixmen Repository",
 "homepage": "http://packages.unixmen.com",
 "repositories": [
 { "type": "vcs", "url": "git://git.typo3.org/Packages/TYPO3.Twitter.Bootstrap.git" },
 { "type": "vcs", "url": "git://github.com/doctrine/dbal.git" }
 ],
 "require-all": true,
 "archive": {
 "directory": "dist"
 }
}

Where,

name: Our Repository name
homepage: Our custome homepage url
repository: Where we define the remote repository, and proxy these repository so we have quick access to these packages in the future need. If we put some repository that require authentication we need to have username/password to access that repository or by using key instead if you know Howto. In this example we need to have git account.
vcs: Version control systems
require-all: whether or not to host all versions or just tagged releases
archive: allows us to specify where to store downloads and in which format which support zip,tar.gz
dist: this directory will be create and to store all cache package in this diretory “satis/web/dist”

Stay on satis directory, and build the repository by issuing the following command:

php bin/satis build satis.json web/

In this example we are going to build a repository from svn, git or http, https into a folder called “web”.

After the build is finished, Verify our packages by log in checking in directory “dist” or access via browser.

Create virtualhost,

vi /etc/apache2/sites-available/satis

with content:

<VirtualHost *:80>
 ServerAdmin helpdesk@unixmen.com
 ServerName packages.unixmen.com
 ErrorLog /var/log/error-satis.log
 LogLevel warn
 CustomLog /var/log/access-satis.log combined
 DocumentRoot /var/www/satis/web
 <Directory /var/www/satis/web/>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride all
 Order deny,allow
 Deny from all
 Allow from 192.168.5.0/255.255.255.0 172.16.5.0/255.255.255.0
 </Directory>
</VirtualHost>

Enable site satis:

a2ensite satis

Reload Apache2:

service apache2 reload

Add internal DNS record:

Access to our packages repository homepage:

http://packages.unixmen.com

Unixmen-repo

That’s all for now. Cheers!

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter10LinkedIn0Reddit0StumbleUpon1