NAS326 install mediawiki

Hello all,

I'm trying to install the mediawiki on my NAS326.

Mediawiki requires:
  1. web server (Apache)
  2. local access to command line
  3. PHP 7.3.19 / 7.4.3+ (perl-compatibility, default library, json)
  4. database
4: PHP-MySQL-myAdmin
3: ?
2: ?
1: I found this question here:

Now, I have installed Entware. How do I proceed to install another apache with full library?

Thank you.

All Replies

  • Mijzelf
    Mijzelf Posts: 2,293
    100 Answers 1000 Comments Friend Collector Fifth Anniversary
     Guru Member
    opkg update
    opkg install apache

    Make sure your apache runs on another port than the firmware apache.
  • Niko88
    Niko88 Posts: 7
    As I understand, the commands should be entered in command line. I have enabled the ssh access for NAS and opened the terminal with Putty. Opkg is not a valid command there. I think I need to install opkg. But there is also no apt-get or yum in available commands list.

    Can you give me one more hint?
  • Mijzelf
    Mijzelf Posts: 2,293
    100 Answers 1000 Comments Friend Collector Fifth Anniversary
     Guru Member
    Entware is not in the path. You'll have to execute


    in the shell, every time you open a new shell. That can be automated, by installing profile-hook_0.1_all.ipk, which patches /etc/profile on boot.

  • Niko88
    Niko88 Posts: 7
    I'm appreciate that you're dealing with my problem. Thank you.

    There is no bin folder in /opt. I've reinstalled Entware. No changes.

    /opt $ ls
    sdk  var
    /opt $ ls var/
    /opt $ ls var/log/
    /opt $ cat var/log/Entware-ng.log
    Opened logfile at Wed Oct 27 23:11:18 CEST 2021
    [23:11:18] Execute /opt/etc/init.d/rc.unslung stop
    [23:11:18]     /i-data/40a999dc/.PKG/Entware-ng/etc/init.d/Entware-ng: line 596: /opt/etc/init.d/rc.unslung: not found
    [23:11:18] Done /opt/etc/init.d/rc.unslung stop
    Closed logfile at Wed Oct 27 23:11:18 CEST 2021

    I've checked the script in path "/i-data/40a999dc/.PKG/Entware-ng/etc/init.d/Entware-ng" on line 596. It is following line:

    FrameworkParseParams "[email protected]"

    with more context:

            OpenLogfile /opt/var/log/Entware-ng.log

            local starter=/opt/etc/init.d/rc.unslung
            echo "Execute ${starter} stop"
            echo "+++Indent+"
            ${starter} stop
            echo "+++Indent-"
            echo "Done ${starter} stop"

            OpenLogfile -
    FrameworkParseParams "[email protected]"

  • Mijzelf
    Mijzelf Posts: 2,293
    100 Answers 1000 Comments Friend Collector Fifth Anniversary
     Guru Member
    Ah, you used another way to install Entware than the one you pointed to in your first post. Doesn't matter, it should work anyway.
    The startscript is supposed to install Entware when it's not installed at bootup. You can give it another try manually:

    /i-data/40a999dc/.PKG/Entware-ng/etc/init.d/Entware-ng startup

    After that either Entware should be installed, or the logfile should point out why not.

  • Niko88
    Niko88 Posts: 7
    I've installed metarepository and then installed entware using App Center in Zyxels GUI.

    I've installed it manually now and opkg is working well.

    Apache2 is installed now too.

    But still not finished:
    Now I've a problem to start the apache2. I've changed the port to 8081 in the config file /opt/etc/apache2/apache2.conf.

    But apache is not available on the ip adress:8081.

    apache -k restart says, apache2 is not running. He tries to start and gives no anser - and no errors.

    Do I need httpd to run apache? httpd miss the config file on startup.

  • Mijzelf
    Mijzelf Posts: 2,293
    100 Answers 1000 Comments Friend Collector Fifth Anniversary
     Guru Member
    In Entware al executable scripts in /opt/etc/init.d/ are executed on boot, with 'start' as parameter. The startscript of apache is S80apache, which is a symlink to /opt/sbin/apachectl. 
    Reading that, it seems
    apachectl configtest
    might tell why apache isn't started. Further it might help to start it manually, when you didn't reboot the box after installing apache. Don't know if Entware autostarts daemons on install.
    If it still doesn't start, and it's not a bad config, have a look if apache does logging, in /opt/var/log/, or something like that.
  • ~ # ls /opt/etc/init.d/
    S80apache   rc.func     rc.unslung

    I've already tested the configs, but forget to tell it.

    ~ # apache2 -t
    Syntax OK
    ~ # apachectl -t
    Syntax OK

    Tried to start manually:
    ~ # apache2 -k restart
    httpd not running, trying to start
    ~ #

    ~ # httpd -t
    httpd: Could not open configuration file /etc/httpd.conf: No such file or directory

    I found the config file in /etc/service_conf/httpd.conf

    I tried to fix it with creating a symbolic link from /etc/httpd.conf to /etc/service_conf/httpd.conf

    /etc # httpd -t
    Syntax OK


    /etc # httpd
    (98)Address already in use: make_sock: could not bind to address
    no listening sockets available, shutting down
    Unable to open logs

    In httpd.conf httpd_zld.conf is linked, where I can change the listening port to 8081 (same as in apach2.conf I thought first).
    But the ip address is still The error message is the same then.

    I tried also "Listen [my nas ip]:8081". 
    The I can access my zyxel gui also with by port 8081 X)

  • Mijzelf
    Mijzelf Posts: 2,293
    100 Answers 1000 Comments Friend Collector Fifth Anniversary
     Guru Member
    You are mixing up the firmware webserver and the Entware one. The Entware one (/opt/sbin/apache) is patched to read it's config in /opt/etc/. The firmware one (/usr/sbin/httpd?) isn't patched, and it expects it's configuration in /etc/httpd.conf. The alternate config is provided by it's startscript, /etc/init.d/
    (BTW, there are two firmware webservers, one reading /etc/service_conf/httpd.conf, and the other reading /etc/pkg_conf/httpd.conf. The actual binary is a duplicate, copied to somewhere on disk, to prevent it to be killed together with the other, on a daemon restart)
    You can ignore the firmware webservers, just make sure the ports don't collide. To be sure you can kill them, so it can't interfere in any way.
    To see if your chosen ports are not in use by something else, you can list all listening ports:
    netstat -lptn
    Have you checked for logs?

  • :s:

    We have 3 ports where httpd is listening to: 80, 8081 and 8082
    We have 9 different httpd processes...
    • 3x /sbin/DAV_httpd, reading /etc/service_conf/httpd_dav.conf
    • 6x /usr/sbin/httpd, reading /etc/service_conf/httpd.conf
    /opt/sbin/apache2 -V says, "etc/apache2/apache2.conf" is the config.
    /opt/sbin/apache2 -t says, Syntax OK

    Logs in /opt/var/log/apache2/error_log says:
    [Sun Nov 07 01:31:26.206626 2021] [core:error] [pid 3327] (2)No such file or directory: AH00099: could not create /opt/var/run/apache2/
    [Sun Nov 07 01:31:26.217532 2021] [core:error] [pid 3327] AH00100: apache2: could not log pid to file /opt/var/run/apache2/

    Permissions for /opt/sbin/apache2 are set to 755

Consumer Product Help Center