Search code examples
bashraspberry-pilampraspbianwebmin

Can I run a LAMP server with a webmin interface on my raspberry pi on raspbian?


I would like to run a LAMP server with a webmin interface on my raspberry pi.

I am running the latest Raspbian. I have found some packages useful for parts of this, such as:

sudo apt-get install apache2 php5 mysql-server

...but I'm sure there should be more involved than that.

As for webmin, I tried the obvious:

sudo apt-get install webmin

..but it did not appear to find a package. I see that sourceforge has a .deb package up here:

http://sourceforge.net/projects/webadmin/files/webmin/1.720/

Can I install webmin on the Pi from the .deb package? And can I do it from the command line and completely from the Pi from SSH?

I would like it to be easy to install this entire LAMP / webmin setup on a fresh Raspberry Pi at will, as I like to experiment a lot. So, how can I write a bash shell script to automatically install the LAMP stack and webmin into a functional state? What is required?

NOTE: I have discovered how to do this and am going to share by answering my own question, below.


Solution

  • In case anyone was interested, I've gotten this install script from my friend to work on my current vanilla Raspbian install. Plus, ascii art!:

    echo $"
            _________
           d         b
          d           b
         d             b
        d               b
       d                 b
        ''':::.....:::'''
               fff
             .'   '.
            ^       ^.'--.
            b       d     ,
             czzzzzd       ..oOo
    
    LAMP (Top-of-Stack) Installer by Circuit
    "
    sudo groupadd -f -g33 www-data
    sudo apt-get -y update
    sudo apt-get -y install apache2 php5 libapache2-mod-php5
    sudo apt-get -y install mysql-server mysql-client php5-mysql
    sudo apt-get -y install phpmyadmin
    sudo apt-get -y install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python libapt-pkg-perl
    wget http://downloads.sourceforge.net/project/webadmin/webmin/1.720/webmin_1.720_all.deb
    sudo dpkg --install webmin_1.720_all.deb
    

    Then I can access the interface by going to any web browser on my wifi network and typing:

    https://raspberrypi.local:10000
    

    Then log in with the default raspberry pi credentials (or whatever you changed them to):

    user: pi 
    password: raspberry
    

    Enjoy webmin awesomeness! Be warned, it eats up a fair amount of CPU cycles when you access various pages in webmin :)