7 Replies Latest reply on Jun 18, 2015 5:41 AM by rgb

    unable to install Apache web server on galileo

    Swamy_Govinda

      Hello Every one,

      I want to install apache web server on Galileo Generation 2 board running Yocto OS.

      Can anyone tell me how to do this ?

      what are the commands required?

      or

      can i add the apache repository while building the yocto image?

      if so how to add apache repository while building itself?

        • 1. Re: unable to install Apache web server on galileo
          rgb

          Hi Swamy

          It depends on the OS you are using. If you are using AlexT's version of the standard yocto with development tools you should just need to run opkg update, opkg install apache.(apache is in his repository)

          rgb

          • 2. Re: unable to install Apache web server on galileo
            bhavani@y

            Hi rgb

            we completed opkg install apache , but we are unable to acces ip of the galileo in web browser can you please help us..

            • 3. Re: unable to install Apache web server on galileo
              rgb

              Hi

              I don't know why you would want to run something as resource intensive or complex as Apache.

              per Apache installation

              if you are running The Intel(R) IoT devkit SD card image you already have lighttpd

              Another option would be Flask, which uses a lot less resources, is much easier to use and, since it is written in Python, will allow you to interface easily with the GPIO pins so you can control pins via the web site or post data from sensors.

              to install

              Download

              distribute from  https://pypi.python.org/pypi/distribute/0.6.49

              and uncompress it.

              Make a “tmp” directory on /media/realroot s

              Use filezilla or whatever you want to move it to the tmp directory.

              SSH into your galileo and go to the directory you copied distribute and install it with

              #python distribute_setup.py

              depending on how good your internet is you can then run

              # easy_install flask

              if there is a problem you can run

              #easy_install pip

              And then

              #pip install flask

              once you have it installed you can go to the web site at http://flask.pocoo.org/

              or look on the internet and find examples

               

              If you still want to run Apache, note that Apache doesn't run automatically. you need to configure it.

              I made a mistake in my earlier post, the package is called apache2 and you can install the following packages from AlexT;s site

              apache2 - 2.4.10-r0 - Apache HTTP Server 

              apache2-dbg - 2.4.10-r0 - Apache HTTP Server - Debugging files

              apache2-dev - 2.4.10-r0 - Apache HTTP Server - Development files

              apache2-doc - 2.4.10-r0 - Apache HTTP Server - Documentation files

              apache2-scripts - 2.4.10-r0 - Apache HTTP Server

              After installation you will have the following

              web server binaries    

              /usr/sbin/httpd

               

              config files           

              # ls -l /etc/apache2

              drwxr-xr-x 2 root root  1024 Feb  1 16:42 conf.d

              drwxr-xr-x 2 root root  1024 Jun 12 20:19 extra

              -rw-r--r-- 1 root root 19424 Feb  1 16:41 httpd.conf

              -rw-r--r-- 1 root root 13077 Feb  1 16:41 magic

              -rw-r--r-- 1 root root 53011 Feb  1 16:41 mime.types

              drwxr-xr-x 2 root root  1024 Feb  1 16:42 modules.d

               

              file to run Apache automatically on startup

              # ls -l /etc/init.d/apache2

              -rwxr-xr-x 1 root root 1382 Feb  1 16:41 /etc/init.d/apache2

               

               

              log files    

              # ls -l  /var/apache2/logs

              -rw-r--r-- 1 root root    0 Jun 12 20:19 access_log

              -rw-r--r-- 1 root root 1096 Jun 12 20:36 error_log

               

              You would then need to edit the htttpd.conf file and set up the web site and set it up tor run on startup

              I would suggest you go to the Apache web site for instruction or get one of the books on how to set up a server.

              Final note is I don't think it is worth the effort. It would be much easier to run a light weight web server

              rgb

              • 4. Re: unable to install Apache web server on galileo
                rgb

                for some reason I can't edit my last post

                Update

                when you do an installation from AlexT's site it sets up Apache to run at startup

                /etc/rc0.d/K20apache2

                  /etc/rc1.d/K20apache2

                  /etc/rc2.d/S91apache2

                  /etc/rc3.d/S91apache2

                  /etc/rc4.d/S91apache2

                  /etc/rc5.d/S91apache2

                  /etc/rc6.d/K20apache2

                If you look in the log files you will probably see an error message because you haven't configured it or created a web page

                rgb

                • 5. Re: unable to install Apache web server on galileo
                  bhavani@y

                  hi, greetings.

                   

                  I have installed flash and I am able to access web page created through my ip address also.

                   

                  I just want to send values from sensor to web page.Can you help me?

                  • 6. Re: unable to install Apache web server on galileo
                    bhavani@y

                    Hi Swamy,

                    command to install apache in yocto is

                     

                    opkg install apache2

                    • 7. Re: unable to install Apache web server on galileo
                      rgb

                      Hi Bhavani

                      Matt Richardson has a good tutorial and examples at

                      http://mattrichardson.com/Raspberry-Pi-Flask/

                      attached is my adaption of his program that displays information taken from the Galileo and allows you to control LEDs via a web page

                      rgb