Posts Tagged apt-get

Ping external domain failed on Debian Stretch

After a debian stretch server was setup, pinging external domain always failed. That makes installing any packages / software impossible because it cannot access the server.

After a lengthy searching on Google, finally the problem was nailed down and solved easily. The cause of the problem is the Debian Network Manager. To solve this problem, please execute the following command line commands in a terminal.

apt-get remove --purge network-manager
nano /etc/resolv.conf

Add the following line to the resolv.conf file.


You should change the IP address based on your wireless network accordingly.

After the change, reboot your computer to a fresh start. Then execute the following commands.

apt-get update
apt-get install <your package name>


Tags: , ,

Install mod_geoip for Apache2 webserver

This guide explains how to set up mod_geoip for Apache2 on a Ubuntu server. mod_geoip looks up the IP address of the end client. This allows you discover who and from where the people are visiting your website. In addition, you can use the information to redirect or block users.

Use the following command to install mod_geoip:

apt-get install libapache2-mod-geoip

After the installation is complete, you can find the GeoIP databases (GeoIP.dat, GeoIPv6.dat) in the /usr/share/GeoIP directory. As the geographic allocation of IP addresses can change over time, it’s a good idea to download the newest GeoIP.dat now:

cd /usr/share/GeoIP/
mv GeoIP.dat GeoIP.dat_orig
mv GeoIPv6.dat GeoIPv6.dat_orig
gunzip GeoIP.dat.gz
gunzip GeoIPv6.dat.gz

Next we restart Apache:

/etc/init.d/apache2 restart

Hooray! Done. You have the lastest geoip database!


Tags: , , , , ,

Tools to switch on/off services of Ubuntu Linux

In GUI environment you can use System > Administration > Services to switch on/off services.

In CLI environment you can use rcconf to do the same thing.

apt-get install rcconf

For detail information, please refer to the following article.

Ubuntu Linux stop / disable GNOME GUI ~


Tags: , , , ,