If you need XDebug + Eclipse look here (allows step-debugging of your php code very very nice 🙂 . (slightly more complicated setup)

lighttpd is „just as good“ as apache2 – except – it does not support .htaccess. 🙁

But besides from that – it runs fast – and is easy to configure. just what we want 😀

WordPress runs flawless with lighttpd – while some very very specific software like „Magento Shop“ is stuck to Apache2.

Another problem that needs to be addressed: unfortunately – from version to version – this setup process WILL change.

So you really need to check if the howto matches your version of Debian (or any other Linux).

IMHO there should be an easy to install meta-package that allows admins to make that process more easy and standardized.

uname -a; # tested on
Linux debian8 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2 (2017-04-30) i686 GNU/Linux

apt-get update;

apt-get install lighttpd; # install webserver lighttpd

# immediate result when you point your browser to your server

apt-get install php5-cgi mysql-server mysql-client php5-mysql php5-gd; # install minimum

apt-get install phpmyadmin; # you definately want to have this nice mysql GUI (unless maybe on a production-server… because less software = less security problems)

# also note: MySQL is EXTREMELY RAM HUNGRY – you should have atleast 8GByte or better 16GByte in your MySQL server – everything else will lead to disaster or atleast makes databse-dependant software slow – especially when your webserver hits some traffic (DDoS)

# this webserver tries to get along with 2GByte of RAM (it used to work with even 512MByte… but i guess those times are over :-D)

# it will ask you for the root-password of mysql

if you get those errors don’t give up YET

# simply run the same setup command AGAIN.

apt-get install lighttpd php5-cgi mysql-server mysql-client phpmyadmin php5-mysql php5-gd php5-dev php-pear; # command i used

# and it should go away

php5-dev php-pear; # optional stuff

# you should now have a fully functional phpmyadmin

# which is cool – because it proofs php is working as well 😀

echo „<?php phpinfo();“ >> /var/www/html/info.php; # create php-test file

CONGRATULATIONS!

You have a fully functional webserver! 🙂

you can test mysql-access like this:

Help:

MySQL actually has a in-build help 😀

mysql> help;

For information about MySQL products and services, visit:
   http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
   http://dev.mysql.com/
To buy MySQL Enterprise support, training, or other products, visit:
   https://shop.mysql.com/

List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
?         (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit      (\e) Edit command with $EDITOR.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
nopager   (\n) Disable pager, print to stdout.
notee     (\t) Don'
t write into outfile.
pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.

For server side help, type '
help contents'

mysql> help contents;
You asked for help about help category: "Contents"
For more information, type '
help <item>', where <item> is one of the following
categories:
   Account Management
   Administration
   Compound Statements
   Data Definition
   Data Manipulation
   Data Types
   Functions
   Functions and Modifiers for Use with GROUP BY
   Geographic Features
   Help Metadata
   Language Structure
   Plugins
   Procedures
   Storage Engines
   Table Maintenance
   Transactions
   User-Defined Functions
   Utility

mysql> help data types;
You asked for help about help category: "Data Types"
For more information, type '
help <item>', where <item> is one of the following
topics:
   AUTO_INCREMENT
   BIGINT
   BINARY
   BIT
   BLOB
   BLOB DATA TYPE
   BOOLEAN
   CHAR
   CHAR BYTE
   DATE
   DATETIME
   DEC
   DECIMAL
   DOUBLE
   DOUBLE PRECISION
   ENUM
   FLOAT
   INT
   INTEGER
   LONGBLOB
   LONGTEXT
   MEDIUMBLOB
   MEDIUMINT
   MEDIUMTEXT
   SET DATA TYPE
   SMALLINT
   TEXT
   TIME
   TIMESTAMP
   TINYBLOB
   TINYINT
   TINYTEXT
   VARBINARY
   VARCHAR
   YEAR DATA TYPE

help varchar
Name: '
VARCHAR'
Description:
[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE
collation_name]

A variable-length string. M represents the maximum column length in
characters. The range of M is 0 to 65,535. The effective maximum length
of a VARCHAR is subject to the maximum row size (65,535 bytes, which is
shared among all columns) and the character set used. For example, utf8
characters can require up to three bytes per character, so a VARCHAR
column that uses the utf8 character set can be declared to be a maximum
of 21,844 characters. See
http://dev.mysql.com/doc/refman/5.5/en/column-count-limit.html.

MySQL stores VARCHAR values as a 1-byte or 2-byte length prefix plus
data. The length prefix indicates the number of bytes in the value. A
VARCHAR column uses one length byte if values require no more than 255
bytes, two length bytes if values may require more than 255 bytes.

*Note*:

MySQL follows the standard SQL specification, and does not remove
trailing spaces from VARCHAR values.

VARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the
standard SQL way to define that a VARCHAR column should use some
predefined character set. MySQL uses utf8 as this predefined character
set. http://dev.mysql.com/doc/refman/5.5/en/charset-national.html.
NVARCHAR is shorthand for NATIONAL VARCHAR.

URL: http://dev.mysql.com/doc/refman/5.5/en/string-type-overview.html

 

Links:

LAMP with Apache2 – https://www.linode.com/docs/web-servers/lamp/lamp-on-debian-8-jessie

Alternatives to PHP:

If you think PHP is too slow… (it is very very good and fast for coding up a prototype)

Google “Go” – not a scripting language – will need compilation (meta-code, bytecode?) – YES it is VERY fast 😀 – https://www.reddit.com/r/golang/comments/3wfnru/switching_from_php_to_go/

While PHP is developed further in Israel, will those Google compilers be 100% Free Software? Who knows.

Alternatives to MySQL:

„So when are you required to buy a commercial license? It’s very simple: when you want to do something with MySQL that the GPL doesn’t permit.“ (src)

HINT: For MySQL or any databse you will need massive amounts of RAM.

„total RAM of your database server. If it is like most then 16 GB RAM is a minimum these days. 256 GB is not out of reach. Your server probably runs out of available slots in its default-configured Netfilter firewall before it runs out of RAM.“ (src)

mysql create new table - different storage engines - InnoDB MyISAM MEMORY Blackhole

mysql create new table – different storage engines – InnoDB MyISAM MEMORY Blackhole

from the developers of MySQL – untested! – https://mariadb.com/

https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-features/

src: https://mariadb.com/resources/blog/mariadb-53-optimizer-benchmark

admin