Breaking News
Home / Galihrezah / Cara Install Apache, MySQL, PHP (LAMP) Stack on Debian 8

Cara Install Apache, MySQL, PHP (LAMP) Stack on Debian 8


galih.us – nah… disini buat bikin web yang trafiknya udah gede… perlu bikin 1 server 1 web hehehe… jadi langsung aja caranya
1. Install Apache
untuk setting lamp, anda harus install apache terlebih dahulu

apt-get install -y apache2 apache2-doc


lalu

2. install sql

apt-get install -y mysql-server php5-mysql


3. install php

apt-get install -y php5-common libapache2-mod-php5 php5-cli

udah selesai… gampang kan?

sekian posting Cara Install Apache, MySQL, PHP (LAMP) Stack on Debian 8

log di server

root@vultr:~# apt-get install apache2 apache2-doc
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 perl perl-base perl-modules
Suggested packages:
www-browser apache2-suexec-pristine apache2-suexec-custom perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl make libb-lint-perl
libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl liblog-message-simple-perl liblog-message-perl libobject-accessor-perl
Recommended packages:
ssl-cert rename libarchive-extract-perl libmodule-pluggable-perl libpod-latex-perl libterm-ui-perl libtext-soundex-perl libcgi-pm-perl
libmodule-build-perl libpackage-constants-perl
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-doc apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 perl
perl-modules
The following packages will be upgraded:
perl-base
1 upgraded, 12 newly installed, 0 to remove and 55 not upgraded.
Need to get 10.7 MB/11.1 MB of archives.
After this operation, 60.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://http.us.debian.org/debian/ jessie/main perl-base amd64 5.20.2-3+deb8u3 [1,223 kB] Get:2 http://http.us.debian.org/debian/ jessie/main perl-modules all 5.20.2-3+deb8u3 [2,545 kB] Get:3 http://http.us.debian.org/debian/ jessie/main perl amd64 5.20.2-3+deb8u3 [2,655 kB] Get:4 http://http.us.debian.org/debian/ jessie/main apache2-bin amd64 2.4.10-10+deb8u4 [1,032 kB] Get:5 http://http.us.debian.org/debian/ jessie/main apache2-utils amd64 2.4.10-10+deb8u4 [195 kB] Get:6 http://http.us.debian.org/debian/ jessie/main apache2-data all 2.4.10-10+deb8u4 [162 kB] Get:7 http://http.us.debian.org/debian/ jessie/main apache2 amd64 2.4.10-10+deb8u4 [205 kB] Get:8 http://http.us.debian.org/debian/ jessie/main apache2-doc all 2.4.10-10+deb8u4 [2,726 kB] Fetched 10.7 MB in 0s (15.0 MB/s)
(Reading database … 21994 files and directories currently installed.)
Preparing to unpack …/perl-base_5.20.2-3+deb8u3_amd64.deb …
Unpacking perl-base (5.20.2-3+deb8u3) over (5.20.2-3+deb8u1) …
Processing triggers for man-db (2.7.0.2-5) …
Setting up perl-base (5.20.2-3+deb8u3) …
Selecting previously unselected package perl-modules.
(Reading database … 21994 files and directories currently installed.)
Preparing to unpack …/perl-modules_5.20.2-3+deb8u3_all.deb …
Unpacking perl-modules (5.20.2-3+deb8u3) …
Selecting previously unselected package perl.
Preparing to unpack …/perl_5.20.2-3+deb8u3_amd64.deb …
Unpacking perl (5.20.2-3+deb8u3) …
Selecting previously unselected package libapr1:amd64.
Preparing to unpack …/libapr1_1.5.1-3_amd64.deb …
Unpacking libapr1:amd64 (1.5.1-3) …
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack …/libaprutil1_1.5.4-1_amd64.deb …
Unpacking libaprutil1:amd64 (1.5.4-1) …
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack …/libaprutil1-dbd-sqlite3_1.5.4-1_amd64.deb …
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.5.4-1) …
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack …/libaprutil1-ldap_1.5.4-1_amd64.deb …
Unpacking libaprutil1-ldap:amd64 (1.5.4-1) …
Selecting previously unselected package liblua5.1-0:amd64.
Preparing to unpack …/liblua5.1-0_5.1.5-7.1_amd64.deb …
Unpacking liblua5.1-0:amd64 (5.1.5-7.1) …
Selecting previously unselected package apache2-bin.
Preparing to unpack …/apache2-bin_2.4.10-10+deb8u4_amd64.deb …
Unpacking apache2-bin (2.4.10-10+deb8u4) …
Selecting previously unselected package apache2-utils.
Preparing to unpack …/apache2-utils_2.4.10-10+deb8u4_amd64.deb …
Unpacking apache2-utils (2.4.10-10+deb8u4) …
Selecting previously unselected package apache2-data.
Preparing to unpack …/apache2-data_2.4.10-10+deb8u4_all.deb …
Unpacking apache2-data (2.4.10-10+deb8u4) …
Selecting previously unselected package apache2.
Preparing to unpack …/apache2_2.4.10-10+deb8u4_amd64.deb …
Unpacking apache2 (2.4.10-10+deb8u4) …
Selecting previously unselected package apache2-doc.
Preparing to unpack …/apache2-doc_2.4.10-10+deb8u4_all.deb …
Unpacking apache2-doc (2.4.10-10+deb8u4) …
Processing triggers for man-db (2.7.0.2-5) …
Processing triggers for systemd (215-17+deb8u2) …
Setting up perl-modules (5.20.2-3+deb8u3) …
Setting up perl (5.20.2-3+deb8u3) …
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode
Setting up libapr1:amd64 (1.5.1-3) …
Setting up libaprutil1:amd64 (1.5.4-1) …
Setting up libaprutil1-dbd-sqlite3:amd64 (1.5.4-1) …
Setting up libaprutil1-ldap:amd64 (1.5.4-1) …
Setting up liblua5.1-0:amd64 (5.1.5-7.1) …
Setting up apache2-bin (2.4.10-10+deb8u4) …
Setting up apache2-utils (2.4.10-10+deb8u4) …
Setting up apache2-data (2.4.10-10+deb8u4) …
Setting up apache2 (2.4.10-10+deb8u4) …
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Setting up apache2-doc (2.4.10-10+deb8u4) …
apache2_invoke: Enable configuration apache2-doc
Processing triggers for libc-bin (2.19-18+deb8u1) …
Processing triggers for systemd (215-17+deb8u2) …
root@vultr:~#

log server sql

root@vultr:~# apt-get install -y mysql-server php5-mysql
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libperl4-corelibs-perl libterm-readkey-perl lsof mysql-client-5.5 mysql-common
mysql-server-5.5 mysql-server-core-5.5 php5-common psmisc
Suggested packages:
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx tinyca php5-user-cache
Recommended packages:
libhtml-template-perl
The following NEW packages will be installed:
libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libperl4-corelibs-perl libterm-readkey-perl lsof mysql-client-5.5 mysql-common
mysql-server mysql-server-5.5 mysql-server-core-5.5 php5-common php5-mysql psmisc
0 upgraded, 15 newly installed, 0 to remove and 55 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 98.8 MB of additional disk space will be used.
Get:1 http://http.us.debian.org/debian/ jessie/main libaio1 amd64 0.3.110-1 [9,312 B] Get:2 http://http.us.debian.org/debian/ jessie/main libdbi-perl amd64 1.631-3+b1 [816 kB] Get:3 http://security.debian.org/ jessie/updates/main mysql-common all 5.5.47-0+deb8u1 [82.6 kB] Get:4 http://http.us.debian.org/debian/ jessie/main libdbd-mysql-perl amd64 4.028-2+b1 [119 kB] Get:5 http://http.us.debian.org/debian/ jessie/main libterm-readkey-perl amd64 2.32-1+b1 [28.0 kB] Get:6 http://http.us.debian.org/debian/ jessie/main psmisc amd64 22.21-2 [119 kB] Get:7 http://http.us.debian.org/debian/ jessie/main libperl4-corelibs-perl all 0.003-1 [43.6 kB] Get:8 http://http.us.debian.org/debian/ jessie/main lsof amd64 4.86+dfsg-1 [316 kB] Get:9 http://security.debian.org/ jessie/updates/main libmysqlclient18 amd64 5.5.47-0+deb8u1 [675 kB] Get:10 http://http.us.debian.org/debian/ jessie/main php5-common amd64 5.6.17+dfsg-0+deb8u1 [716 kB] Get:11 http://http.us.debian.org/debian/ jessie/main php5-mysql amd64 5.6.17+dfsg-0+deb8u1 [65.2 kB] Get:12 http://security.debian.org/ jessie/updates/main mysql-client-5.5 amd64 5.5.47-0+deb8u1 [1,678 kB] Get:13 http://security.debian.org/ jessie/updates/main mysql-server-core-5.5 amd64 5.5.47-0+deb8u1 [3,353 kB] Get:14 http://security.debian.org/ jessie/updates/main mysql-server-5.5 amd64 5.5.47-0+deb8u1 [2,022 kB] Get:15 http://security.debian.org/ jessie/updates/main mysql-server all 5.5.47-0+deb8u1 [80.9 kB] Fetched 10.1 MB in 1s (8,005 kB/s)
Preconfiguring packages …
Selecting previously unselected package libaio1:amd64.
(Reading database … 26426 files and directories currently installed.)
Preparing to unpack …/libaio1_0.3.110-1_amd64.deb …
Unpacking libaio1:amd64 (0.3.110-1) …
Selecting previously unselected package mysql-common.
Preparing to unpack …/mysql-common_5.5.47-0+deb8u1_all.deb …
Unpacking mysql-common (5.5.47-0+deb8u1) …
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack …/libmysqlclient18_5.5.47-0+deb8u1_amd64.deb …
Unpacking libmysqlclient18:amd64 (5.5.47-0+deb8u1) …
Selecting previously unselected package libdbi-perl.
Preparing to unpack …/libdbi-perl_1.631-3+b1_amd64.deb …
Unpacking libdbi-perl (1.631-3+b1) …
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack …/libdbd-mysql-perl_4.028-2+b1_amd64.deb …
Unpacking libdbd-mysql-perl (4.028-2+b1) …
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack …/libterm-readkey-perl_2.32-1+b1_amd64.deb …
Unpacking libterm-readkey-perl (2.32-1+b1) …
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack …/mysql-client-5.5_5.5.47-0+deb8u1_amd64.deb …
Unpacking mysql-client-5.5 (5.5.47-0+deb8u1) …
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack …/mysql-server-core-5.5_5.5.47-0+deb8u1_amd64.deb …
Unpacking mysql-server-core-5.5 (5.5.47-0+deb8u1) …
Selecting previously unselected package psmisc.
Preparing to unpack …/psmisc_22.21-2_amd64.deb …
Unpacking psmisc (22.21-2) …
Processing triggers for man-db (2.7.0.2-5) …
Setting up mysql-common (5.5.47-0+deb8u1) …
Selecting previously unselected package mysql-server-5.5.
(Reading database … 26843 files and directories currently installed.)
Preparing to unpack …/mysql-server-5.5_5.5.47-0+deb8u1_amd64.deb …
Unpacking mysql-server-5.5 (5.5.47-0+deb8u1) …
Selecting previously unselected package libperl4-corelibs-perl.
Preparing to unpack …/libperl4-corelibs-perl_0.003-1_all.deb …
Unpacking libperl4-corelibs-perl (0.003-1) …
Selecting previously unselected package lsof.
Preparing to unpack …/lsof_4.86+dfsg-1_amd64.deb …
Unpacking lsof (4.86+dfsg-1) …
Selecting previously unselected package mysql-server.
Preparing to unpack …/mysql-server_5.5.47-0+deb8u1_all.deb …
Unpacking mysql-server (5.5.47-0+deb8u1) …
Selecting previously unselected package php5-common.
Preparing to unpack …/php5-common_5.6.17+dfsg-0+deb8u1_amd64.deb …
Unpacking php5-common (5.6.17+dfsg-0+deb8u1) …
Selecting previously unselected package php5-mysql.
Preparing to unpack …/php5-mysql_5.6.17+dfsg-0+deb8u1_amd64.deb …
Unpacking php5-mysql (5.6.17+dfsg-0+deb8u1) …
Processing triggers for man-db (2.7.0.2-5) …
Processing triggers for systemd (215-17+deb8u2) …
Setting up libaio1:amd64 (0.3.110-1) …
Setting up libmysqlclient18:amd64 (5.5.47-0+deb8u1) …
Setting up libdbi-perl (1.631-3+b1) …
Setting up libdbd-mysql-perl (4.028-2+b1) …
Setting up libterm-readkey-perl (2.32-1+b1) …
Setting up mysql-client-5.5 (5.5.47-0+deb8u1) …
Setting up mysql-server-core-5.5 (5.5.47-0+deb8u1) …
Setting up psmisc (22.21-2) …
Setting up mysql-server-5.5 (5.5.47-0+deb8u1) …
160224 10:34:19 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160224 10:34:19 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0+deb8u1) starting as process 12629 …
Setting up libperl4-corelibs-perl (0.003-1) …
Setting up lsof (4.86+dfsg-1) …
Setting up mysql-server (5.5.47-0+deb8u1) …
Setting up php5-common (5.6.17+dfsg-0+deb8u1) …

Creating config file /etc/php5/mods-available/pdo.ini with new version

Creating config file /etc/php5/mods-available/opcache.ini with new version
Setting up php5-mysql (5.6.17+dfsg-0+deb8u1) …

Creating config file /etc/php5/mods-available/mysql.ini with new version

Creating config file /etc/php5/mods-available/mysqli.ini with new version

Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
Processing triggers for libc-bin (2.19-18+deb8u1) …
Processing triggers for systemd (215-17+deb8u2) …
root@vultr:~#

log php

root@vultr:~# apt-get install php5-common libapache2-mod-php5 php5-cli
Reading package lists… Done
Building dependency tree
Reading state information… Done
php5-common is already the newest version.
php5-common set to manually installed.
The following extra packages will be installed:
libonig2 libqdbm14 php5-json
Suggested packages:
php-pear
Recommended packages:
php5-readline
The following NEW packages will be installed:
libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-json
0 upgraded, 5 newly installed, 0 to remove and 55 not upgraded.
Need to get 4,642 kB of archives.
After this operation, 19.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://http.us.debian.org/debian/ jessie/main libonig2 amd64 5.9.5-3.2 [118 kB] Get:2 http://http.us.debian.org/debian/ jessie/main libqdbm14 amd64 1.8.78-5+b1 [118 kB] Get:3 http://http.us.debian.org/debian/ jessie/main php5-json amd64 1.3.6-1 [18.6 kB] Get:4 http://http.us.debian.org/debian/ jessie/main php5-cli amd64 5.6.17+dfsg-0+deb8u1 [2,180 kB] Get:5 http://http.us.debian.org/debian/ jessie/main libapache2-mod-php5 amd64 5.6.17+dfsg-0+deb8u1 [2,208 kB] Fetched 4,642 kB in 0s (10.5 MB/s)
Selecting previously unselected package libonig2:amd64.
(Reading database … 27055 files and directories currently installed.)
Preparing to unpack …/libonig2_5.9.5-3.2_amd64.deb …
Unpacking libonig2:amd64 (5.9.5-3.2) …
Selecting previously unselected package libqdbm14.
Preparing to unpack …/libqdbm14_1.8.78-5+b1_amd64.deb …
Unpacking libqdbm14 (1.8.78-5+b1) …
Selecting previously unselected package php5-json.
Preparing to unpack …/php5-json_1.3.6-1_amd64.deb …
Unpacking php5-json (1.3.6-1) …
Selecting previously unselected package php5-cli.
Preparing to unpack …/php5-cli_5.6.17+dfsg-0+deb8u1_amd64.deb …
Unpacking php5-cli (5.6.17+dfsg-0+deb8u1) …
Selecting previously unselected package libapache2-mod-php5.
Preparing to unpack …/libapache2-mod-php5_5.6.17+dfsg-0+deb8u1_amd64.deb …
Unpacking libapache2-mod-php5 (5.6.17+dfsg-0+deb8u1) …
Processing triggers for man-db (2.7.0.2-5) …
Setting up libonig2:amd64 (5.9.5-3.2) …
Setting up libqdbm14 (1.8.78-5+b1) …
Setting up php5-json (1.3.6-1) …
php5_invoke: Enable module json for apache2 SAPI
php5_invoke: Enable module json for cli SAPI
Setting up php5-cli (5.6.17+dfsg-0+deb8u1) …
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar5 to provide /usr/bin/phar (phar) in auto mode

Creating config file /etc/php5/cli/php.ini with new version
php5_invoke: Enable module pdo_mysql for cli SAPI
php5_invoke: Enable module opcache for cli SAPI
php5_invoke: Enable module mysql for cli SAPI
php5_invoke: Enable module mysqli for cli SAPI
php5_invoke: Enable module pdo for cli SAPI
Setting up libapache2-mod-php5 (5.6.17+dfsg-0+deb8u1) …

Creating config file /etc/php5/apache2/php.ini with new version
php5_invoke: Enable module pdo_mysql for apache2 SAPI
php5_invoke: Enable module opcache for apache2 SAPI
php5_invoke: Enable module mysql for apache2 SAPI
php5_invoke: Enable module mysqli for apache2 SAPI
php5_invoke: Enable module pdo for apache2 SAPI
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php5
Processing triggers for libc-bin (2.19-18+deb8u1) …
root@vultr:~#

fix eror E: Unable to locate package apache2
E: Unable to locate package apache2-doc

ketikan

apt-get update

semoga bermanfaat

Maju terus indonesia,
bentar ane mikir dulu buat postingan besok.. hehehe,

thanks for visiting this blog and CMIIW (Correct Me If I am Wrong),
report admin jika ada eror atau ada salah dalam penulisan

About Galihrezah

segala sesuatu tergantung pada pola pikir dan sugesti dari diri kita masing-masing - Galihrezah™

Check Also

Firmware Android Marshmallow Samsung Galaxy S6 (SM-G920F) bahasa indonesia update 23-06-2016

galih.us – lanjut lagi berbagi firmware, untuk Firmware Android Marshmallow Samsung Galaxy S6 (SM-G920F) bahasa …