1 2 Previous Next 22 Replies Latest reply on Dec 7, 2006 5:55 PM by 807557

    Apache 2.0.52, MySQL,  PHP & SSL

    807557
      Does anyone know the preferred method to add MySQL, PHP, & SSL to the preinstalled Apache 2.0.52?

      System is a W2100z [x86] running a currently patched Solaris 10 03/05 install with the full companion CD loaded.

      I've got the preinstalled Apache 2.0.52 working great [had to add the 'wait 5 seconds' for the service to work at boot] and was just wondering how best to start MySQL as a service and if PHP is setup as a service or if I need to try and compile it manually.

      Detailed instructions or links would be most appreciated, as I doubt I'm the only new Solaris user trying to accomplish this.

      Thank you.
        • 1. Re: Apache 2.0.52, MySQL,  PHP & SSL
          807557
          MySQL is a completely separate entity from Apache so you can go ahead and install it. Depending on how the Apache installation was compiled, it may need to be recompiled with SSL and PHP support.
          • 2. Re: Apache 2.0.52, MySQL,  PHP & SSL
            807557
            Indeed MySQL is a separate package, but I supposed I phrased that poorly.

            My main goal is to setup a SAMP setup in place of the common LAMP (Linux Apache MySQL PHP) design. MySQL files are integrated all over the place and I just need to know how we are supposed to use them with Solaris 10, as a service hopefully.

            I suppose I could use the tools and design at blastwave.org, however, I've heard that can create problems when doing upgrade from Sun once new product updates come out.
            • 3. Re: Apache 2.0.52, MySQL,  PHP & SSL
              807557
              I am interested in the same topic but have found nothing which indicates there is a Solaris instruction list for setting up a proper (Apache MySQL PHP). Suprising to me since there are so many wonderful applications available for this environment. Also unlike most Linux's, it seems as though security and product patches for the open source software (at least on the Companion CD) will need to be researched individually and will not be provided by Sun.
              • 4. Re: Apache 2.0.52, MySQL,  PHP & SSL
                807557
                Indeed. I would imagine if Sun wants more Linux market share, some simpler HOW-TO guides for smaller web hosting providers would go a long way to make inroads for quicker Solaris 10 adoption and uptake.

                As it is now, I think Solaris 10 is fantastic in every area except package management. Knowing that OpenSolaris is a separate product than Solaris 10, I would still hope OpenSolaris develops something like Debian's 'apt-get' tool and repository than can also be selectively and judiciously used on Solaris 10.
                • 5. Re: Apache 2.0.52, MySQL,  PHP & SSL
                  807557
                  I get the feeling nobody from sun actually reads this forum or attempts to help. Not hard to believe since I understand they suffered another huge layoff yesterday.

                  I stumbled upon a readme which mentions how to install php on apache and mentions an AMP cluster. The readme is in /opt/sfw/READMEs and is named README.SFWmphp

                  Setup for Integrating PHP into Apache
                  =====================================

                  Introduction
                  ============

                  This package is part of the "Solaris AMP Cluster", it has been built so that it supplies the MySQL API for developers to develop web applications that need to access a MySQL database.

                  Anyway, it is a start..
                  • 6. Re: Apache 2.0.52, MySQL,  PHP & SSL
                    807557
                    Thanks junkken!!!

                    That's exactly what I needed. Obviously I didn't even know that documentation was installed there!


                    Contents of said readme file (README.SFWmphp)
                    ============================================
                    Setup for Integrating PHP into Apache
                    =====================================

                    Introduction
                    ============

                    This package is part of the "Solaris AMP Cluster", it has been built so
                    that it supplies the MySQL API for developers to develop web applications
                    that need to access a MySQL database.

                    Example PHP scripts using the MySQL API are delivered with the SFWsampc,
                    the "Solaris AMP Cluster", package; see /opt/sfw/READMEs/README.SFWsampc.

                    Apache Setup
                    ============

                    To enable PHP in the Apache server the system administrator needs to
                    run the following setup to configure apache and copy files into place:

                    a) Run post install script:

                    /opt/sfw/apache/x_postinstall

                    Then update the apache configuration file /etc/apache/httpd.conf as
                    instructed.

                    Note: Before unistalling the SFWmphp package run the preremove script
                    /opt/sfw/apache/x_preremove to undo these changes

                    b) Restart the apache server:

                    /etc/init.d/apache stop
                    /etc/init.d/apache start

                    c) Check php is installed and setup okay:

                    Point web browser as the php info page "http://<phpbox>/phpinfo.php" and
                    check it displays the php info page and that it says MySQL is enabled.
                    • 7. Re: Apache 2.0.52, MySQL,  PHP & SSL
                      807557
                      NOTE: The previous script appears to only work on Apache 1.x not the 2.x series!

                      But at least a AMP cluster should be easy enough to make now. 8)
                      • 8. Re: Apache 2.0.52, MySQL,  PHP & SSL
                        807557
                        Yes, but so much more is needed. Do we have a php command line like perl or python or tcl? No. We also need phpmyadmin... What we need is:

                        more than a pure OS: it comes with over 15490 packages, precompiled software bundled up in a nice format for easy installation on your machine.

                        Plus, Solaris Secure Execution,Solaris Dynamic Tracing,Solaris Containers,Solaris Predictive Self Healing:

                        Although most people will use the packages more...
                        • 9. Re: Apache 2.0.52, MySQL,  PHP & SSL
                          807557
                          I would just download the latest versions of PHP, Apache, OpenSSL and ModSSL [from the respective websites] and compile everything together.
                          • 10. Re: Apache 2.0.52, MySQL,  PHP & SSL
                            807557
                            What I heavily fail to understand is how one can setup such a configuration on Linux without understanding what it is he's doing ? There isn't much difference between Solaris and Linux on this issue, perhaps the fact that Solaris requires you to know what you're doing and doesn't feature nice utilities which set it all up for you.

                            First you setup Apache (/etc/apache/httpd.conf), you don't have to worry about it starting or not since that heavily depends on the config file. Also keep /usr/apache/ into mind.

                            Then setup MySQL. Look into /etc/sfw/mysql and follow the README. You'll have to do some manual work, but if you already have a working setup on Linux you could just copy the config files over.

                            On the companion CD you also had the option to install PHP, the package is called SFWmphp and by listing this you'll discover /opt/sfw/apache, which lists the apache module for PHP support.

                            And that is basicly all you need.

                            After you have all of this working you can either setup a SMF entry for MySQL or just setup a rc.d script for it.
                            • 11. Re: Apache 2.0.52, MySQL,  PHP & SSL
                              807557
                              Thanks, Lion-O. You are correct is that the configuration is very similar, however, my main problem was trying to understand if either was already setup as a service in Solaris 10 as that would be the ideal way to install and use them. Unfortunately I didn't know about the READMEs you've specified until your post. Thanks for that info. as my newness to Solaris in large part can be solved if I just knew where to find the documentation....I suppose I'll be grep'ing the file system more from now on.

                              Having come from Debian-based linux you become very accustomed to simply 'apt-get' everything as a means for installation, removal, and upgrading without the need to find documentation on which method [service or otherwise] to best start the applications. Admittedly this is only a "problem" because Solaris is simply more advanced and already has so many more features than Linux.
                              • 12. Re: Apache 2.0.52, MySQL,  PHP & SSL
                                807557
                                Just use blastwave, thats how I got it working...
                                • 13. Re: Apache 2.0.52, MySQL,  PHP & SSL
                                  807557
                                  Since Solaris offers all packages out of the box the only thing left to do is setting it all up. When it comes to using Apache and adding SSL support you simply use the libssl module (to be found with the rest of the modules in /usr/apache/libexec). See also the default httpd.conf file which gives you quite a few pointers in this direction. OpenSSL is also provided, you can find the base tree in /etc/sfw/openssl.

                                  I see PHP has already been adressed in the thread; while Solaris doesn't ship a full blown PHP environment it does present the Apache module which you can use. Its decent, not perfect. If you need more from PHP your best bet is to grab the php tarball and compile it manually against the components already present on the system (apache, mysql, etc.).

                                  And finally MySQL; this is also relatively easy; /etc/sfw/mysql/README* has all the information you need.
                                  • 14. Re: Apache 2.0.52, MySQL,  PHP & SSL
                                    807557
                                    Since Solaris offers all packages out of the box the
                                    only thing left to do is setting it all up.
                                    Nice, my first goof-up on this forum :P Oh well, kindly ignore.
                                    1 2 Previous Next