====== Installation ======
{{tag>packages apt aptly}}
===== Installation et configuration Aptly =====
Nous installons le paquet
sudo aptitude install aptly
Nous créons le fichier de configuration /etc/aptly.conf, et y aoutons ceci
{
"rootDir": "/var/cache/aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"dependencyVerboseResolve": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
"gpgProvider": "gpg",
"downloadSourcePackages": false,
"skipLegacyPool": true,
"ppaDistributorID": "ubuntu",
"ppaCodename": "",
"FileSystemPublishEndpoints": {
"test": {
"rootDir": "/var/cache/aptly/public",
"linkMethod": "copy",
"verifyMethod": "md5"
}
}
}
Nous créons le répertoire qui va accueillir le dépôt
sudo mkdir /var/cache/aptly
Nous créons l'utilisateur aptly
sudo adduser \
--system \
--disabled-password \
--disabled-login \
--home /var/cache/aptly \
--quiet \
--force-badname \
aptly
Nous mettons les bons droits sur le répertoire du dépôt
sudo chown -v aptly: /var/cache/aptly
===== Installation et confguration Nginx =====
Nous installons nginx
sudo aptitude install nginx
Nous créons le vHost
sudo nano /etc/nginx/sites-available/repo.grohub.pro.conf
Nous ajoutons ce contenu
##
# Nginx vHost
# APT repository
##
server {
listen 80;
server_name repo.grohub.pro;
root /var/cache/aptly/public;
access_log /var/log/nginx/repo.grohub.pro_access.log;
error_log /var/log/nginx/repo.grohub.pro_error.log;
# Add index.php to the list if you are using PHP
index index.html;
location / {
try_files $uri $uri/ =404;
autoindex on;
}
# Block access to "hidden" files and directories whose names begin with a
# period. This includes directories used by version control systems such
# as Subversion or Git to store control files.
location ~ (^|/)\. {
return 403;
}
}
Nous activons le vHost
cd /etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/repo.grohub.pro.conf
Nous rechargeons les configurations de Nginx pour que le nouveau vHost soit pris en charge
sudo service nginx reload
===== Liens =====
*[[https://www.aptly.info|site du projet]]
*[[https://www.aptly.info/doc/|documentation]]