Download a package using apt on Debian/Ubuntu

download package using apt

On Debian and Ubuntu servers, you can download a package using apt download command. apt download PKG_NAME Package will get downloaded to current working directory. Better do this to /tmp to avoid permission errors. Method 2 If you want to download package and dependencies, then use apt-get install –download-only PKG_NAME This will download the package … Read more

Blocking Package Upgrade on Debian/Ubuntu

To block packages from upgrading, you can use command apt-mark hold. apt-mark hold PKG_NAME Example apt-mark hold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common To list packages that are on hold, run root@ip-172-26-8-193:~# apt-mark showhold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common root@ip-172-26-8-193:~# If you want to remove block, you can use apt-mark unhold command. apt-mark unhold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common … Read more

Configure KVM Bridge Network on Debian 10

Before you configure bridge network, make sure you have bridge-utils installed. apt install bridge-utils You may also need ifdown and resolvconf packages installed apt install ifupdown resolvconf Here is the default /etc/network/interfaces i had on the server root@PAR-199235:~# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to … Read more

Install kvm on Debian 10

To install kvm on Debian 10, run apt install -y qemu-kvm Install libvirt, it is a tool to manage kvm apt install libvirt-clients libvirt-daemon libvirt-daemon-system Set libvirtd to start on boot systemctl enable libvirtd Restart libvirtd systemctl restart libvirtd You can see libvirtd status with systemctl status libvirtd Install virtinst, it is used to create … Read more

apt-get An error occurred during the signature verification

When running apt update, i get following error W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.cloud.google.com cloud-sdk-jessie InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 6A030B21BA07F4FB To fix this error, run apt-key … Read more

Expired Updates for this repository will not be applied

When running apt update on a Debian jessie server, i get following error E: Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 513d 20h 41min 47s). Updates for this repository will not be applied To fix the error, run echo “Acquire::Check-Valid-Until false;” | sudo tee -a /etc/apt/apt.conf.d/10-nocheckvalid

Install ModSecurity on Ubuntu/Debian

To install ModSecurity on Debian/Ubuntu Apache web server, run Enable mod security and restart Apache web server Verify mod_security installed with You will see something like To activate ModSecurity rules, run Edit set Restart Apache Verify mod security is working with command You should see “403 Forbidden” error, Here is another test url, which should … Read more

apt force IPv4

One of my internet provider only provide IPv4 connection. When i run apt install command, it failed with error as it try to connect using IPv6. To force apt to use IPv4 only, edit Add If you want to force IPv6, add

Install Elasticsearch 6 on Debian for Magento

To install Elasticsearch for Magento on Debian, install Java 1.8 and apt-transport-https apt install -y openjdk-8-jdk-headless apt install -y apt-transport-https Add key wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add – Add repository echo “deb https://artifacts.elastic.co/packages/6.x/apt stable main” | tee -a /etc/apt/sources.list.d/elastic-6.x.list Install Elasticsearch apt update apt install -y elasticsearch Enable and start Elasticsearch systemctl enable … Read more

debconf: unable to initialize frontend: Dialog

When installing a program in Ubuntu 18.04 server minimal installation, i get following error debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline To fix this, run apt -y install whiptail OR apt … Read more

Tor Hidden Service in Ubuntu/Debian

tor browser

To install tor on Ubuntu/Debian, run apt install tor Default configuration file for tor is /etc/tor/torrc To enable hidden service, edit /etc/tor/torrc vi /etc/tor/torrc uncomment lines HiddenServiceDir /var/lib/tor/hidden_service/ HiddenServicePort 80 127.0.0.1:80 Create folder for your hidden service mkdir /var/lib/tor/hidden_service/ chmod 700 /var/lib/tor/hidden_service/ chown -R debian-tor:debian-tor /var/lib/tor/hidden_service/ You need to install Apache/Nginx etc.. to serve your … Read more

Using apt-get to manage software

apt-get used to manage packages in Debian/Ubuntu server. Install A Package apt-get install PKG_NAME Uninstall a software (keep configuration file) apt-get remove PKG_NAME Uninstall a software and its configuration files apt-get –purge remove PKG_NAME To upgrade a software apt-get upgrade PKG_NAME Update Package Info apt-get update Remove Unwanted Programs apt-get autoremove Back to apt