Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: LAMP on SUSE

  1. #1
    Join Date
    Nov 2008
    Location
    Sarajevo, Bosnia and Herzegovina
    Posts
    37

    Default LAMP on SUSE

    Dear Geeks,

    I used Suse since 2001, but in last time I need support for multiple version of PHP, MySQL and web server on same environment for development. I wrote small bash script for the automatic switch PHP, but before start using that script I manually unpack RPM PHP files.

    As I can see (in RPM files), each PHP version is in separate directory. We should need to adapt directories for subversions in RPM packages.

    I do not know where I should write this post or ask who where I can help about this but open this thread.

    Many Full Stack developers need easy usable LAMP on the Suse. I want to help as I can and know.

    Initial script for switching PHP version is on the Github:
    https://github.com/Kolesar/sphp

    But, I want to see script in official RPM package by Suse

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: LAMP on SUSE

    Are we talking SUSE or openSUSE ?

    You can use the credentials here to login on build.opensuse.org and create a package for the switcher.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,187

    Default Re: LAMP on SUSE

    Adapt microservice style development; use containers for nginx/apache/php. Much easier than maintaining 10 different php versions.
    .: miuku @ #opensuse @ irc.libera.chat

  4. #4
    Join Date
    Nov 2008
    Location
    Sarajevo, Bosnia and Herzegovina
    Posts
    37

    Default Re: LAMP on SUSE

    @Knurpht
    About open of course

    35
    @Miuku
    I do not think so. Much easiest is just switching PHP/APACHE/MySQL with small script than create all microservice infrastructure, specially for beginners who want to develop, not administrating their machine

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: LAMP on SUSE

    Something else: I would replace the 'service apache ...' commands by 'systemd status apache2.service' etc.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: LAMP on SUSE

    Quote Originally Posted by Miuku View Post
    Adapt microservice style development; use containers for nginx/apache/php. Much easier than maintaining 10 different php versions.
    I agree.
    There is probably little reason to switch between PHP versions since each website you build will have to be matched with only one version.

    So,
    If you want to build several versions of anything on one machine, virtualization and/or isolation can be your friend.

    You can use containers as Miuku suggests,
    Or you can use any virtualization technology like Virtualbox,(recommended), VMware (also reommended), KVM, Xen (both less recommended for personal workstation use), or many more.

    With any of the above choices, you can build an isolated, self-contained running instance where everything within it won't conflict with everything outside of that machine. You can even run multiple machines simultaneously which can be useful when developing web solutions.

    I touched on this recently in a post to the Virtualization Forums

    https://forums.opensuse.org/showthre...n-helping-hand

    hth,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: LAMP on SUSE

    You might consider creating a PHP alternative which can be configured using update-alternatives in place of your script.

    The alternatives method is fairly simple...
    "update alternatives --config" is a master switch for switching between symbolic links referencing your root binary or configuration.

    So,
    For instance I wrote the following Wiki article which describes how to switch between installed gcc versions...

    https://en.opensuse.org/User:Tsu2/gc...e-alternatives

    There is plenty of documentation, guides and examples nowadays for creating various alternatives including the MAN pages and help.
    And, that's besides the many existing alternatives already configured on your system.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,317

    Default Re: LAMP on SUSE

    On Tue, 13 Feb 2018 14:56:02 +0000, Motokultivator wrote:

    > Much easiest is just switching PHP/APACHE/MySQL with small script than
    > create all microservice infrastructure, specially for beginners who want
    > to develop, not administrating their machine


    Actually, if you have docker installed, you can pull pre-installed LAMP
    containers that require no setup at all - just pull, run, and start
    developing.

    It doesn't get much easier than that. I spent the weekend doing a little
    bit of work with just a couple Apache docker containers, and getting the
    instance running was literally zero configuration.

    I needed to add a few things to it for my particular use, so I had to
    learn how to build a Dockerfile, but again, super-simple to do and didn't
    require any knowledge of how to configure Apache. I just used the
    httpd:alpine container, but the registry has several LAMP containers
    available to pull.

    Jim

    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  9. #9
    Join Date
    Nov 2008
    Location
    Sarajevo, Bosnia and Herzegovina
    Posts
    37

    Default Re: LAMP on SUSE

    As I can see from you posts, you are not developers

    I agree and disagree in same time with you. If you know what is the brew and how it works you will know about what I speak. I have idea to make it much more easies for end developers than brew.

    Brew is originally made for MacOS and later is ported for Linux, but many thinks does not work very well and it is really complex system. No one developer need something like brew (compiling every time what we need on the system). Everyone want something with just few commands or mouse click. We as a linux experienced users and developers have a chance to help many people all around the world if we want of course.

    With containers and virtualization everything is easiest (mostly) after you once set environment, but for that MUST HAVE really strong machine to handle all over it on first place and configure every virtual machine from scratch (for web developer other distributions are easies configurable than suse, but I speak about suse here). For example, currently I used some web applications for development where I need minimum 8GB RAM for run. If I will move it to the virtual machine what I will get? Nothing! How I will coding there. I as a developer must know how to share web directory with host machine and so on, and so on. Many developers are not linux expert, but want to use linux!

    With just few scripts and adapt RPM files we will solve all issue with that. That is very easy to make it. Question is do we want to help or not to ourselfs and whole current and feature (absolutely beginners) linux users.

    Stop thinking as linux expert, try to think as absolutely beginners who want to use linux and develop on it.

  10. #10
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,317

    Default Re: LAMP on SUSE

    You misunderstand me and my background (I have done development work in
    the past, actually - and work for a software company).

    Install docker:

    sudo zypper in docker
    sudo systemctl start docker

    Then use docker to pull the apache image:

    docker pull httpd:alpine
    docker run -dit --name <containername> -p 8082:80 -v <localpath>:/usr/
    local/apache2/htdocs --restart=always <imagename>

    Then just put stuff in the local path you specify in the -v parameter.

    Done - that's all there is to it. No Linux expertise needed. You can
    literally have it running in less than 5 minutes with zero experience in
    configuring the apache httpd server.

    Do you need to perhaps read a little bit for something more like LAMP?
    Sure, because LAMP is not a simple infrastructure to set up in general.
    That said, a:

    docker search lamp

    Turns up a number of pre-configured docker containers. Checking them out
    in the docker registry first can give you an idea of how much work it is
    to get up and running.

    You don't need a very beefy machine for a single-container setup like
    that. I use Virtualization every day (both in the cloud and on local
    systems - containers and VirtualBox VMs).

    The overhead for using docker is negligible - yes, if you need a 'beefy'
    setup, you need a host with enough memory. The beauty of a docker
    container is that there is no configuration necessary for something like
    a standard LAMP stack. All it takes is literally just following the
    container provider's instructions on how to set up the volumes that are
    shared with the container (that's the '-v' parameter).

    Developers shouldn't be afraid to learn something new once in a while.
    The ones I know and work with aren't - and they see the benefits of
    containerized development. Makes having multiple versions of things a
    snap, and it's easy to deal with and set up.

    I was initially apprehensive about using Dockerfiles (which is a slightly
    more advanced usage of docker - and can become much more complex) - but
    what you're looking for is a truly simple setup, and it's a great choice
    for that because you don't have to build the images at all.

    And what you get is more than an isolated environment with low overhead -
    you get reproducability. If you do muck around inside the container
    (which you can do - launching a shell is an easy 'docker exec -it
    <containername> /bin/bash' away), you can recreate the container by just
    re-running the 'run' command.

    Simple.

    Look into it - you'll see that it's not as difficult as you're making it
    out to be.

    Jim
    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •