I am searching for LOCAL SERVER software [SOLVED]

Post here if you are a new Porteus member and you're looking for some help.
softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software [SOLVED]

Post#1 by softappweber » 06 Aug 2023, 18:29

I am searching for LOCAL SERVER software like XAMPP, WAMP, NGNIX etc which can run on Porteus, either as appimage or xzm. I want to use it for web development so that I can test my code in browser with localhost.
Clone of VS code is available on appimagehub dot com, if someone needs it. Thank you everyone, please guide me about it, have a nice day!
Last edited by softappweber on 09 Aug 2023, 03:55, edited 1 time in total.

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

I am searching for LOCAL SERVER software

Post#2 by Blaze » 06 Aug 2023, 18:51

Hi softappweber.

Open terminal and run

Code: Select all

su
toor
getpkg httpd apr apr-util mariadb php perl
and + nginx-1.25.1-x86_64-1_SBo.xzm

Bonus .NET Core https://www.mediafire.com/folder/mbt1yd ... /.NET_Core
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software

Post#3 by softappweber » 07 Aug 2023, 02:35

Blaze wrote:
06 Aug 2023, 18:51
Hi softappweber.

Open terminal and run

Code: Select all

su
toor
getpkg httpd apr apr-util mariadb php perl
and + nginx-1.25.1-x86_64-1_SBo.xzm

Bonus .NET Core https://www.mediafire.com/folder/mbt1yd ... /.NET_Core
Hi Blaze, thank you for the reply. This forum always relies promptly and gives the exact solution. I will try my best to do the same once I am able to contribute.
I installed(?) these xzm files, but when I activated ngnix.xzm, it got activated, but I could not see it anywhere in menu. I want to use it for HTML, CSS and JS only. Please guide me about it.

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

I am searching for LOCAL SERVER software

Post#4 by Blaze » 07 Aug 2023, 10:45

softappweber wrote:
07 Aug 2023, 02:35
but I could not see it anywhere in menu.
and that's right what no icon for web server.

For nginx you need mariadb and php

Create database

Code: Select all

su
toor
mysql_install_db --user=mysql
chmod 755 /etc/rc.d/rc.mysqld
chown -R mysql.mysql /var/lib/mysql
/etc/rc.d/rc.mysqld start
/usr/bin/mysqladmin -u root password 'here_your_password_for_you_db'
/usr/bin/mysqladmin -u root -p create name_of_your_database
Remember the user name (root), password (here_your_password_for_you_db), and database name (name_of_your_database)
These data are necessary for example, to install wordpress or any other site which requires a database.

Create directory of your website

Code: Select all

mkdir /var/www
now your website in this directory /var/www - here you can create your pages, for example index.html

Setting the time zone by default in PHP
Open /etc/httpd/php.ini

find

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
replace with

Code: Select all

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/Moscow"
Other time zones http://php.net/manual/en/timezones.europe.php

Configure nginx
Open /etc/nginx/nginx.conf

find

Code: Select all

#gzip  on;
replace with

Code: Select all

gzip  on;
find

Code: Select all

#charset koi8-r;
replace with

Code: Select all

charset utf8;
find

Code: Select all

        location / {
            root   html;
            index  index.html index.htm;
        }
replace with

Code: Select all

        location / {
            root   /var/www/;
            index  index.php index.html index.htm;
        }
find

Code: Select all

        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}
replace with

Code: Select all

        location ~ \.php$ {
            root           /var/www;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
Activate PHP support for nginx

Code: Select all

chmod +x /etc/rc.d/rc.php-fpm
/etc/rc.d/rc.php-fpm start
Run nginx

Code: Select all

chmod +x /etc/rc.d/rc.nginx
/etc/rc.d/rc.nginx start
try to test php

Code: Select all

echo "<?php phpinfo(); ?>" > /var/www/test.php
Open in your browser your test.php via 127.0.0.1 or http://localhost/ or your local IP, or your domain (if you have it)
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software

Post#5 by softappweber » 07 Aug 2023, 16:40

:happy62: Blaze thank you! a huge thank you....I am writing it hurriedly, I will implement it soon, quickly. Thank you PORTEUS TEAM!

softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software

Post#6 by softappweber » 08 Aug 2023, 04:24

Image


Hi tha was so simple and quick, but its possible because you told me what to do and where to find the folder. All OK, I only need to run JS code with HTML and CSS, no database and PHP. I would be able to do it with this current Ngnix right? I always use Porteus in copy2ram mode. Thank You Blaze :) , why do I need to edit config file for JS only? And why localhost and 127.0.0.1 gives following error?
Image

I can access HTML file only through this URL file:///var/www/html/index.html not using localhost or 127.0.0.1, thta's the local server address.
Image

Please help me about it. :sos:

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

I am searching for LOCAL SERVER software

Post#7 by Blaze » 08 Aug 2023, 05:13

softappweber, I think you ignor steps, or not copy modules to /mnt/here-is-your-path/porteus/modules
Image
your index.html must be placed to /var/www

BTW if you set x

Code: Select all

chmod +x /etc/rc.d/rc.nginx
after reboot Porteus you don't need to do again

Code: Select all

chmod +x /etc/rc.d/rc.nginx
/etc/rc.d/rc.nginx start
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software

Post#8 by softappweber » 08 Aug 2023, 05:52

Hi Blaze, thank you for reply. Will you please tell me origin of the error I am getting after running these commands :

Image

I am familiar with terminal commands of Ubuntu, but I have never come across any webpage which lists commands of Porteus, do you know about such webpage? su and then enter to get in sudo mode...these command are unknown to me. :shock:
It is one time setup, once I will come to know this, I will use flawlessly afterwards. Porteus is really robust and powerful OS, it is best for coding due to its fast speed. Anyone reading this thread will definitely get benefits of it, due to screenshots it becomes easy to understand as well. Btw, I use postimg dot cc, its upload speed is fast.

I really salute Dev team of Porteus, what a OS they have made!

softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software

Post#9 by softappweber » 08 Aug 2023, 05:58

I am also glad to have come across the Dev Team directly. You have created a rocksome OS! Thank you. My hard-disk is completely dead due to continuous electricity fluctuations which occurred few days before due to heavy rain, despite having inverter that continuous fluctuations badly affected my hard-disk.

I can still use my laptop like before just because of Porteus OS which I run using USB and in copy2ram mode. Since imp. data is backed up on cloud on two to three places, hard-disk is irrelevant.


I will also participate in monthly subscription model if you have such plan for future. Thank you and long live Porteus!

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

I am searching for LOCAL SERVER software

Post#10 by Blaze » 08 Aug 2023, 08:05

Hi softappweber.
Do you use Porteus 5.0 with all updates (you can find Porteus Settings Centre at the start menu)?

I have gd-2.3.3-x86_64-2

Code: Select all

# ls -1 /var/lib/pkgtools/packages/*gd*
/var/lib/pkgtools/packages/gd-2.3.3-x86_64-2
/var/lib/pkgtools/packages/gdbm-1.22-x86_64-1
/var/lib/pkgtools/packages/gdk-pixbuf2-2.42.6-x86_64-1
/var/lib/pkgtools/packages/pcsc-lite-1.9.9-x86_64-1gds
/var/lib/pkgtools/packages/sysklogd-2.3.0-x86_64-1
If you don't have it download and activate gd-2.3.3-x86_64-2.xzm
softappweber wrote:
08 Aug 2023, 05:52
I am familiar with terminal commands of Ubuntu, but I have never come across any webpage which lists commands of Porteus, do you know about such webpage?
In terminal

Code: Select all

su
toor

# pmod is a simple wrapper for slackpkg
pmod -u
pmod -s search-by-package-name
pmod -m package-name

# or
slackpkg update gpg
slackpkg update
slackpkg install package-name

# or (download packages from the Slackware tree)
getpkg package-name
or you can use https://pkgs.org/
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

softappweber
White ninja
White ninja
Posts: 24
Joined: 22 Jun 2022, 15:42
Distribution: 0

I am searching for LOCAL SERVER software

Post#11 by softappweber » 08 Aug 2023, 08:58

Oh hats off to you Blaze! I can easily access localhost page now :

Image

Your replies were really very informative and helpful, I understood many new things regarding Porteus. I am saving this page as html and PDF for future referene.

Thank you very much! Have a nice day and lots of respect & best of luck to you Blaze! :celebrate3:

Post Reply