Install LAMP, FTP and PhpMyAdmin on your Onion Omega



  • i facing error while running the phpmyadmin

    Fatal error: Cannot redeclare class phpseclib\Crypt\Random in /usr/share/htdocs/phpmyadmin/libraries/phpseclib/Crypt/Random.php on line 43

    but if i check the php version and i will get an normal output without error .

    <?php

    // Show all information, defaults to INFO_ALL
    phpinfo();

    // Show just the module information.
    // phpinfo(8) yields identical results.
    phpinfo(INFO_MODULES);

    ?>



  • @chee-sum-kong Hmmm, seems that there might be some bug in the code for phpmyadmin. According to this post, this bug should have been addressed in version 4.4.15.4 of phpmyadmin: https://github.com/phpmyadmin/phpmyadmin/issues/11892. Can you check which version you are running? We may need to manually upgrade the package to a newer version.



  • Why can't I install the apache?
    The following message appears :

    root@Omega-****:/# opkg install apache
    Unknown package 'apache'.
    Collected errors:

    • opkg_install_cmd: Cannot install package apache.


  • @dawn-dew
    Uncomment the fifth line of the /etc/opkg/distfeeds.conf file.
    Maybe you should uncomment the first and the second lines too because of dependencies.

    #src/gz reboot_core http://downloads.lede-project.org/snapshots/targets/ramips/mt7688/packages
    #src/gz reboot_base http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base
    #src/gz reboot_onion http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/onion
    ## src/gz reboot_luci http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/luci
    src/gz reboot_packages http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages
    ## src/gz reboot_routing http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/routing
    ## src/gz reboot_telephony http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/telephony
    src/gz omega2_core http://repo.onion.io/omega2/packages/core
    src/gz omega2_base http://repo.onion.io/omega2/packages/base
    src/gz omega2_packages http://repo.onion.io/omega2/packages/packages
    src/gz omega2_onion http://repo.onion.io/omega2/packages/onion
    

    opkg update
    opkg find apache
    opkg info apache
    opkg install apache

    Good luck!



  • @György-Farkas
    Thank you very much.)
    Thanks to you, the apache was installed.

    Another problem came up.

    root@Omega-****:~# apachectl start
    (125)Address in use: AH00072: make_sock: could not bind to address 192.168.0.22:80
    no listening sockets available, shutting down
    AH00015: Unable to open logs



  • @dawn-dew
    You have an Omega2(+). Your starting point - this whole thread up to your post, including the tutorial(s) - is related to Omega ie. the previous version. I supposed you know this. So probably this is not an out-of-the-box solution for you.

    opkg info apache has some busybox warning.
    There is a running web server (uhttpd) on Omega2 by default.
    You should inspect the config file(s) extensively.



  • @György-Farkas hi!
    I still can't install the apache on my Omega2+

    Juste extended the memory to a USB, uncommented the 5-th line in distfeeds.conf
    Everything seems to be working, but apache isn't getting installed.

    if I go "opkg install apache" it says "Unknown package 'apache'"
    and if "opgk find apache" it says "Segmentation fault"

    Please help.
    Thanks.



  • @Kirill-Metrokhin are you running b160 firmware? that segmentation fault warning was a problem prior to build b160. the apache may be on a different server. if you already use b160 try re-install if not too big an issue.



  • @Kirill-Metrokhin said in Install LAMP, FTP and PhpMyAdmin on your Onion Omega:

    Everything seems to be working, but apache isn't getting installed.

    if I go "opkg install apache" it says "Unknown package 'apache'"
    and if "opgk find apache" it says "Segmentation fault"

    opkg update
    opkg list | grep apache
    opkg install apache

    root@Omega-5BE1:~# opkg list | grep apache
    Segmentation fault
    root@Omega-5BE1:~# opkg install apache
    Unknown package 'apache'.
    Collected errors:
     * opkg_install_cmd: Cannot install package apache.
    

    That Segmentation fault is an opkg bug - see also here.
    Sorry I don't know why opkg install apache isn't working now. :-(


    Here you are an alternative method:
    Download that package to some directory - for example with wget <package.ipk>
    Within that directory run the command opkg install <package.ipk>

    root@Omega-5BE1:~# wget https://downloads.lede-project.org/releases/packages-17.01/mipsel_24kc/packages/apache_2.4.25-1_mipsel_24kc.ipk
    --2017-10-15 10:30:10--  https://downloads.lede-project.org/releases/packages-17.01/mipsel_24kc/packages/apache_2.4.25-1_mipsel_24kc.ipk
    Resolving downloads.lede-project.org... 148.251.78.235, 2a01:4f8:202:43ea::3
    Connecting to downloads.lede-project.org|148.251.78.235|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 731110 (714K) [application/octet-stream]
    Saving to: 'apache_2.4.25-1_mipsel_24kc.ipk'
    
    apache_2.4.25-1_mipsel_24kc.ipk    100%[==============================================================>] 713.97K  99.9KB/s    in 7.1s    
    
    2017-10-15 10:30:17 (101 KB/s) - 'apache_2.4.25-1_mipsel_24kc.ipk' saved [731110/731110]
    
    
    root@Omega-5BE1:~# opkg install apache_2.4.25-1_mipsel_24kc.ipk
    Installing apache (2.4.25-1) to root...
    Installing libapr (1.6.2-1) to root...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages/libapr_1.6.2-1_mipsel_24kc.ipk
    Installing libuuid (2.29.2-1) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libuuid_2.29.2-1_mipsel_24kc.ipk
    Installing libaprutil (1.6.0-1) to root...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages/libaprutil_1.6.0-1_mipsel_24kc.ipk
    Installing unixodbc (2.3.4-5) to root...
    Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages/unixodbc_2.3.4-5_mipsel_24kc.ipk
    Installing libltdl (2.4-2) to root...
    Downloading http://repo.onion.io/omega2/packages/base/libltdl_2.4-2_mipsel_24kc.ipk
    rm: can't remove '/usr/sbin/httpd': No such file or directory
    You should take a look in the initscripts, busybox's httpd 
     uses some parameters which are maybe unsupported by apache.
    Configuring libuuid.
    Configuring libapr.
    Configuring libaprutil.
    Configuring libltdl.
    Configuring unixodbc.
    cat: can't open '/etc/odbcinst.ini.d/*.ini': No such file or directory
    Configuring apache.
    

    Good luck!



  • @György-Farkas, @Douglas-Kryder
    Thanks guys a lot! I was searching around, don't know exactly what I've done but apache installed now. :-D



Looks like your connection to Onion Community was lost, please wait while we try to reconnect.