Results 1 to 10 of 10

Thread: How is LAMP server started and configured?

  1. #1
    MirceaKitsune NNTP User

    Default How is LAMP server started and configured?


    I installed LAMP server yesterday from the OpenSuse DVD packages, as I
    intend to host a web page which uses Apache, PHP and MySQL. However I
    cannot find how to start it up and how to set LAMP server to
    automatically start on system login.

    Also how do I configure it once I can start it? Do I need to edit some
    .cfg files again? Do Apache PHP and MySQL link together correctly by
    default? What is the path to the MySQL storage? Thanks.


    --
    OpenSuse 11.1 64bit, KDE 4.1.3
    ------------------------------------------------------------------------
    MirceaKitsune's Profile: http://forums.opensuse.org/member.php?userid=19753
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  2. #2
    ken yap NNTP User

    Default Re: How is LAMP server started and configured?


    You can start Apache and MySQL from YaST or from the CLI


    Code:
    --------------------
    chkconfig --set mysql on
    chkconfig --set apache2 on
    /etc/init.d/mysql start
    /etc/init.d/apache2 start
    --------------------


    Thereafter they will start at boot.

    You don't need to know where MySQL stores its files since you wouldn't
    access those files directly. But you need the PHP5 module php5-mysql
    installed to be able to communicate with the MySQL server. Each app
    would have its own database, login and password. The doco that came with
    the app would instruct you on how to set those up.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  3. #3
    swerdna NNTP User

    Default Re: How is LAMP server started and configured?


    A bit of background reading here:
    'HowTo: Configure a Linux Apache Web Server on openSUSE (including SSI
    and CGI)' (http://www.swerdna.net.au/linhowtoapache.html)


    --
    'Drop in and visit some time'
    (http://www.swerdna.net.au/linux.html).
    ------------------------------------------------------------------------
    swerdna's Profile: http://forums.opensuse.org/member.php?userid=84
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  4. #4
    MirceaKitsune NNTP User

    Default Re: How is LAMP server started and configured?


    Allright, I managed to get Apache working. All I had to do was go to
    YAST -> Network Services -> HTTP Server and configure everything there
    from a very comfortable and easy wizard. Now my web page can be accessed
    and entered.

    I still have a problem however: I don't know how to get PHP and MySQL
    working as well. How do I setup MySQL now so it connects with Apache and
    PHP and setup its databases, users, etc? Also I do need to know where
    MySQL keeps its storage cuz I sometimes have to work around there with
    these files manually.


    --
    OpenSuse 11.1 64bit, KDE 4.1.3
    ------------------------------------------------------------------------
    MirceaKitsune's Profile: http://forums.opensuse.org/member.php?userid=19753
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  5. #5
    ken yap NNTP User

    Default Re: How is LAMP server started and configured?


    No, you really don't need to touch MySQL's database files. What would
    you do with files like user.frm, user.MYD, user.MYI, etc? MySQL provides
    you with utilities to handle those. Unless you are doing a plain backup,
    and even then, a mysqldump is better, especially if the DB is constantly
    modified. Buf FYI, they are in /var/lib/mysql.

    As mentioned before, PHP connects to MySQL by calling functions from
    the php5-mysql connector and libmysql library, which you will get by
    loading the php5-mysql package. It's just a matter of programming. Each
    web app will have its ways of setting up the connection.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  6. #6
    yu210148 NNTP User

    Default Re: How is LAMP server started and configured?


    Php can be installed using the software management tool in Yast. I
    installed it--along with the php-mysql and various other extensions by
    simply searching on the term php.


    --
    yu210148
    ------------------------------------------------------------------------
    yu210148's Profile: http://forums.opensuse.org/member.php?userid=19157
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  7. #7
    MirceaKitsune NNTP User

    Default Re: How is LAMP server started and configured?


    ken_yap;1930300 Wrote:
    > No, you really don't need to touch MySQL's database files. What would
    > you do with files like user.frm, user.MYD, user.MYI, etc? MySQL provides
    > you with utilities to handle those. Unless you are doing a plain backup,
    > and even then, a mysqldump is better, especially if the DB is constantly
    > modified. Buf FYI, they are in /var/lib/mysql.
    >
    > As mentioned before, PHP connects to MySQL by calling functions from
    > the php5-mysql connector and libmysql library, which you will get by
    > loading the php5-mysql package. It's just a matter of programming. Each
    > web app will have its ways of setting up the connection.


    It's plain backups that I need to do, yes. I have experimented with
    dumps and other types of integrated MySQL backup systems and even lost a
    database basing myself on these, so plain backups are the only things I
    ever go with nowadays.

    Anyway, if on the installation of LAMP server MySQL and PHP are already
    linked, how do I make databases, create users and give each permissions
    over which database I wish and everything else I must do?

    yu210148;1930305 Wrote:
    > Php can be installed using the software management tool in Yast. I
    > installed it--along with the php-mysql and various other extensions by
    > simply searching on the term php.


    I already have it installed with LAMP server, I just need to configure
    everything now.


    --
    OpenSuse 11.1 64bit, KDE 4.1.3
    ------------------------------------------------------------------------
    MirceaKitsune's Profile: http://forums.opensuse.org/member.php?userid=19753
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  8. #8
    yu210148 NNTP User

    Default Re: How is LAMP server started and configured?


    Well, personally I use the mysql module in webmin to do that sort of
    thing but I know that's not for everyone. A popular tool for
    configuring databases, tables, users, etc. in mysql is a tool called
    phpmyadmin. Or if you're handy from the command line you can do that
    sort of thing with the mysql client. Just open a terminal and type
    mysql at the command line.


    --
    yu210148
    ------------------------------------------------------------------------
    yu210148's Profile: http://forums.opensuse.org/member.php?userid=19157
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  9. #9
    MirceaKitsune NNTP User

    Default Re: How is LAMP server started and configured?


    yu210148;1932990 Wrote:
    > Just open a terminal and type mysql at the command line.


    Tried that as root but it gives me this error:


    Code:
    --------------------
    linux-wdzw:~ # mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    linux-wdzw:~ #
    --------------------


    Also, /var/lib/mysql appears to be a completely empty folder.


    --
    OpenSuse 11.1 64bit, KDE 4.1.3
    ------------------------------------------------------------------------
    MirceaKitsune's Profile: http://forums.opensuse.org/member.php?userid=19753
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


  10. #10
    yu210148 NNTP User

    Default Re: How is LAMP server started and configured?


    Humm, odd. What output do you get if (as root) you do:

    Code:
    --------------------

    /sbin/service mysql restart

    --------------------


    --
    yu210148
    ------------------------------------------------------------------------
    yu210148's Profile: http://forums.opensuse.org/member.php?userid=19157
    View this thread: http://forums.opensuse.org/showthread.php?t=404945


Posting Permissions

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