Webmin ubuntu is a powerful web-based interface for system administration for Linux and Unix. Using any modern web browser, you can setup user accounts, configure Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin.
If you haven’t already, go ahead and download Webmin. To download webmin (the latest version at the moment this article was written) go to the following link: http://prdownloads.sourceforge.net/webadmin/webmin_1.791_all.deb
or type wget http://prdownloads.sourceforge.net/webadmin/webmin_1.791_all.deb
Next step is to install or configure webmin ubuntu. To run the installation or the configuration type sudo dpkg –install webmin_1.740_all.deb
After you run the installation you will most likely get some messages about missing dependencies. To solve the missing dependencies type sudo apt-get install -f
If you are using apt-get install you have a Debian based linux distro. After a fresh and clean install of you linux you probably want to start installing your services and tools. And if linux then asks for a missing cd after trying to run apt-get install, it is because the install cd is listed as a repository in your sources.
It is quite easy to fix if you know about repositories and the source file. Use your favourite (or any other) text editor and open up /etc/apt/sources.list Look for a line that looks something like this: deb cdrom:[Debian GNU/Linux 8.4.0 _Jessie_ – Official amd64 NETINST Binary-1 20160402-14:42]/ jessie main
And use a # to comment it out, or just delete the line. If you use the net installer versions, they dont contain much more than the base system anyway. And you will kind of need an internet repository to install software packages.
You can now run apt-get update to update your repository sources. It should now download the software packages from internet when you run apt-get install. If you still have problems make sure you have the following lines, or at least main and updates repositories.
# Main deb http://httpredir.debian.org/debian/ jessie main deb-src http://httpredir.debian.org/debian/ jessie main
# Updates deb http://httpredir.debian.org/debian/ jessie-updates main contrib non-free deb-src http://httpredir.debian.org/debian/ jessie-updates main contrib non-free
This example is taken from a Debian 8.4 installation.
That should be it for fixing the missing cd error when running apt-get install. To get the best Debian based distro, try Debian here: https://www.debian.org/distrib/
On Ubuntu you can chose change hostname temporary or permanent. If you are looking for the Debian Hostname Change, have a look at this link.
Temporary Ubuntu Change Hostname:
To change the hostname temporary, you can use the hostname command. Like in this example: hostname web.example.com
This will create a temporary hostname. But after a reboot the hostname is back to what it was before you issued the hostname command. To make it permanent follow next step.
Permanent Ubuntu Change Hostname:
To change the hostname permanent you will need to edit two files. The first file is /etc/hostname That file contains hostname. In this example web.example.com, web is the hostname.
The second file you need to edit is /etc/hosts That file contains the domain name, and FQDN (Fully qualified domain name). In the web.example.com, example.com is the domain name. And web.example.com is the FQDN.
The /etc/hostname file is easy. Just change the one word into your new hostname.
The /etc/hosts is a bit different. Here is an example if we want to change it to web.example.com 127.0.0.1 localhost 127.0.1.1 web.example.com web
Take note that you first have the FQDN and then the hostname.
Make Ubuntu Change Hostname into effect: By just changing the hostname and hosts file, doesn’t make any immediate effects. You will need to restart the hostname service before making the new hostname take effect.
sudo restart hostname or sudo service hostname restart
If for some reason none of those commands should work. I would use the hostname command to make a temporary hostname (If you can’t just restart the server). And next time the server reboots, it will read the hostname from its config files. Then it should be all good.
Regarding Ubuntu Static IP is mostly a straight forward thing. I wouldn’t think it should be needed on a rented VPS. As they mostly get their IP addresses assigned. Anyway, here is how we do Ubuntu Static IP.
First we need to edit the network interface. sudo vim /etc/network/interfaces
Change the line: iface eth0 inet dhcp
to: iface eth0 inet static
And then add (in this example we use the ip 192.168.1.151) address 192.168.1.151 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 # Optional broadcast 192.168.1.255 # Optional
To exit VIM, press ESC and then type wq and then press enter to save the file.
Now your network interface is configured to use a static ip. It is still not active. To activate the static ip you will need to reboot or restart the network interface. In Ubuntu this will have to be done like this: sudo ifdown eth0 && sudo ifup eth0
Take notice of the both sudo. And you need to issue both commands at once if your are doing this via ssh or any other remote terminal. If not the network interface will go down, and so will your connection.
If you have directory browsing enabled, which it is by default, your users can browse the directories on your web server. This is not particularly good regarding security. So we better disable directory browsing to be on the safe side.
On a Debian server we do that quite easily in the domain config at /etc/apache2/sites-available/ If you have setup more than one domain on your web server, you should go to your domains config file. Here is an example: ‹/etc/apache2/sites-available/example.com.conf (if you use Apache prior to 2.4 you might not have the .conf extension)
Insert this line into the config file: Options -Indexes
If you only have one domain hosted on your server, you most likely uses the default domain config. Edit this file: /etc/apache2/sites-available/default Look for the line: Options Indexes FollowSymLinks MultiViews ExecCGI And change to: Options -Indexes FollowSymLinks MultiViews ExecCGI
You can now restart or reload your apache server. service apache2 restart
KVM virtualisation is a Kernel based virtualisation. It actually stands for Kernel-based Virtual Machine. It means that each of your virtual machine will have it´s own virtual hardware, such as network card, graphic card, memory and hard drive.
To setup KVM virtualisation it require a multicore cpu. And virtualisation needs to be activated in the BIOS. Look for virtualisation, Intel VT-x (vmx) or AMD-v settings, and enable it. You might be able to install KVM without virtualisation enabled in the BIOS. But the virtual machines will be extremely slow.
Here is how to install KVM on a minimal Debian installation.
First we assume a ssh server is installed, and sudo.
Step 1: First we install the essential packages for KVM. apt-get install kvm libvirt-bin virtinst bridge-utils
If you want to be able to controll the virtual machines from your own users instead of root. Add your user to the libvirt group. adduser john libvirt
Step 2: To be able to give network access to your virtual computers you will need to bridge your network card. To do this we will change the network interface file. (Change the ip´s to match your network) nano /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
# The loopback network interface auto lo iface lo inet loopback
# The primary network interface iface eth0 inet manual
Apt-get remove is not always enough to remove a package completely. If you try to remove in example the mysql-server package with just apt-get remove, the settings and lot of dependencies will still be left. We will need to purge and clean up. Here is a short desription on how to perform a complete removal of mysql-server with settings and everything.
First you need to run the remove –purge command. [sourcecode language=”css”] apt-get remove –purge mysql\* [/sourcecode] Next step is probably not recommended by debian.org as it will increase their bandwith (unless you run your own apt-get cache server, which I recommend everyone to do). That is to clean the package cache. apt-get clean
The last step is often forgotten, included by my self. That is to update the file database. Else references to all the deleted files will still be present. updatedb
Thats it, and your mysql server is now completely gone.
On my home network for some reason my ubuntu machines can´t resolve hostnames when first installed. None of my Debian machines seems to have this issue. If you try to ping a global ip, like googles free name server on 188.8.131.52, and that work there is a DNS issue. Pinging google.com fails. Can´t resolve hostname it says.
If you try # cat /etc/resolv.conf
And it don´t contain any name server, we will need to add one. You could add it directly into resolve.conf, but that would be deleted when you reboot your machine. So the way we need to do it is to add it to the network interface. Like this
# vim /etc/network/interfaces
If eth0 is your network interface, you add a line dns-nameserver to it. On my home network I can use 192.168.1.1 as name server, since that is the gateway to my isp router.
My interfaces file with the dans-nameserver entry. # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.91 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1
Reboot and your ubuntu machine should resolve just fine. Note! If your gateway don´t work as name server you can try some of googles name server. The ip´s are 184.108.40.206 and 220.127.116.11