HTML Sandbox WAMP or ?

The whole reason I have made the move to Linux was to provide a stable environment so I could build Drupal web sites and learn how to Drupal/php etc. off the web.

In windows, I used the WAMP server to do this but windows isn’t stable enough, so it is my thought that I can do the same thing in linux but, on a stabler platform.

My questions are many, my Linux experience, not so great but I am learning.

I hope I have provided enough information
First question’

I see in yast that php. apache , mysql and perl are installed but I cannot “run” them nor can I even find their directories - how do I set them up for my purposes?

SYSTEM:
OS: Linux 3.1.10-1.16-desktop x86_64
System: openSUSE 12.1 (x86_64)
KDE: 4.8.4 (4.8.4) “release 513”

AMD Phenom™ II X6 1090T Processor
Speed: 3,200.00 MHz
Cores: 5
Display Info
Vendor: ATI Technologies Inc
Model:
2D driver: fglrx
3D driver: ATI

As a first step, when I need a LAMP I install the corresponding pattern
to be sure everything which is basic stuff is in place


su -
zypper install -t pattern lamp_server
zypper inr #only if you want installs also all recommends

try that and see if it wants to install something in addition to the
things you already have and accept it so that you have a well defined
software collection as base for further discussions.
The “zypper inr” you have to inspect if you really want what it tells you.

After that let’s come back to your question which probably is more about
configuration.


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

coasterad wrote:
> I see in yast that php. apache , mysql and perl are installed but I
> cannot “run” them nor can I even find their directories - how do I set
> them up for my purposes?

You might find these documents helpful:

http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/cha.apache2.html

http://en.opensuse.org/SDB:Linux_Apache_MySQL_PHP

The second one says it was tested with 11.1, so you might find some
differences. It would be worth updating the page if you do.

The first one is a chapter in a book. You might find the rest of the
book useful as well.

Oh, and you say that you can see in YaST that they are installed. Did
you also see in YaST the place to configure [some of] them?

Thank you for your time.
I performed the suggestions you gave with the following results


zypper install -t pattern lamp_server
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  apache2-doc apache2-example-pages apache2-mod_perl apache2-mod_python patterns-openSUSE-lamp_server perl-Encode-Locale 
  perl-File-Listing perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-Socket-INET6 
  perl-IO-Socket-SSL perl-libwww-perl perl-LWP-MediaTypes perl-Net-HTTP perl-Net-LibIDN perl-Net-SSLeay perl-Socket6 perl-Tie-IxHash 
  perl-TimeDate perl-URI perl-WWW-RobotRules yast2-http-server 

The following NEW patterns are going to be installed:
  base lamp_server 

The following recommended packages were automatically selected:
  apache2-doc apache2-example-pages apache2-mod_perl apache2-mod_python perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Net-HTTP 
  perl-Net-LibIDN perl-TimeDate yast2-http-server 

The following packages are suggested, but will not be installed:
  postgresql postgresql-contrib postgresql-server 

25 new packages to install.
Overall download size: 6.6 MiB. After the operation, additional 24.6 MiB will be used.
Continue? [y/n/?] (y): y
Invalid answer 'zypper inr #only if you want installs also all recommendsy'. [y/n/?] (y): y
Retrieving package apache2-doc-2.2.21-3.6.1.noarch (1/25), 1.8 MiB (11.6 MiB unpacked)
Retrieving: apache2-doc-2.2.21-3.6.1.noarch.rpm [done (199.0 KiB/s)]
Retrieving package apache2-example-pages-2.2.21-3.6.1.x86_64 (2/25), 30.0 KiB (1.0 KiB unpacked)
Retrieving: apache2-example-pages-2.2.21-3.6.1.x86_64.rpm [done]
Retrieving package perl-Encode-Locale-1.02-5.1.2.noarch (3/25), 18.0 KiB (18.0 KiB unpacked)
Retrieving: perl-Encode-Locale-1.02-5.1.2.noarch.rpm [done (0 B/s)]
Retrieving package perl-HTTP-Date-6.00-3.1.2.noarch (4/25), 13.0 KiB (20.0 KiB unpacked)
Retrieving: perl-HTTP-Date-6.00-3.1.2.noarch.rpm [done]
Retrieving package perl-LWP-MediaTypes-6.01-3.1.2.noarch (5/25), 19.0 KiB (43.0 KiB unpacked)
Retrieving: perl-LWP-MediaTypes-6.01-3.1.2.noarch.rpm [done]
Retrieving package perl-Net-HTTP-6.01-2.1.2.noarch (6/25), 24.0 KiB (46.0 KiB unpacked)
Retrieving: perl-Net-HTTP-6.01-2.1.2.noarch.rpm [done]
Retrieving package perl-TimeDate-1.20-16.1.2.noarch (7/25), 45.0 KiB (97.0 KiB unpacked)
Retrieving: perl-TimeDate-1.20-16.1.2.noarch.rpm [done]
Retrieving package perl-URI-1.59-3.1.2.noarch (8/25), 98.0 KiB (188.0 KiB unpacked)
Retrieving: perl-URI-1.59-3.1.2.noarch.rpm [done]
Retrieving package yast2-http-server-2.21.0-2.1.1.noarch (9/25), 100.0 KiB (659.0 KiB unpacked)
Retrieving: yast2-http-server-2.21.0-2.1.1.noarch.rpm [done (28.0 KiB/s)]
Retrieving package apache2-mod_python-3.3.1-167.1.2.x86_64 (10/25), 799.0 KiB (3.1 MiB unpacked)
Retrieving: apache2-mod_python-3.3.1-167.1.2.x86_64.rpm [done (209.4 KiB/s)]
Retrieving package patterns-openSUSE-lamp_server-12.1-25.21.1.x86_64 (11/25), 25.0 KiB (1.0 KiB unpacked)
Retrieving: patterns-openSUSE-lamp_server-12.1-25.21.1.x86_64.rpm [done]
Retrieving package perl-Net-LibIDN-0.12-6.1.3.x86_64 (12/25), 24.0 KiB (50.0 KiB unpacked)
Retrieving: perl-Net-LibIDN-0.12-6.1.3.x86_64.rpm [done]
Retrieving package perl-Net-SSLeay-1.36-12.1.3.x86_64 (13/25), 143.0 KiB (532.0 KiB unpacked)
Retrieving: perl-Net-SSLeay-1.36-12.1.3.x86_64.rpm [done (39.6 KiB/s)]
Retrieving package perl-Socket6-0.23-13.1.3.x86_64 (14/25), 21.0 KiB (50.0 KiB unpacked)
Retrieving: perl-Socket6-0.23-13.1.3.x86_64.rpm [done]
Retrieving package perl-Tie-IxHash-1.22-13.1.2.x86_64 (15/25), 14.0 KiB (21.0 KiB unpacked)
Retrieving: perl-Tie-IxHash-1.22-13.1.2.x86_64.rpm [done (56.3 KiB/s)]
Retrieving package perl-File-Listing-6.02-3.1.2.noarch (16/25), 13.0 KiB (16.0 KiB unpacked)
Retrieving: perl-File-Listing-6.02-3.1.2.noarch.rpm [done (0 B/s)]
Retrieving package perl-WWW-RobotRules-6.01-3.1.2.noarch (17/25), 16.0 KiB (26.0 KiB unpacked)
Retrieving: perl-WWW-RobotRules-6.01-3.1.2.noarch.rpm [done (0 B/s)]
Retrieving package perl-HTTP-Message-6.02-3.1.2.noarch (18/25), 75.0 KiB (155.0 KiB unpacked)
Retrieving: perl-HTTP-Message-6.02-3.1.2.noarch.rpm [done]
Retrieving package perl-HTTP-Negotiate-6.00-3.1.2.noarch (19/25), 16.0 KiB (29.0 KiB unpacked)
Retrieving: perl-HTTP-Negotiate-6.00-3.1.2.noarch.rpm [done (18.6 KiB/s)]
Retrieving package perl-HTTP-Daemon-6.00-3.1.2.noarch (20/25), 19.0 KiB (39.0 KiB unpacked)
Retrieving: perl-HTTP-Daemon-6.00-3.1.2.noarch.rpm [done]
Retrieving package perl-HTTP-Cookies-6.00-3.1.2.noarch (21/25), 25.0 KiB (46.0 KiB unpacked)
Retrieving: perl-HTTP-Cookies-6.00-3.1.2.noarch.rpm [done]
Retrieving package apache2-mod_perl-2.0.5-5.1.3.x86_64 (22/25), 3.0 MiB (7.4 MiB unpacked)
Retrieving: apache2-mod_perl-2.0.5-5.1.3.x86_64.rpm [done (241.7 KiB/s)]
Retrieving package perl-libwww-perl-6.03-2.1.2.noarch (23/25), 189.0 KiB (429.0 KiB unpacked)
Retrieving: perl-libwww-perl-6.03-2.1.2.noarch.rpm [done (92.1 KiB/s)]
Retrieving package perl-IO-Socket-INET6-2.67-5.1.2.noarch (24/25), 19.0 KiB (31.0 KiB unpacked)
Retrieving: perl-IO-Socket-INET6-2.67-5.1.2.noarch.rpm [done (6.2 KiB/s)]
Retrieving package perl-IO-Socket-SSL-1.49-2.5.1.noarch (25/25), 57.0 KiB (123.0 KiB unpacked)
Retrieving: perl-IO-Socket-SSL-1.49-2.5.1.noarch.rpm [done (33.1 KiB/s)]
Installing: apache2-doc-2.2.21-3.6.1 [done]
Installing: apache2-example-pages-2.2.21-3.6.1 [done]
Installing: perl-Encode-Locale-1.02-5.1.2 [done]
Installing: perl-HTTP-Date-6.00-3.1.2 [done]
Installing: perl-LWP-MediaTypes-6.01-3.1.2 [done]
Installing: perl-Net-HTTP-6.01-2.1.2 [done]
Installing: perl-TimeDate-1.20-16.1.2 [done]
Installing: perl-URI-1.59-3.1.2 [done]
Installing: yast2-http-server-2.21.0-2.1.1 [done]
Installing: apache2-mod_python-3.3.1-167.1.2 [done]
Installing: patterns-openSUSE-lamp_server-12.1-25.21.1 [done]
Installing: perl-Net-LibIDN-0.12-6.1.3 [done]
Installing: perl-Net-SSLeay-1.36-12.1.3 [done]
Installing: perl-Socket6-0.23-13.1.3 [done]
Installing: perl-Tie-IxHash-1.22-13.1.2 [done]
Installing: perl-File-Listing-6.02-3.1.2 [done]
Installing: perl-WWW-RobotRules-6.01-3.1.2 [done]
Installing: perl-HTTP-Message-6.02-3.1.2 [done]
Installing: perl-HTTP-Negotiate-6.00-3.1.2 [done]
Installing: perl-HTTP-Daemon-6.00-3.1.2 [done]
Installing: perl-HTTP-Cookies-6.00-3.1.2 [done]
Installing: apache2-mod_perl-2.0.5-5.1.3 [done]
Installing: perl-libwww-perl-6.03-2.1.2 [done]
Installing: perl-IO-Socket-INET6-2.67-5.1.2 [done]
Installing: perl-IO-Socket-SSL-1.49-2.5.1 [done]

Then ;


zypper inr
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  AdobeICCProfiles bundle-lang-gnome-extras-en gstreamer-0_10-fluendo-mp3 gstreamer-0_10-plugins-good-lang kdebase4-runtime-xine 
  libbluray1 libxine1-codecs libxine2-codecs parallel-printer-support patterns-openSUSE-kde4_pure phonon-backend-xine unrar 

12 new packages to install.
Overall download size: 5.7 MiB. After the operation, additional 18.5 MiB will be used.
Continue? [y/n/?] (y): y
Do you agree with the terms of the license? [yes/no] (no): y
Retrieving package libbluray1-0.2.1-1.1.x86_64 (1/12), 61.0 KiB (159.0 KiB unpacked)
Retrieving: libbluray1-0.2.1-1.1.x86_64.rpm [done]
Retrieving package gstreamer-0_10-plugins-good-lang-0.10.31-8.1.noarch (2/12), 135.0 KiB (529.0 KiB unpacked)
Retrieving: gstreamer-0_10-plugins-good-lang-0.10.31-8.1.noarch.rpm [done]
Retrieving package libxine1-codecs-1.1.21-8.3.x86_64 (3/12), 435.0 KiB (1.3 MiB unpacked)
Retrieving: libxine1-codecs-1.1.21-8.3.x86_64.rpm [done (165.1 KiB/s)]
Retrieving package libxine2-codecs-1.2.2-75.2.x86_64 (4/12), 463.0 KiB (1.4 MiB unpacked)
Retrieving: libxine2-codecs-1.2.2-75.2.x86_64.rpm [done (91.1 KiB/s)]
Retrieving package parallel-printer-support-1.00-5.1.noarch (5/12), 5.0 KiB (1.0 KiB unpacked)
Retrieving: parallel-printer-support-1.00-5.1.noarch.rpm [done (0 B/s)]
Retrieving package gstreamer-0_10-fluendo-mp3-12-6.1.x86_64 (6/12), 206.0 KiB (1.2 MiB unpacked)
Retrieving: gstreamer-0_10-fluendo-mp3-12-6.1.x86_64.rpm [done (205.3 KiB/s)]
Retrieving package kdebase4-runtime-xine-4.8.4-379.4.x86_64 (7/12), 28.0 KiB (43.0 KiB unpacked)
Retrieving: kdebase4-runtime-xine-4.8.4-379.4.x86_64.rpm [done (0 B/s)]
Retrieving package AdobeICCProfiles-2.0-144.1.1.noarch (8/12), 2.5 MiB (5.4 MiB unpacked)
Retrieving: AdobeICCProfiles-2.0-144.1.1.noarch.rpm [done (243.8 KiB/s)]
Retrieving package unrar-4.0.4-8.1.3.x86_64 (9/12), 107.0 KiB (238.0 KiB unpacked)
Retrieving: unrar-4.0.4-8.1.3.x86_64.rpm [done (180.3 KiB/s)]
Retrieving package bundle-lang-gnome-extras-en-12.1-41.5.1.noarch (10/12), 1.6 MiB (7.8 MiB unpacked)
Retrieving: bundle-lang-gnome-extras-en-12.1-41.5.1.noarch.rpm [done (233.8 KiB/s)]
Retrieving package patterns-openSUSE-kde4_pure-12.1-25.21.1.x86_64 (11/12), 25.0 KiB (1.0 KiB unpacked)
Retrieving: patterns-openSUSE-kde4_pure-12.1-25.21.1.x86_64.rpm [done (20.1 KiB/s)]
Retrieving package phonon-backend-xine-4.4.4-8.1.2.x86_64 (12/12), 114.0 KiB (341.0 KiB unpacked)
Retrieving: phonon-backend-xine-4.4.4-8.1.2.x86_64.rpm [done (11.5 KiB/s)]
Installing: libbluray1-0.2.1-1.1 [done]
Installing: gstreamer-0_10-plugins-good-lang-0.10.31-8.1 [done]
Installing: libxine1-codecs-1.1.21-8.3 [done]
Installing: libxine2-codecs-1.2.2-75.2 [done]
Installing: parallel-printer-support-1.00-5.1 [done]
Installing: gstreamer-0_10-fluendo-mp3-12-6.1 [done]
Installing: kdebase4-runtime-xine-4.8.4-379.4 [done]
Installing: AdobeICCProfiles-2.0-144.1.1 [done]
Installing: unrar-4.0.4-8.1.3 [done]
Installing: bundle-lang-gnome-extras-en-12.1-41.5.1 [done]
Installing: patterns-openSUSE-kde4_pure-12.1-25.21.1 [done]
Installing: phonon-backend-xine-4.4.4-8.1.2 [done]

i’ve never done what you want to do, but i know that people have been
doing it on *nix-like operating systems since before Windows folks could
spell WAMP, so have a look:

in the docs:
https://www.google.com/search?q=site%3Adoc.opensuse.org+LAMP+setup

in the wiki:
https://www.google.com/search?q=site%3Aen.opensuse.org+LAMP+setup

in the forum:
https://www.google.com/search?q=site%3Aforums.opensuse.org+LAMP+setup

and come back, because there are plenty of folks around who can help
if/when you have questions as you work through the learning
process…and, i bet your decision to move up to stability and
reliability will pay off…

like: your statement “nor can I even find their directories” is a
typical/expected ‘problem’ of folks with a background in other operating
systems…all you need is a better of understanding the Linux file
system (which Windows did not copy from *nix, but Linux did)…there are
tons of good, generic info on Linux across the net…some of it is
great for openSUSE, some not…this will get you started:
https://www.google.dk/search?q=understanding+linux+file+system

Have a lot of fun!!


dd

ok, thank you - I am in configuration hell now.and do not understand exactly what I am doing

I am trying to do the configuration and not sure how to proceed - specifically the host configuration and main host

Please bear in mind I do not wish to publish directly to the web with this

I think it is configured
I think I am ready for mysql/phpmyadmin

Am 18.07.2012 15:56, schrieb coasterad:
>
> ok, thank you - I am in configuration hell now.and do not understand
> exactly what I am doing
>
>
Can you please give a bit more details what you already did and where
exactly you got stuck?
It is near to impossible to answer in that generality without simply
giving you a generic documentation link, thanks to Dave and dd you
already got them.

What exactly is unclear to you about for example the mysql/phpmyadmin
setup/configuration or does not work as you expect it?


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

I have;

started apache server and used yast to
set up a server administrator name and server name (redrider)
configure a server called localhost (ip 127.0.0.1)
with a document root at /srv/www/htdocs/ with SSL and Public_HTML disabled
navigated to the server in firefox and viewed the "It works!" page

I have not done anything else as I cannot create any directories in the doc root

That about sums it up

Am 18.07.2012 17:06, schrieb coasterad:
>
> I have;
>
> started apache server and used yast to
> set up a server administrator name and server name (redrider)
> configure a server called localhost (ip 127.0.0.1)
> with a document root at /srv/www/htdocs/ with SSL and Public_HTML
> disabled
> navigated to the server in firefox and viewed the "It works!" page

Good

>
> I have not done anything else as I cannot create any directories in the
> doc root

This directory is not writable for a normal user for good reasons.
What I would probably do when playing with web development (which I
don’t so take it with a grain of salt):

Make your public_html in your home directory available to apache.

In yast in the http server configuration you see a list of configuration
items (the place where you see the /src/www/htdocs for document root.

Down below there is an add button, click that and select UserDir from
the selction box, in the following dialog which asks for the value I
need to add


enable martinh

of course you need to replace the martinh with your user name.

After that everything you put into public_html becomes visible as

http://localhost/~martinh/

again replace the martinh with your username.


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Am 18.07.2012 17:32, schrieb Martin Helm:
> enable martinh
Bad typo
that is of course


enabled martinh

I need some more information about configuring the document paths in main host and host configuration tabs

specifically I need to understand the relationships between the public_html directory in my home directory, directory and document root on the “main host” tab
“Document Root” and “Directory” on “Host” tab AND how these items must be configured.
I have/am reading as much and as fast as I can but I fear I am just becoming confused

I know these paths need to be correct or nothing will happen

Thank you in advance

Am 18.07.2012 18:36, schrieb coasterad:
> specifically I need to understand the relationships between the
> public_html directory in my home directory, directory and document
> root on the “main host” tab

I tried to explain in my previous post. There is no relationship at all,
the public_html is mapped to http://yourservername/~username
and the document root is mapped to http://yourservername/ that’s all.
Nothing fancy there.

Maybe someone else can explain it better than me.

> “Document Root” and “Directory” on “Host” tab AND how these items
> must be configured.

Why do you need that? In simple standard setups as you described it
initially you do not have anything in the hosts tab and you don’t need
anything there.

Beside that, if you want to use virtual hosts you need first of all to
configure your DNS to point the different names for the virtual hosts to
the same machine, the machine which runs the webserver.
Are you really sure that you want and need that?
Is it clear to you what a virtual host really is.


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

Note it is fine to use your home directory for development but you probably will want to use the WWW directories for a real server. To do that you must be a meber of WWW group to have the write permission. When in doubt look at the file permissions.

Thank you for getting back with me and my apologies for not getting back sooner as I was having issues logging into the forums.

ok, following your suggestions, I managed to get localhost to distplay the phpinfo test page which was in my /home/public_html dir so I would say the day was successful.

I am currently reading the mountains of information on the links provided upthread and trying to understand exactly what I have done and how it works

More to come

understood - I use godaddy to host live websites but I do my development and testing locally

the following are screenshots of my apache configuration - I am having trouble browsing to http://localhost/~username

tab labeled “Host”

http://i3.photobucket.com/albums/y68/coasterad/host2.jpg

Tab labeled “Main Host”

http://i3.photobucket.com/albums/y68/coasterad/mainhost2.jpg

thank you - I got it working - the break I needed was when you told me I don’t need any Hosts - I deleted the host, changed Document root and everything fell into place and just worked.

Now, I have learn to start mysql, and phpmyadmin and get them configured

Am 19.07.2012 02:56, schrieb coasterad:
> Now, I have learn to start mysql, and phpmyadmin and get them
> configured
>
Let’s start with mysql:
Since it is easier for me to show the the commands open a terminal


su -
mysql

after you typed the “su -” it will ask you for the superuser (root)
password, in a default opeSUSE installation this is the same as your
user password, you will not see what you type, press enter.
Then you typed mysql I expect you get an error message like


ganymed:/home/martinh # mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysql/mysql.sock' (2)

That is normal it just means the mysql service is not running.
To start the service


insserv mysql
rcmysql start

the first command (insserv) tells the system that you want to start
mysql automatically when the system starts, if you do not want that do
not use that command.
The second command (rcmysql start) just starts the service.
If after that you type again


mysql

you should succeed login into it (since by default the root account in
mysql has no password, should look like this


ganymed:/home/martinh # mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.16-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql> quit
Bye

Please try that and the next step is to secure your mysql (maybe you
don’t need to secure it on a sandbox machine).


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10