NAS326 install mediawiki
Niko88
Posts: 7
Hello all,
I'm trying to install the mediawiki on my NAS326.
Mediawiki requires:
3: ?
2: ?
1: I found this question here:
https://community.zyxel.com/en/discussion/9327/nas326-apache-web-server/p2
Now, I have installed Entware. How do I proceed to install another apache with full library?
Thank you.
I'm trying to install the mediawiki on my NAS326.
Mediawiki requires:
- web server (Apache)
- local access to command line
- PHP 7.3.19 / 7.4.3+ (perl-compatibility, default library, json)
- database
3: ?
2: ?
1: I found this question here:
https://community.zyxel.com/en/discussion/9327/nas326-apache-web-server/p2
Now, I have installed Entware. How do I proceed to install another apache with full library?
Thank you.
0
All Replies
-
opkg updateopkg install apacheMake sure your apache runs on another port than the firmware apache.0
-
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?0 -
Entware is not in the path. You'll have to executePATH=/opt/bin:${PATH}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.
0 -
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 $ lssdk var/opt $ ls var/log/opt $ ls var/log/Entware-ng.log/opt $ cat var/log/Entware-ng.logOpened 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 stopClosed 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 "$@"
with more context:Shutdown(){OpenLogfile /opt/var/log/Entware-ng.loglocal starter=/opt/etc/init.d/rc.unslungecho "Execute ${starter} stop"echo "+++Indent+"${starter} stopecho "+++Indent-"echo "Done ${starter} stop"OpenLogfile -}FrameworkParseParams "$@"
0 -
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 startupAfter that either Entware should be installed, or the logfile should point out why not.
0 -
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.
0 -
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 seemsapachectl configtestmight 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.0
-
~ # ls /opt/etc/init.d/S80apache rc.func rc.unslung
I've already tested the configs, but forget to tell it.~ # apache2 -tSyntax OK~ # apachectl -tSyntax OK
Tried to start manually:~ # apache2 -k restarthttpd not running, trying to start~ #~ # httpd -thttpd: 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
But:/etc # httpd(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80no listening sockets available, shutting downUnable 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 0.0.0.0. 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)
confused.0 -
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/httpd.sh.(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 -lptnHave you checked for logs?
0 -
:
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 -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/httpd.pid.zWOjxp[Sun Nov 07 01:31:26.217532 2021] [core:error] [pid 3327] AH00100: apache2: could not log pid to file /opt/var/run/apache2/httpd.pid
Permissions for /opt/sbin/apache2 are set to 7550
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 151 Nebula Ideas
- 98 Nebula Status and Incidents
- 5.7K Security
- 277 USG FLEX H Series
- 277 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 42 Wireless Ideas
- 6.4K Consumer Product
- 250 Service & License
- 395 News and Release
- 85 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.6K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 75 Security Highlight