Author Topic: Program Recommendation: Webmin  (Read 1732 times)

0 Members and 1 Guest are viewing this topic.

Offline nincehelser

  • Forecaster
  • *****
  • Posts: 1973
    • nincehelser.com
Program Recommendation: Webmin
« on: February 12, 2015, 01:18:35 AM »
If you're new to Unix (or Linux) system administration, I recommend you install Webmin on your Raspberry Pi.  It puts a graphical web front-end on installing and managing all kinds of servers...web, dns, databases, etc.  It's good stuff that has been around for years, and you may have even used it through your favorite web hosting company without ever realizing it.

Read more at: http://www.webmin.com

Professionals use it all the time, too, as it automates a lot of busy-work.

If anyone is interested, I can write a short tutorial how to get it running under Raspian.  It would require to know how to bring up a terminal session, edit and save a file, and then execute a few commands while connected to the Internet.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6679
    • Eagle Bay Weather
Re: Program Recommendation: Webmin
« Reply #1 on: February 12, 2015, 10:12:02 AM »
I'd appreciate a tutorial on that.  New to Raspian/Denbian.  (I run other distros but the whole Pi thing is a new learning experience)

Offline nincehelser

  • Forecaster
  • *****
  • Posts: 1973
    • nincehelser.com
Re: Program Recommendation: Webmin
« Reply #2 on: February 12, 2015, 04:07:12 PM »
FIRST DRAFT

This tutorial helps you install Webmin on a Raspberry Pi running Raspbian OS using the package manager APT (aka apt-get).

If you're new to Unix (or Linux) system administration, I recommend you install Webmin on your Raspberry Pi.  It puts a graphical web front-end on installing and managing all kinds of servers...web, dns, databases, etc.  It's good stuff that has been around for years, and you may have even used it through your favorite web hosting company without ever realizing it.

Read more at: http://www.webmin.com

There are various different ways you can install Webmin.  I prefer this method using the package manager APT which will get you up and running with a minimum of fuss.

Assumptions:
A) Your Pi is up and running under Raspbian on your network and has access to the internet.
B) You know how to open a terminal window and execute commands.
C) We will assume you are using the default user "pi" which has permission to use "sudo" by default.
D) You will execute all commands from within user pi's home directory.
E) You know how to edit and save a file on a Linux machine, preferably with a program like "vi" or "nano".



Step 1: Add the Webmin Repositories to /etc/apt/sources.list
APT stands for "Advanced Packaging Tool".  It's a standard program on Raspbian that manages the software packages on your system making them easier to install, update, and remove.  In order to do its job, it keeps a list of "repositories" on the internet that are trusted software sites where your system can go to fetch the software it needs as it needs them.  Webmin maintains its own repositories, so we will have to add them to the system file /etc/apt/sources.list

How you edit this file is up to you, but personally I use the full-screen text editor "vi" within a terminal session.  Others might use "nano" or "emacs".  You could also use any file editor on the graphical desktop.  It really doesn't matter as long as you are comfortable within your favorite editor and can add these lines and save the file.

Remember, it is a system file, so you're going to need to have elevated privileges to change it.  From the command line, this is often done using "sudo", which will let you execute commands as if you had "root" privileges.  In Raspbian, the user "pi" automatically has "sudo" privileges by default.

So in my case, I would execute the following command within a terminal session:

Code: [Select]
sudo vi /etc/apt/sources.list

Then within the vi editor, I would add these lines at the bottom of the file.  The hashtag indicates a comment line.  It's only needed as a reminder of why you added these two repositories.

Code: [Select]
# The next two lines are the repositories for the program Webmin
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

After you've added the lines, save the file and exit vi (or whatever file editor you are using).



Step 2: Get and Install the Repository Security Key
This isn't a licensing key allowing you to use the software, but rather a security key that allows APT to verify any software you grab from the repository is authentic and hasn't been tampered with.

Execute the following two commands from the command line:

Code: [Select]
sudo wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc

"wget" is a command that grabs information from a website and stores it as a text file.  In this case it is going to www.webmin.com and grabbing the file "jcameron-key.asc" and storing it on your local system.  It will be stored in the whatever directory you execute the command from, so that's why I suggested you be in pi's home directory.

The second line is an APT command that tells APT to add the security key to its "keychain" for future use.  After this is done, you can delete the jcameron-key.asc file from Pi's home directory if you want.



Step 3: Refresh APT and Get and Install Webmin
This is where the magic happens.  A lot of stuff will pass by your screen, most of which you can ignore unless the process runs into major errors (like the internet being down). 

Execute the first line.  Wait for it to process and stop.  That brings APT up-to-date with the changes we made, plus any other updates that might have occurred on the software repositories.  Then execute the second line.  That will actually install Webmin and get it running in the background.  It will probably stop to tell you how much space it plans to use and ask you if you really want to continue.  Say "y" and let it run.

Code: [Select]
sudo apt-get update
sudo apt-get install webmin

After it finishes, you should see some instructions about how to access Webmin.  Basically all you need to do is open a web browser pointed at your Pi's IP address and port 10000. 

Quote
** initializing cache. This may take a while **
Setting up webmin (1.730) ...
Webmin install complete. You can now login to https://raspberrypi:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.


In my particular case, the URL will look like: https://192.168.254.25:10000

This should be done with https, not http.  Your browser will likely warn you that it can't verify the security certificate, but that's because you haven't spent money buying an "official" SSL certificate.  For normal personal use this a non-issue.  Just tell your browser to ignore it and move on.

To log into Webmin, just use the user name and password of someone who has "sudo" privileges.  In this case, the user "pi" will work fine.

If everything is working, you should now see the Webmin desktop and can start exploring!
« Last Edit: February 12, 2015, 04:12:48 PM by nincehelser »

Offline nincehelser

  • Forecaster
  • *****
  • Posts: 1973
    • nincehelser.com
Re: Program Recommendation: Webmin
« Reply #3 on: February 12, 2015, 04:10:06 PM »
See draft above.  I hope I didn't make it too wordy, but I tried to explain what some of the commands do for people very new to this sort of thing.

I ran through it myself with a new PI and it seems to work.  Let me know if anything is unclear or needs more elaboration.

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6679
    • Eagle Bay Weather
Re: Program Recommendation: Webmin
« Reply #4 on: February 12, 2015, 06:21:35 PM »
Awesome!  Thanks so much.  That should be a sticky in this forum or maybe the Raspberry Pi forum.

Offline yahtah

  • Forecaster
  • *****
  • Posts: 463
  • Too soon old, too late smart.
Re: Program Recommendation: Webmin
« Reply #5 on: March 02, 2015, 12:29:37 AM »
Awesome! Thanks for all of that.
-Lee

Davis VP2, Meteostick, RPi Meteohub, KCACALIF33
working on an RPi webcam and a 30 ft. flagpole...

 

anything