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

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

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

sudo apt-get install apache2 php5 mysql-server

      

... but I'm sure there must be more here than that.

As for webmin, I tried this:

sudo apt-get install webmin

      

.. but it didn't seem to find the package. I see that sourceforge has a .deb package:

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 all this LAMP / webmin setup on a fresh Raspberry Pi at will, as I enjoy experimenting a lot. So how can I write a bash shell script to automatically set the LAMP and webmin stack to a functional state? What is needed?

Note: I've discovered how to do this and I'm about to share by answering my own question below.

+3


source to share


2 answers


In case anyone was wondering, I got this installation script from a friend of mine to work on my current Raspbian installation in vanilla. Also, 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 Wi-Fi network and typing:

https://raspberrypi.local:10000

      



Then log in with the standard raspberry pi credentials (or whatever you change them):

user: pi 
password: raspberry

      

Enjoy awesome webmin atmosphere! Be careful, it eats up a fair amount of cpu cycles when accessing various pages in webmin :)

+3


source


I had a similar script that actually does the same as yours, but on RHEL6 (Red Had Linux 6)

Also, there are hints if you want to install Ruby on Rails and Java JDK 1.7. Now with the title art. LAMP ASCII. (for fun)



#!/bin/bash

echo $"
         _________
        d         b
       d           b
      d             b
     d               b
    d                 b
     ''':::.....:::'''
            fff
          .'   '.
         ^       ^.'--.
         b       d     ,
          czzzzzd       ..oOo

LAMP (Top-of-Stack) Installer by Circuit
" 

echo "
Installing Apache Server
"
sudo yum install httpd

echo "
Starting Apache Server
"
sudo service httpd start

echo "
Opening Port :80 on Apache Firewall
"
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo /sbin/service iptables save

echo "
Restarting Firewall for Changes to Take Effect
"
sudo service iptables restart

echo "
Installing MySQL
"
sudo yum install mysql

echo "
Installing PHP
"
sudo yum install php php-mysql

# Above Ends L(AMP) install. This section is additional common Linux Server Programs

selection=
until [ "$selection" = "0" ]; do
    echo ""
    echo "LAMP INSTALLED. CONTINUE WITH ADDITIONAL SOFTWARE?"
    echo "1 - Yes, Continue with Additional Install"
    echo "2 - No, Exit Installer"
    echo ""
    echo -n "Enter selection: "
    read selection
    echo ""
    case $selection in
        1 ) 
echo "Installing Ruby on Rails"
sudo yum install ruby
sudo yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
sudo yum install ruby-rdoc ruby-devel
sudo gem update
sudo gem update --system
sudo gem install rails

#Install Java JDK (1.7)
sudo yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel 

# Set Java Home
export JAVA_HOME=/opt/java/jdk_1.7.0/
export PATH= ${PATH}:{JAVA_HOME}/bin
;;
        2 ) exit ;;
        * ) echo "Please enter 1, or 2"
    esac
done

      

+2


source







All Articles