Page 1 of 2 12 LastLast
Results 1 to 15 of 153

Thread: How-to Lighttpd, PHP, MySQL and Eaccelerator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2004
    Location
    Sweden
    Posts
    259
    1) How much does Eaccelerator improve your web server? Any benchmark? What is the clock frequency of your router?
    2) How much RAM does this setup (Lighttpd, PHP, MySQL and Eaccelerator) requires? Can you please run and publish "ps axv" and "free"?

  2. #2
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by Tamadite View Post
    1) How much does Eaccelerator improve your web server? Any benchmark? What is the clock frequency of your router?
    2) How much RAM does this setup (Lighttpd, PHP, MySQL and Eaccelerator) requires? Can you please run and publish "ps axv" and "free"?
    Ah, we are talking performance here
    Well... it improves the overall generation time, and cold-start generation time. Normally a page on my site would be generated in 1 sec, now I usually see this is below 1 sec.
    The fastest time I ever had with generation is 0.63 sec without eaccelerator, but with I've seen up to 0.48 sec.
    I'm running at 300MHz.

    free space, this is with other things running tho.
    Code:
                 total       used       free     shared    buffers     cached
    Mem:         30176      29356        820          0       2064       9348
    -/+ buffers/cache:      17944      12232
    Swap:       522072      26084     495988
    ps avfx:
    Code:
      PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
      336 ?        S      0:00    103   717  1390     4  0.0 /bin/sh /opt/bin/mysqld_safe --datadir=/opt/var/lib/mysql --pid-file
      369 ?        S      0:00   1011  3107  4596   420  1.3  \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql
      370 ?        S      0:00     26  3107  4596   420  1.3      \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/my
      371 ?        S      0:00     24  3107  4596   420  1.3          \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/li
      378 ?        S      0:00   2102   194  4085   652  2.1 /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
      384 ?        Ss     0:00   1160  3285 35858     4  0.0  \_ /opt/bin/php-fcgi
      426 ?        S      0:00      4  3285 35886     4  0.0  |   \_ /opt/bin/php-fcgi
      385 ?        Ss     0:01   1164  3285 35858     4  0.0  \_ /opt/bin/php-fcgi
      427 ?        S      0:00      4  3285 35886     4  0.0  |   \_ /opt/bin/php-fcgi
      386 ?        Ss     0:00   1165  3285 35858     4  0.0  \_ /opt/bin/php-fcgi
      428 ?        S      0:01   1221  3285 36434     4  0.0  |   \_ /opt/bin/php-fcgi
      387 ?        Ss     0:01   1171  3285 35858     4  0.0  \_ /opt/bin/php-fcgi
      429 ?        S      0:14   7740  3285 36746  3868 12.8      \_ /opt/bin/php-fcgi
    I chose for the fast-cgi without creating a socket first because you'll never have the problem any more that the socket is unavailable!
    together it's using about 11MB ram/swap
    so what do you think?
    Last edited by wpte; 09-07-2009 at 11:03.

  3. #3
    Hello
    Gr8 tutorial but i'm getting errors while trying to connect to mysql

    Code:
    /opt/bin/mysqladmin -u admin password '********'
    /opt/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'admin'@'localhost' (using password: YES)'
    [admin@router root]$ mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    [admin@router init.d]$ /opt/bin/mysqladmin -u root -p '********'
    Enter password:
    /opt/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    and my config of my.cnf

    Code:
    # The following options will be passed to all MySQL clients
    [client]
    password        = ********
    port            = 3306
    socket          = /tmp/mysql.sock
    
    
    # The MySQL server
    [mysqld]
    user            = admin
    datadir         = /opt/var/lib/mysql
    port            = 3306
    socket          = /tmp/mysql.sock
    
    [mysql.server]
    user=root
    As you can see i was trying to connect to mysql wit admin and root username and it didn't help. What could be wrong?

  4. #4
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Oh, seems I've made a mistake

    try to change
    [mysql.server]
    user=root
    into:
    [mysql.server]
    user=admin
    does that work?

    otherwise you might try these commands as well to rebuild the database:
    rm -R /opt/var/lib/mysql/mysql
    mkdir /opt/var/lib/mysql/mysql
    /opt/bin/mysql_install_db

  5. #5
    Hello,
    I've already tried to change
    Code:
    [mysql.server]
    user=root
    into admin but this didn't helped

    Also when i'm trying to execute
    Code:
    ipkg install optware-devel buildroot
    at the end of downloading i get an error about wget (it can't be used to download package to ipkg temp folder)

    I'll try to install the database once again after i'm thru with recoverying my files from hdd after moving opt partition (was to small when i wanted to install optware-devel buildroot, alhough it had 512MB).
    Last edited by cichy; 28-07-2009 at 19:21. Reason: Added 1 problem

  6. #6
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    uhm... have you restarted the mysql server after the config change?

    and when installing the build packages...
    if you install wget-ssl manually like this:
    ipkg install wget-ssl
    and then install the build enviroment


    I'm sorry to see that the mysql server is a bit of a trouble. I couldn't have tested it out myself on the router. I did test it on ubuntu which seemed to work out right

  7. #7
    Hmm i've restarted whole router just to make sure If i recall You didn't mentioned about manual installation of wget-ssl. Also there's new version of eaccelerator (http://bart.eaccelerator.net/source/....6-rc1.tar.bz2) will it work with all other components (i've checked folder structure and they're different in 0.9.5.3 & 0.9.6):>

  8. #8
    hei man...

    found solution (think you should include it in tutorial)

    http://www.mattgibson.ca/2009/11/05/...n-asus-wl-500/

    THANKS FOR ALL THE HELP!

  9. #9
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by freakazoid87 View Post
    hei man...

    found solution (think you should include it in tutorial)

    http://www.mattgibson.ca/2009/11/05/...n-asus-wl-500/

    THANKS FOR ALL THE HELP!
    I included that a while ago... I even told you to test if that was the problem:
    http://wl500g.info/showpost.php?p=166318&postcount=38
    you told me however there was no feedback from lighttpd...

    anyway, the same problem with version 1.4.25-1

  10. #10
    Quote Originally Posted by cichy View Post
    Hello
    Gr8 tutorial but i'm getting errors while trying to connect to mysql

    Code:
    /opt/bin/mysqladmin -u admin password '********'
    /opt/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'admin'@'localhost' (using password: YES)'
    I also had that problem after following this tutorial.

    I solved it by commenting-out the password line in my.cnf (like it was by default).

  11. #11
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    so Dr. Chair... nothing wrong with the users then?

    Oh yes, I see I need to fix a few things there

  12. #12
    I've rebuilt whole mysql database, changed name from admin to root and vice versa and it didn't helped, I can't get to mysqladmin.
    Code:
    Enter password:
    /opt/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    Dunno what to do now, removing ' didn't help, any sugestions?

    P.S. I've installed whole system from a scratch, wget, transmission, ftp are working fine but i ca't get lighttpd to work. Sure I installed it, index.htm* files are working without problem but i can't get fast-cgi to work. Htop shows this
    Code:
      152 ?        Ss     0:00      1   146  1365   340  1.1 /usr/sbin/vsftpd
      154 ?        Ss     0:00     36   119  2572   924  3.0 /usr/sbin/nmbd -D
      156 ?        Ss     0:00      9   343  2588   852  2.8 /usr/sbin/smbd -D
      170 ?        S      0:00    103   717  1390   456  1.5 /bin/sh /opt/bin/mysqld_safe --datadir=/opt/var/lib/mysql --pid-file=/opt/var/lib/mysql/router.pid
      203 ?        S      0:00    599  3107  4236  2576  8.5  \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=admin --pid-file=/opt/var/lib/mysql/router.pi
      206 ?        S      0:00      0  3107  4236  2576  8.5      \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=admin --pid-file=/opt/var/lib/mysql/route
      207 ?        S      0:00      2  3107  4236  2576  8.5          \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=admin --pid-file=/opt/var/lib/mysql/r
      225 ?        S      0:00     22   578  4633  2792  9.2 /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
      226 ?        S      0:00      0   578  4633  2792  9.2  \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
      227 ?        S      0:24    241   578  4633  2792  9.2      \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
      383 ?        S      0:00     42   194  3853  1416  4.6 /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
      384 ?        Z      0:00   1078     0     0     0  0.0  \_ [php-fcgi] <defunct>
      385 ?        Z      0:00   1078     0     0     0  0.0  \_ [php-fcgi] <defunct>
      386 ?        Z      0:00   1078     0     0     0  0.0  \_ [php-fcgi] <defunct>
      388 ?        Z      0:00   1078     0     0     0  0.0  \_ [php-fcgi] <defunct>
    I'm attaching my installed packages, maybe something is missing? Also after reinstallation i can't compile latest eaccelerator (it worked earlier).
    Attached Files Attached Files
    Last edited by cichy; 30-07-2009 at 00:08.

  13. #13
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    well lets focus on the mysql server first:
    the idea is:
    • change the usernames in my.cfg and remove the password line, save it
    • stop the server
    • Rebuild the database
    • start the server
    • do the password setting: /opt/bin/mysqladmin -u admin password '********'
    • add the password line in my.cfg
    • try getting in by: mysql

  14. #14
    Hmm when i've did
    Code:
    chown -R admin:admin /opt/var/lib/mysql
    it gave me error that admin isn't a part of admin group so i did
    Code:
    chown -R admin:root /opt/var/lib/mysql
    and it came without an error (will it work
    Later on i've tried to login using
    Code:
    /opt/bin/mysqladmin -u admin password '********'
    and it gave me this error
    Code:
    /opt/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'
    so what now

  15. #15
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Hmm when i've did
    Code:
    chown -R admin:admin /opt/var/lib/mysql
    it gave me error that admin isn't a part of admin group so i did
    Code:
    chown -R admin:root /opt/var/lib/mysql
    and it came without an error (will it work
    Later on i've tried to login using
    Code:
    /opt/bin/mysqladmin -u admin password '********'
    and it gave me this error
    Code:
    /opt/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'
    so what now
    Can you give me an output of:
    cat /tmp/etc/passwd
    maybe the admin user isn't a REAL admin

Page 1 of 2 12 LastLast

Similar Threads

  1. Full server config: Samba ftp http xmail mysql forum motor
    By KisVuK in forum WL-500gP Tutorials
    Replies: 14
    Last Post: 15-12-2008, 21:34

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
  •