jgfhrt 发表于 2015-10-8 07:56:42

Debian 8 Jessie LAMP server tutorial with Apache 2, PHP 5 and MariaDB

Debian 8 Jessie LAMP server tutorial with Apache 2, PHP 5 and MariaDB (instead of MySQL)


2 Installing MariaDB as MySQL replacement

1
apt-get -y install mariadb-server mariadb-client




3 Installing Apache 2.4

1
apt-get -y install apache2




Now direct your browser to http://192.168.1.100, and you should see the Apache2 placeholder page (It works!):

4 Installing PHP 5.6

1
2
apt-get -y install php5 libapache2-mod-php5
service apache2 restart




5 Testing PHP / Getting details about your PHP installation

1
2
3
4
5
nano /var/www/html/info.php

<?php
phpinfo();
?>





Now we call that file in a browser (e.g. http://192.168.1.100/info.php):



6 Getting MySQL and MariaDB Support in PHP


1
2
3
4
5
apt-cache search php5

apt-get -y install php5-mysqlnd php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

service apache2 restart






7 Install APCu PHP Cache to improve the PHP speed


1
2
3
apt-get install php5-apcu

service apache2 restart





8 phpMyAdmin

1
apt-get -y install phpmyadmin




Afterwards, you can access phpMyAdmin under http://192.168.1.100/phpmyadmin/:



Apache: http://httpd.apache.org/
PHP: http://www.php.net/
MySQL: http://www.mysql.com/

页: [1]
查看完整版本: Debian 8 Jessie LAMP server tutorial with Apache 2, PHP 5 and MariaDB