1. Paketverzeichnis erstellen
mkdir -p /tmp/myproject/DEBIAN/
1.1. HTML (Test) Seite erstellen
cd /tmp/myproject/
mkdir -p ./var/www/
echo "Test" > ./var/www/test.html
2. Kontrolldatei erstellen
cd /tmp/myproject/
vim ./DEBIAN/control
Package: myserver
Version: 0.0.1
Section: server
Priority: optional
Architecture: all
Essential: no
Installed-Size: 1024
Maintainer: User [snap.in@gmail.com]
Description: Statische Seite für den Webserver
2.1. Post-Install und Pre-Uninstall
cd /tmp/myproject/
echo "service apache2 restart" > ./DEBIAN/postinst
chmod +x ./DEBIAN/postinst
3. DEB Packet erstellen
cd /tmp/
dpkg-deb --build myproject
3.1. Debian Packet ansehen
dpkg-deb --contents myproject.deb
3.2. Debian Packet installieren
sudo dpkg -i myproject.deb
3.3. Debian Packet Auflisten
sudo dpkg --list |grep myproject
3.4. Debian Packet de-installieren
sudo dpkg --remove myproject
Schreibe einen Kommentar