Categories

Debian 8 Jessie – gdal_translate

Outil : gdal_translate

installer le package apt-get install dans-gdal-scripts Fichier /etc/apt/sources.list deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates maindeb http://ftp.debian.org/debian/ jessie-updates main deb-src http://ftp.debian.org/debian/ jessie-updates maindeb http://ftp.debian.org/debian/ jessie main deb-src http://ftp.debian.org/debian/ jessie main Tester gdal_translate -of JPEG -projwin 115.84878 -31.97746 115.85742 -31.98821 frmt_wms_landgate_mosaicMetro.xml NomImage.jpg Like Dislike

Raspberry – Installation docker raspbian

root@raspberrypi:/home/pi# curl -sSL https://get.docker.com | sh WARNING: raspbian is no longer updated @ https://get.docker.com/ Installing the legacy docker-engine package… + sh -c sleep 3; apt-get update Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB] Get:2 http://archive.raspberrypi.org jessie InRelease [22.9 kB] Get:3 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,533 kB] Get:4 http://archive.raspberrypi.org jessie/main armhf Packages [169 kB] Get:5 http://archive.raspberrypi.org jessie/ui […]

Debian – Jessie – Installation docker-ce

 

Script d’installation DOCKER CE

root@srv-khanh78:/data/DOCKER/DEBIAN# cat debian-install-docker-ce.sh #!/bin/bash

# https://docs.docker.com/engine/installation/linux/docker-ce/debian/#docker-ee-customers

sudo apt-get remove docker docker-engine docker.io cp -p /etc/apt/source.list /etc/apt/source.list.`date ‘+%d%m%Y’` echo “deb http://mirror.cc.columbia.edu/debian jessie main contrib non-free” >>/etc/apt/source.list sudo apt-get update

sudo apt-get dist-upgrade -y

sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | sudo […]

Debian – GISPRO – QGIS problème edition

Erreur lors de l’impression

Server Internal Error

QGIS Server setup notes

X dependency

The most important is probably the xorg requirement that Qt libs have when rendering to PDF, this is an undocumented requirement and the fix is not trivial.

The symptoms

Server chrashes after a GetPrint request with segfault, output in system logs:

[…]

Debian – Docker – workpress-apache2-php7 / mariadb / phpmyadmin / portainer

Pré-requis : installer docker.io et docker-compose

4 containers :

wordpress-php7.1 phpmyadmin mariadb -> base de données portainer –> gestion du container

Créer l’image wordpress et php7 à partir du GIT

mkdir /root/wordpress

cd /root/wordpress

git clone https://github.com/docker-library/wordpress.git .

Cloning into ‘.’…

remote: Counting objects: 641, done.

remote: Compressing objects: 100% (23/23), done.

remote: Total 641 […]

Debian – Docker – installation docker-compse

Script d’installation docker-compose Debian jessie

root@srv-khanh78:/data/DOCKER/DEBIAN# cat debian-install-docker-compose.sh #!/bin/bash # get latest docker compose released tagCOMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep ‘tag_name’ | cut -d\” -f4) COMPOSE_VERSION=1.12.0

# Install docker-compose

curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose /usr/local/bin/docker-compose –version root@srv-khanh78:/data/DOCKER/DEBIAN# #!/bin/bash

# get latest docker compose released tag

[…]

Debian – NGINX – PHP 7 cache pour booster site Web

Configuring Nginx FastCGI Cache Editer le fichier : /etc/nginx/nginx.conf

Ajouter ces 2 lignes dans la section http

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=phpcache:100m inactive=60m; fastcgi_cache_key “$scheme$request_method$host$request_uri”;

 

Edit Nginx Server Block. vi /etc/nginx/sites-enabled/wordpress

Scroll down to the location ~ \.php$ section. Add the following lines in this section.

fastcgi_cache phpcache; fastcgi_cache_valid 200 301 302 60m; add_header X-FastCGI-Cache […]

Debian – Docker push hub.docker.com

Déposer l’image sur le cloud hub.docker.com

root@debian8:~/GISPRO# docker images

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE

apache2php7qgis latest 9146cf511785 26 minutes ago 919.4 MB

khanh78/apache2php7 latest 6ef28d59e9b4 About an hour ago 358.2 MB

debian latest 0aa3f9bb64ef 4 weeks ago 123.4 MB

Se logger sur le site :

root@debian8:~/GISPRO# docker login

Username: khanh78

Password:

Email: khanh.dinh@free.fr

[…]

Debian – Docker Container Apache2 – PHP7

Create container – Apach2 and PHP7

Create Dockerfile

root@debian8:~/GISPRO# more Dockerfile

#Docker file Apache 2 + PHP 7.0

FROM debian

MAINTAINER khanh dinh / docker-apache2-php7.0

RUN export DEBIAN_FRONTEND=noninteractive

ENV DEBIAN_FRONTEND noninteractive

RUN dpkg-divert –local –rename –add /sbin/initctl

RUN apt-get update

RUN apt-get install -y wget apt-utils

#add

RUN echo “deb http://packages.dotdeb.org jessie all” > /etc/apt/sources.list.d/dotdeb.list

[…]

Debian : – Docker – container glances

Exemple de création d’un conteneur :

créer un fichier Dockerfile

root@debian8:~/docker/glances# cat Dockerfile # # Glances Dockerfile # # https://github.com/khanh78/debian-glances # # Pull base image. FROM debian MAINTAINER Khanh, khanh.dinh@free.fr

# Make sure the package repository is up to date RUN apt-get -y update# Install Glances

#Install Glances RUN apt-get install -y glances

2. Lancer […]