Minggu, 06 Maret 2016

Home » , , , » Install LAMP (Linux, Apache, MySQL, PHP) on CentOS

Install LAMP (Linux, Apache, MySQL, PHP) on CentOS

LAMP-Setup

Install LAMP (Linux, Apache, MySQL, PHP) on CentOS

Install LAMP (Linux, Apache, MySQL, PHP) on CentOS – Assalamualaikum,, Kali ini saya mau mengulas ulang tentang cara install LAMP (Linux, Apache, MySQL, PHP) di centos. sebelumnya sudah saya jabarkan satu persatu, tapi saya rasa lebih baik dibuat jadi satu saja, karena saling berkaitan satu sama lain. :) Nah, mari kita mengenal terlebih dahulu apa2 saj pengertiannya :)

Apa itu Apache?

Apache adalah server web yang dapat dijalankan di banyak sistem operasi (Unix, BSD, Linux, Microsoft Windows dan Novell Netware serta platform lainnya) yang berguna untuk melayani dan memfungsikan situs web yang bertanggung jawab pada request-response HTTP dan logging informasi secara detail. Protokol yang digunakan untuk melayani fasilitas web/www ini menggunakan HTTP.

Apa itu MySQL?

MySQL adalah sistem manajemen database SQL yang bersifat Open Source dan paling populer saat ini. Sistem Database MySQL mendukung beberapa fitur seperti multithreaded, multi-user, dan SQL database managemen sistem (DBMS). Database ini dibuat untuk keperluan sistem database yang cepat, handal dan mudah digunakan.

Apa itu PHP?

PHP (Hypertext Preprocessor) adalah bahasa skrip open source yang dapat ditanamkan atau disisipkan ke dalam HTML untuk membuat halaman web lebih dinamis pada sebuah websites.

Persiapan Install LAMP (Linux, Apache, MySQL, PHP) di CentOS

  • Sebuah VPS yang berjalan menggunakan CentOS 6.5 x32.
  • SSH Client. Saya menggunakan Putty untuk meremote VPS dari PC windows.
  • Pengetahuan tentang perintah-perintah dasar Linux
  • Jangan lupa kopi dan rokoknya Install LLMP (Linux, Lighttpd, MySQL, PHP) di CentOS

Langkah-langkah Install LLMP (Linux, Lighttpd, MySQL, PHP) di CentOS

Step 1: Installing EPEL Repository

Sebelum kita install LAMP, tambahkan EPEL repositorynya dulu, gunakan perintah berikut:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Sample Output:
[root@aqua ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.qMNRA3: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
1:epel-release           ########################################### [100%]
[root@aqua ~]#

Step 2: Installing Apache, MySQL & PHP

Nah, saatnya kita lakukan instalasi LAMP, silahkan gunakan perintah berikut:
# yum install -y httpd mysql mysql-server php php-common Sample Output:
[root@aqua ~]# yum -y install httpd mysql mysql-server php php-common Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.secureax.com * epel: mirror.nus.edu.sg * extras: centos.mirror.secureax.com * remi: mirror.smartmedia.net.id * remi-test: mirror.smartmedia.net.id * updates: centos.mirror.secureax.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package httpd.i686 0:2.2.15-30.el6.centos will be installed --> Processing Dependency: httpd-tools = 2.2.15-30.el6.centos for package: httpd-2.2.15-30.el6.centos.i686 --> Processing Dependency: libaprutil-1.so.0 for package: httpd-2.2.15-30.el6.centos.i686 --> Processing Dependency: libapr-1.so.0 for package: httpd-2.2.15-30.el6.centos.i686 --> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-30.el6.centos.i686 --> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-30.el6.centos.i686 ---> Package mysql.i686 0:5.5.37-1.el6.remi will be installed --> Processing Dependency: real-mysql-libs(x86-32) = 5.5.37-1.el6.remi for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(Sys::Hostname) for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(IPC::Open3) for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(Getopt::Long) for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(File::Temp) for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(Fcntl) for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(Exporter) for package: mysql-5.5.37-1.el6.remi.i686 --> Processing Dependency: /usr/bin/perl for package: mysql-5.5.37-1.el6.remi.i686 ---> Package mysql-server.i686 0:5.5.37-1.el6.remi will be installed --> Processing Dependency: perl-DBI for package: mysql-server-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.5.37-1.el6.remi.i686 --> Processing Dependency: perl(DBI) for package: mysql-server-5.5.37-1.el6.remi.i686 ---> Package php.i686 0:5.4.28-1.el6.remi will be installed --> Processing Dependency: php-cli(x86-32) = 5.4.28-1.el6.remi for package: php-5.4.28-1.el6.remi.i686 ---> Package php-common.i686 0:5.4.28-1.el6.remi will be installed --> Running transaction check ---> Package apr.i686 0:1.3.9-5.el6_2 will be installed ---> Package apr-util.i686 0:1.3.9-3.el6_0.1 will be installed ---> Package apr-util-ldap.i686 0:1.3.9-3.el6_0.1 will be installed ---> Package httpd-tools.i686 0:2.2.15-30.el6.centos will be installed ---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed ---> Package mysql-libs.i686 0:5.1.73-3.el6_5 will be updated --> Processing Dependency: libmysqlclient.so.16 for package: perl-DBD-MySQL-4.013-3.el6.i686 --> Processing Dependency: libmysqlclient.so.16 for package: 2:postfix-2.6.6-6.el6_5.i686 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: perl-DBD-MySQL-4.013-3.el6.i686 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: 2:postfix-2.6.6-6.el6_5.i686 ---> Package mysql-libs.i686 0:5.5.37-1.el6.remi will be an update ---> Package perl.i686 4:5.10.1-136.el6 will be installed --> Processing Dependency: perl-libs = 4:5.10.1-136.el6 for package: 4:perl-5.10.1-136.el6.i686 --> Processing Dependency: perl-libs for package: 4:perl-5.10.1-136.el6.i686 --> Processing Dependency: perl(version) for package: 4:perl-5.10.1-136.el6.i686 --> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-136.el6.i686 --> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-136.el6.i686 --> Processing Dependency: libperl.so for package: 4:perl-5.10.1-136.el6.i686 ---> Package perl-DBD-MySQL.i686 0:4.013-3.el6 will be installed ---> Package perl-DBI.i686 0:1.609-4.el6 will be installed ---> Package php-cli.i686 0:5.4.28-1.el6.remi will be installed --> Running transaction check ---> Package compat-mysql51.i686 0:5.1.54-1.el6.remi will be installed ---> Package perl-Module-Pluggable.i686 1:3.90-136.el6 will be installed ---> Package perl-Pod-Simple.i686 1:3.13-136.el6 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-136.el6.i686 ---> Package perl-libs.i686 4:5.10.1-136.el6 will be installed ---> Package perl-version.i686 3:0.77-136.el6 will be installed --> Running transaction check ---> Package perl-Pod-Escapes.i686 1:1.04-136.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: httpd i686 2.2.15-30.el6.centos updates 828 k mysql i686 5.5.37-1.el6.remi remi 5.8 M mysql-server i686 5.5.37-1.el6.remi remi 10 M php i686 5.4.28-1.el6.remi remi 2.7 M php-common i686 5.4.28-1.el6.remi remi 936 k Installing for dependencies: apr i686 1.3.9-5.el6_2 base 129 k apr-util i686 1.3.9-3.el6_0.1 base 89 k apr-util-ldap i686 1.3.9-3.el6_0.1 base 15 k compat-mysql51 i686 5.1.54-1.el6.remi remi 1.4 M httpd-tools i686 2.2.15-30.el6.centos updates 74 k mailcap noarch 2.1.31-2.el6 base 27 k perl i686 4:5.10.1-136.el6 base 9.7 M perl-DBD-MySQL i686 4.013-3.el6 base 134 k perl-DBI i686 1.609-4.el6 base 705 k perl-Module-Pluggable i686 1:3.90-136.el6 base 40 k perl-Pod-Escapes i686 1:1.04-136.el6 base 32 k perl-Pod-Simple i686 1:3.13-136.el6 base 212 k perl-libs i686 4:5.10.1-136.el6 base 593 k perl-version i686 3:0.77-136.el6 base 51 k php-cli i686 5.4.28-1.el6.remi remi 2.7 M Updating for dependencies: mysql-libs i686 5.5.37-1.el6.remi remi 778 k Transaction Summary ================================================================================ Install 20 Package(s) Upgrade 1 Package(s) Total download size: 37 M Downloading Packages: (1/21): apr-1.3.9-5.el6_2.i686.rpm | 129 kB 00:00 (2/21): apr-util-1.3.9-3.el6_0.1.i686.rpm | 89 kB 00:00 (3/21): apr-util-ldap-1.3.9-3.el6_0.1.i686.rpm | 15 kB 00:00 (4/21): compat-mysql51-5.1.54-1.el6.remi.i686.rpm | 1.4 MB 00:01 (5/21): httpd-2.2.15-30.el6.centos.i686.rpm | 828 kB 00:01 (6/21): httpd-tools-2.2.15-30.el6.centos.i686.rpm | 74 kB 00:00 (7/21): mailcap-2.1.31-2.el6.noarch.rpm | 27 kB 00:00 (8/21): mysql-5.5.37-1.el6.remi.i686.rpm | 5.8 MB 00:06 (9/21): mysql-libs-5.5.37-1.el6.remi.i686.rpm | 778 kB 00:00 (10/21): mysql-server-5.5.37-1.el6.remi.i686.rpm | 10 MB 00:11 (11/21): perl-5.10.1-136.el6.i686.rpm | 9.7 MB 00:24 (12/21): perl-DBD-MySQL-4.013-3.el6.i686.rpm | 134 kB 00:00 (13/21): perl-DBI-1.609-4.el6.i686.rpm | 705 kB 00:02 (14/21): perl-Module-Pluggable-3.90-136.el6.i686.rpm | 40 kB 00:00 (15/21): perl-Pod-Escapes-1.04-136.el6.i686.rpm | 32 kB 00:00 (16/21): perl-Pod-Simple-3.13-136.el6.i686.rpm | 212 kB 00:01 (17/21): perl-libs-5.10.1-136.el6.i686.rpm | 593 kB 00:02 (18/21): perl-version-0.77-136.el6.i686.rpm | 51 kB 00:00 (19/21): php-5.4.28-1.el6.remi.i686.rpm | 2.7 MB 00:02 (20/21): php-cli-5.4.28-1.el6.remi.i686.rpm | 2.7 MB 00:02 (21/21): php-common-5.4.28-1.el6.remi.i686.rpm | 936 kB 00:01 -------------------------------------------------------------------------------- Total 635 kB/s | 37 MB 00:59 warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi Importing GPG key 0x00F97F56: Userid : Remi Collet <RPMS@FamilleCollet.com> Package: remi-release-6.5-1.el6.remi.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Installing : php-common-5.4.28-1.el6.remi.i686 1/22 WARNING : These php-* RPM are not official Fedora / Red Hat build and overrides the official ones. Don't file bugs on Fedora Project nor Red Hat. Use dedicated forums http://forums.famillecollet.com/ Installing : php-cli-5.4.28-1.el6.remi.i686 2/22 Installing : 1:perl-Pod-Escapes-1.04-136.el6.i686 3/22 Installing : 1:perl-Module-Pluggable-3.90-136.el6.i686 4/22 Installing : 3:perl-version-0.77-136.el6.i686 5/22 Installing : 4:perl-libs-5.10.1-136.el6.i686 6/22 Installing : 1:perl-Pod-Simple-3.13-136.el6.i686 7/22 Installing : 4:perl-5.10.1-136.el6.i686 8/22 Installing : mailcap-2.1.31-2.el6.noarch 9/22 Installing : apr-1.3.9-5.el6_2.i686 10/22 Installing : apr-util-1.3.9-3.el6_0.1.i686 11/22 Installing : perl-DBI-1.609-4.el6.i686 12/22 Updating : mysql-libs-5.5.37-1.el6.remi.i686 13/22 WARNING : This MySQL RPM is not an official Fedora / Red Hat build and it overrides the official one. Don't file bugs on Fedora Project nor Red Hat. Use dedicated forums http://forums.famillecollet.com/ Installing : mysql-5.5.37-1.el6.remi.i686 14/22 Installing : apr-util-ldap-1.3.9-3.el6_0.1.i686 15/22 Installing : httpd-tools-2.2.15-30.el6.centos.i686 16/22 Installing : httpd-2.2.15-30.el6.centos.i686 17/22 Installing : compat-mysql51-5.1.54-1.el6.remi.i686 18/22 Installing : php-5.4.28-1.el6.remi.i686 19/22 Installing : perl-DBD-MySQL-4.013-3.el6.i686 20/22 Installing : mysql-server-5.5.37-1.el6.remi.i686 21/22 Cleanup : mysql-libs-5.1.73-3.el6_5.i686 22/22 Verifying : apr-util-1.3.9-3.el6_0.1.i686 1/22 Verifying : mysql-5.5.37-1.el6.remi.i686 2/22 Verifying : perl-DBD-MySQL-4.013-3.el6.i686 3/22 Verifying : php-5.4.28-1.el6.remi.i686 4/22 Verifying : perl-DBI-1.609-4.el6.i686 5/22 Verifying : 1:perl-Pod-Simple-3.13-136.el6.i686 6/22 Verifying : apr-util-ldap-1.3.9-3.el6_0.1.i686 7/22 Verifying : compat-mysql51-5.1.54-1.el6.remi.i686 8/22 Verifying : httpd-tools-2.2.15-30.el6.centos.i686 9/22 Verifying : php-common-5.4.28-1.el6.remi.i686 10/22 Verifying : mysql-server-5.5.37-1.el6.remi.i686 11/22 Verifying : php-cli-5.4.28-1.el6.remi.i686 12/22 Verifying : httpd-2.2.15-30.el6.centos.i686 13/22 Verifying : 1:perl-Module-Pluggable-3.90-136.el6.i686 14/22 Verifying : 4:perl-5.10.1-136.el6.i686 15/22 Verifying : mailcap-2.1.31-2.el6.noarch 16/22 Verifying : apr-1.3.9-5.el6_2.i686 17/22 Verifying : 3:perl-version-0.77-136.el6.i686 18/22 Verifying : 1:perl-Pod-Escapes-1.04-136.el6.i686 19/22 Verifying : mysql-libs-5.5.37-1.el6.remi.i686 20/22 Verifying : 4:perl-libs-5.10.1-136.el6.i686 21/22 Verifying : mysql-libs-5.1.73-3.el6_5.i686 22/22 Installed: httpd.i686 0:2.2.15-30.el6.centos mysql.i686 0:5.5.37-1.el6.remi mysql-server.i686 0:5.5.37-1.el6.remi php.i686 0:5.4.28-1.el6.remi php-common.i686 0:5.4.28-1.el6.remi Dependency Installed: apr.i686 0:1.3.9-5.el6_2 apr-util.i686 0:1.3.9-3.el6_0.1 apr-util-ldap.i686 0:1.3.9-3.el6_0.1 compat-mysql51.i686 0:5.1.54-1.el6.remi httpd-tools.i686 0:2.2.15-30.el6.centos mailcap.noarch 0:2.1.31-2.el6 perl.i686 4:5.10.1-136.el6 perl-DBD-MySQL.i686 0:4.013-3.el6 perl-DBI.i686 0:1.609-4.el6 perl-Module-Pluggable.i686 1:3.90-136.el6 perl-Pod-Escapes.i686 1:1.04-136.el6 perl-Pod-Simple.i686 1:3.13-136.el6 perl-libs.i686 4:5.10.1-136.el6 perl-version.i686 3:0.77-136.el6 php-cli.i686 0:5.4.28-1.el6.remi Dependency Updated: mysql-libs.i686 0:5.5.37-1.el6.remi Complete! [root@aqua ~]#

Step 3: Installing PHP 5.5.4 Modules

Kemudian install juga PHP dan modul2nya, gunakan perintah berikut:
# yum install -y php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache 
php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo
Sample Output:
[root@aqua ~]# yum install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.secureax.com * epel: mirror.nus.edu.sg * extras: centos.mirror.secureax.com * remi: mirror.smartmedia.net.id * remi-test: mirror.smartmedia.net.id * updates: centos.mirror.secureax.com Setting up Install Process Package php-cli-5.4.28-1.el6.remi.i686 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package php-gd.i686 0:5.4.28-1.el6.remi will be installed --> Processing Dependency: libt1.so.5 for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libpng12.so.0(PNG12_0) for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libpng12.so.0 for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2) for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libjpeg.so.62 for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libfreetype.so.6 for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libXpm.so.4 for package: php-gd-5.4.28-1.el6.remi.i686 --> Processing Dependency: libX11.so.6 for package: php-gd-5.4.28-1.el6.remi.i686 ---> Package php-mbstring.i686 0:5.4.28-1.el6.remi will be installed ---> Package php-mcrypt.i686 0:5.4.28-1.el6.remi will be installed --> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.4.28-1.el6.remi.i686 --> Processing Dependency: libltdl.so.7 for package: php-mcrypt-5.4.28-1.el6.remi.i686 ---> Package php-mysql.i686 0:5.4.28-1.el6.remi will be installed ---> Package php-pdo.i686 0:5.4.28-1.el6.remi will be installed ---> Package php-pear.noarch 1:1.9.4-27.el6.remi will be installed --> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-27.el6.remi.noarch ---> Package php-pecl-apc.i686 0:3.1.15-0.4.20130912.el6.remi.5.4 will be installed ---> Package php-pecl-memcache.i686 0:3.0.8-2.el6.remi.5.4 will be installed ---> Package php-pecl-memcached.i686 0:2.2.0-2.el6.remi.5.4 will be installed --> Processing Dependency: php-pecl-msgpack(x86-32) for package: php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 --> Processing Dependency: php-pecl-igbinary(x86-32) for package: php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 --> Processing Dependency: libmemcachedutil.so.2 for package: php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 --> Processing Dependency: libmemcachedprotocol.so.0 for package: php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 --> Processing Dependency: libmemcached.so.11 for package: php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 --> Processing Dependency: libevent-2.0.so.5 for package: php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 ---> Package php-pecl-mongo.i686 0:1.5.1-1.el6.remi.5.4 will be installed ---> Package php-pecl-sqlite.i686 0:2.0.0-0.4.svn332053.el6.remi.5.4 will be installed --> Processing Dependency: libsqlite.so.0 for package: php-pecl-sqlite-2.0.0-0.4.svn332053.el6.remi.5.4.i686 ---> Package php-pgsql.i686 0:5.4.28-1.el6.remi will be installed --> Processing Dependency: libpq.so.5 for package: php-pgsql-5.4.28-1.el6.remi.i686 ---> Package php-xml.i686 0:5.4.28-1.el6.remi will be installed --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24) for package: php-xml-5.4.28-1.el6.remi.i686 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22) for package: php-xml-5.4.28-1.el6.remi.i686 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18) for package: php-xml-5.4.28-1.el6.remi.i686 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13) for package: php-xml-5.4.28-1.el6.remi.i686 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11) for package: php-xml-5.4.28-1.el6.remi.i686 --> Processing Dependency: libxslt.so.1 for package: php-xml-5.4.28-1.el6.remi.i686 --> Processing Dependency: libexslt.so.0 for package: php-xml-5.4.28-1.el6.remi.i686 --> Running transaction check ---> Package freetype.i686 0:2.3.11-14.el6_3.1 will be installed ---> Package libX11.i686 0:1.5.0-4.el6 will be installed --> Processing Dependency: libX11-common = 1.5.0-4.el6 for package: libX11-1.5.0-4.el6.i686 --> Processing Dependency: libxcb.so.1 for package: libX11-1.5.0-4.el6.i686 ---> Package libXpm.i686 0:3.5.10-2.el6 will be installed ---> Package libevent-last.i686 0:2.0.18-1.el6.remi will be installed ---> Package libjpeg-turbo.i686 0:1.2.1-3.el6_5 will be installed ---> Package libmcrypt.i686 0:2.5.8-9.el6 will be installed ---> Package libmemcached-last-libs.i686 0:1.0.18-2.el6.remi will be installed ---> Package libpng.i686 2:1.2.49-1.el6_2 will be installed ---> Package libtool-ltdl.i686 0:2.2.6-15.5.el6 will be installed ---> Package libxslt.i686 0:1.1.26-2.el6_3.1 will be installed ---> Package php-pecl-igbinary.i686 0:1.1.2-0.1.git3b8ab7e.el6.remi will be installed ---> Package php-pecl-msgpack.i686 0:0.5.5-4.el6.remi will be installed ---> Package php-process.i686 0:5.4.28-1.el6.remi will be installed ---> Package postgresql-libs.i686 0:8.4.20-1.el6_5 will be installed ---> Package sqlite2.i686 0:2.8.17-10.el6 will be installed ---> Package t1lib.i686 0:5.1.2-6.el6_2.1 will be installed --> Running transaction check ---> Package libX11-common.noarch 0:1.5.0-4.el6 will be installed ---> Package libxcb.i686 0:1.8.1-1.el6 will be installed --> Processing Dependency: libXau.so.6 for package: libxcb-1.8.1-1.el6.i686 --> Running transaction check ---> Package libXau.i686 0:1.0.6-4.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: php-gd i686 5.4.28-1.el6.remi remi 141 k php-mbstring i686 5.4.28-1.el6.remi remi 940 k php-mcrypt i686 5.4.28-1.el6.remi remi 49 k php-mysql i686 5.4.28-1.el6.remi remi 130 k php-pdo i686 5.4.28-1.el6.remi remi 116 k php-pear noarch 1:1.9.4-27.el6.remi remi 372 k php-pecl-apc i686 3.1.15-0.4.20130912.el6.remi.5.4 remi 141 k php-pecl-memcache i686 3.0.8-2.el6.remi.5.4 remi 100 k php-pecl-memcached i686 2.2.0-2.el6.remi.5.4 remi 100 k php-pecl-mongo i686 1.5.1-1.el6.remi.5.4 remi 231 k php-pecl-sqlite i686 2.0.0-0.4.svn332053.el6.remi.5.4 remi 64 k php-pgsql i686 5.4.28-1.el6.remi remi 109 k php-xml i686 5.4.28-1.el6.remi remi 165 k Installing for dependencies: freetype i686 2.3.11-14.el6_3.1 base 363 k libX11 i686 1.5.0-4.el6 base 590 k libX11-common noarch 1.5.0-4.el6 base 192 k libXau i686 1.0.6-4.el6 base 24 k libXpm i686 3.5.10-2.el6 base 50 k libevent-last i686 2.0.18-1.el6.remi remi 161 k libjpeg-turbo i686 1.2.1-3.el6_5 updates 177 k libmcrypt i686 2.5.8-9.el6 epel 94 k libmemcached-last-libs i686 1.0.18-2.el6.remi remi 122 k libpng i686 2:1.2.49-1.el6_2 base 184 k libtool-ltdl i686 2.2.6-15.5.el6 base 45 k libxcb i686 1.8.1-1.el6 base 114 k libxslt i686 1.1.26-2.el6_3.1 base 451 k php-pecl-igbinary i686 1.1.2-0.1.git3b8ab7e.el6.remi remi 38 k php-pecl-msgpack i686 0.5.5-4.el6.remi remi 53 k php-process i686 5.4.28-1.el6.remi remi 59 k postgresql-libs i686 8.4.20-1.el6_5 updates 205 k sqlite2 i686 2.8.17-10.el6 epel 161 k t1lib i686 5.1.2-6.el6_2.1 base 152 k Transaction Summary ================================================================================ Install 32 Package(s) Total download size: 5.8 M Installed size: 19 M Downloading Packages: (1/32): freetype-2.3.11-14.el6_3.1.i686.rpm | 363 kB 00:00 (2/32): libX11-1.5.0-4.el6.i686.rpm | 590 kB 00:00 (3/32): libX11-common-1.5.0-4.el6.noarch.rpm | 192 kB 00:00 (4/32): libXau-1.0.6-4.el6.i686.rpm | 24 kB 00:00 (5/32): libXpm-3.5.10-2.el6.i686.rpm | 50 kB 00:00 (6/32): libevent-last-2.0.18-1.el6.remi.i686.rpm | 161 kB 00:00 (7/32): libjpeg-turbo-1.2.1-3.el6_5.i686.rpm | 177 kB 00:00 (8/32): libmcrypt-2.5.8-9.el6.i686.rpm | 94 kB 00:00 (9/32): libmemcached-last-libs-1.0.18-2.el6.remi.i686.rp | 122 kB 00:00 (10/32): libpng-1.2.49-1.el6_2.i686.rpm | 184 kB 00:01 (11/32): libtool-ltdl-2.2.6-15.5.el6.i686.rpm | 45 kB 00:00 (12/32): libxcb-1.8.1-1.el6.i686.rpm | 114 kB 00:00 (13/32): libxslt-1.1.26-2.el6_3.1.i686.rpm | 451 kB 00:01 (14/32): php-gd-5.4.28-1.el6.remi.i686.rpm | 141 kB 00:00 (15/32): php-mbstring-5.4.28-1.el6.remi.i686.rpm | 940 kB 00:00 (16/32): php-mcrypt-5.4.28-1.el6.remi.i686.rpm | 49 kB 00:00 (17/32): php-mysql-5.4.28-1.el6.remi.i686.rpm | 130 kB 00:00 (18/32): php-pdo-5.4.28-1.el6.remi.i686.rpm | 116 kB 00:00 (19/32): php-pear-1.9.4-27.el6.remi.noarch.rpm | 372 kB 00:00 (20/32): php-pecl-apc-3.1.15-0.4.20130912.el6.remi.5.4.i | 141 kB 00:00 (21/32): php-pecl-igbinary-1.1.2-0.1.git3b8ab7e.el6.remi | 38 kB 00:00 (22/32): php-pecl-memcache-3.0.8-2.el6.remi.5.4.i686.rpm | 100 kB 00:00 (23/32): php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686.rp | 100 kB 00:00 (24/32): php-pecl-mongo-1.5.1-1.el6.remi.5.4.i686.rpm | 231 kB 00:00 (25/32): php-pecl-msgpack-0.5.5-4.el6.remi.i686.rpm | 53 kB 00:00 (26/32): php-pecl-sqlite-2.0.0-0.4.svn332053.el6.remi.5. | 64 kB 00:00 (27/32): php-pgsql-5.4.28-1.el6.remi.i686.rpm | 109 kB 00:00 (28/32): php-process-5.4.28-1.el6.remi.i686.rpm | 59 kB 00:00 (29/32): php-xml-5.4.28-1.el6.remi.i686.rpm | 165 kB 00:00 (30/32): postgresql-libs-8.4.20-1.el6_5.i686.rpm | 205 kB 00:00 (31/32): sqlite2-2.8.17-10.el6.i686.rpm | 161 kB 00:00 (32/32): t1lib-5.1.2-6.el6_2.1.i686.rpm | 152 kB 00:01 -------------------------------------------------------------------------------- Total 506 kB/s | 5.8 MB 00:11 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 Importing GPG key 0x0608B895: Userid : EPEL (6) <epel@fedoraproject.org> Package: epel-release-6-8.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php-pdo-5.4.28-1.el6.remi.i686 1/32 Installing : libX11-common-1.5.0-4.el6.noarch 2/32 Installing : php-process-5.4.28-1.el6.remi.i686 3/32 Installing : libevent-last-2.0.18-1.el6.remi.i686 4/32 Installing : libmemcached-last-libs-1.0.18-2.el6.remi.i686 5/32 Installing : libmcrypt-2.5.8-9.el6.i686 6/32 Installing : libxslt-1.1.26-2.el6_3.1.i686 7/32 Installing : php-xml-5.4.28-1.el6.remi.i686 8/32 Installing : 1:php-pear-1.9.4-27.el6.remi.noarch 9/32 Installing : php-pecl-igbinary-1.1.2-0.1.git3b8ab7e.el6.remi.i686 10/32 Installing : php-pecl-msgpack-0.5.5-4.el6.remi.i686 11/32 Installing : libjpeg-turbo-1.2.1-3.el6_5.i686 12/32 Installing : postgresql-libs-8.4.20-1.el6_5.i686 13/32 Installing : 2:libpng-1.2.49-1.el6_2.i686 14/32 Installing : freetype-2.3.11-14.el6_3.1.i686 15/32 Installing : sqlite2-2.8.17-10.el6.i686 16/32 Installing : libXau-1.0.6-4.el6.i686 17/32 Installing : libxcb-1.8.1-1.el6.i686 18/32 Installing : libX11-1.5.0-4.el6.i686 19/32 Installing : t1lib-5.1.2-6.el6_2.1.i686 20/32 Installing : libXpm-3.5.10-2.el6.i686 21/32 Installing : libtool-ltdl-2.2.6-15.5.el6.i686 22/32 Installing : php-mcrypt-5.4.28-1.el6.remi.i686 23/32 Installing : php-gd-5.4.28-1.el6.remi.i686 24/32 Installing : php-pecl-sqlite-2.0.0-0.4.svn332053.el6.remi.5.4.i686 25/32 Installing : php-pgsql-5.4.28-1.el6.remi.i686 26/32 Installing : php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 27/32 Installing : php-pecl-apc-3.1.15-0.4.20130912.el6.remi.5.4.i686 28/32 Installing : php-pecl-mongo-1.5.1-1.el6.remi.5.4.i686 29/32 Installing : php-pecl-memcache-3.0.8-2.el6.remi.5.4.i686 30/32 Installing : php-mysql-5.4.28-1.el6.remi.i686 31/32 Installing : php-mbstring-5.4.28-1.el6.remi.i686 32/32 Verifying : libxcb-1.8.1-1.el6.i686 1/32 Verifying : php-process-5.4.28-1.el6.remi.i686 2/32 Verifying : 1:php-pear-1.9.4-27.el6.remi.noarch 3/32 Verifying : php-pecl-apc-3.1.15-0.4.20130912.el6.remi.5.4.i686 4/32 Verifying : php-pgsql-5.4.28-1.el6.remi.i686 5/32 Verifying : libtool-ltdl-2.2.6-15.5.el6.i686 6/32 Verifying : php-mysql-5.4.28-1.el6.remi.i686 7/32 Verifying : php-pecl-memcached-2.2.0-2.el6.remi.5.4.i686 8/32 Verifying : php-pecl-mongo-1.5.1-1.el6.remi.5.4.i686 9/32 Verifying : php-mbstring-5.4.28-1.el6.remi.i686 10/32 Verifying : php-pecl-sqlite-2.0.0-0.4.svn332053.el6.remi.5.4.i686 11/32 Verifying : libXau-1.0.6-4.el6.i686 12/32 Verifying : php-gd-5.4.28-1.el6.remi.i686 13/32 Verifying : libevent-last-2.0.18-1.el6.remi.i686 14/32 Verifying : php-xml-5.4.28-1.el6.remi.i686 15/32 Verifying : sqlite2-2.8.17-10.el6.i686 16/32 Verifying : libmemcached-last-libs-1.0.18-2.el6.remi.i686 17/32 Verifying : php-pecl-igbinary-1.1.2-0.1.git3b8ab7e.el6.remi.i686 18/32 Verifying : freetype-2.3.11-14.el6_3.1.i686 19/32 Verifying : libX11-common-1.5.0-4.el6.noarch 20/32 Verifying : php-pecl-msgpack-0.5.5-4.el6.remi.i686 21/32 Verifying : 2:libpng-1.2.49-1.el6_2.i686 22/32 Verifying : php-mcrypt-5.4.28-1.el6.remi.i686 23/32 Verifying : postgresql-libs-8.4.20-1.el6_5.i686 24/32 Verifying : libjpeg-turbo-1.2.1-3.el6_5.i686 25/32 Verifying : libX11-1.5.0-4.el6.i686 26/32 Verifying : php-pecl-memcache-3.0.8-2.el6.remi.5.4.i686 27/32 Verifying : t1lib-5.1.2-6.el6_2.1.i686 28/32 Verifying : libxslt-1.1.26-2.el6_3.1.i686 29/32 Verifying : libXpm-3.5.10-2.el6.i686 30/32 Verifying : php-pdo-5.4.28-1.el6.remi.i686 31/32 Verifying : libmcrypt-2.5.8-9.el6.i686 32/32 Installed: php-gd.i686 0:5.4.28-1.el6.remi php-mbstring.i686 0:5.4.28-1.el6.remi php-mcrypt.i686 0:5.4.28-1.el6.remi php-mysql.i686 0:5.4.28-1.el6.remi php-pdo.i686 0:5.4.28-1.el6.remi php-pear.noarch 1:1.9.4-27.el6.remi php-pecl-apc.i686 0:3.1.15-0.4.20130912.el6.remi.5.4 php-pecl-memcache.i686 0:3.0.8-2.el6.remi.5.4 php-pecl-memcached.i686 0:2.2.0-2.el6.remi.5.4 php-pecl-mongo.i686 0:1.5.1-1.el6.remi.5.4 php-pecl-sqlite.i686 0:2.0.0-0.4.svn332053.el6.remi.5.4 php-pgsql.i686 0:5.4.28-1.el6.remi php-xml.i686 0:5.4.28-1.el6.remi Dependency Installed: freetype.i686 0:2.3.11-14.el6_3.1 libX11.i686 0:1.5.0-4.el6 libX11-common.noarch 0:1.5.0-4.el6 libXau.i686 0:1.0.6-4.el6 libXpm.i686 0:3.5.10-2.el6 libevent-last.i686 0:2.0.18-1.el6.remi libjpeg-turbo.i686 0:1.2.1-3.el6_5 libmcrypt.i686 0:2.5.8-9.el6 libmemcached-last-libs.i686 0:1.0.18-2.el6.remi libpng.i686 2:1.2.49-1.el6_2 libtool-ltdl.i686 0:2.2.6-15.5.el6 libxcb.i686 0:1.8.1-1.el6 libxslt.i686 0:1.1.26-2.el6_3.1 php-pecl-igbinary.i686 0:1.1.2-0.1.git3b8ab7e.el6.remi php-pecl-msgpack.i686 0:0.5.5-4.el6.remi php-process.i686 0:5.4.28-1.el6.remi postgresql-libs.i686 0:8.4.20-1.el6_5 sqlite2.i686 0:2.8.17-10.el6 t1lib.i686 0:5.1.2-6.el6_2.1 Complete! [root@aqua ~]#

Step 4 : Enable Apache and MySQL on Startup

Aktifkan startup untuk aache dan mysql, gunakan perintah berikut:
# chkconfig --levels 235 httpd on
# chkconfig --levels 235 mysqld on

Step 5: Starting Apache & MySQL

Lalu kita jalankan service apache dan mysqlnya dengan perintah :
# /etc/init.d/httpd start
# /etc/init.d/mysqld start

Step 6: Konfigurasi Apache ( Httpd )

Kita akan melakukan sedikit perubahan pada konfigurasi default apache server, gunakan perintah berikut:
# nano /etc/httpd/conf/httpd.conf
Rubah pada baris berikut:
ServerTokens Prod
KeepAlive On
ServerAdmin root@aquacybernotes.com
AllowOverride All
ServerName www.aquacybernotes.com:80
DirectoryIndex index.html index.htm index.php
ServerSignature Off
AddDefaultCharset UTF-8
Setelah itu simpan perubahan, dan restart apache servernya
# service httpd restart

Step 7 : Verifying Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4

Buat file phpinfo.php di dir /var/www/html/ lalu masukkan kode dibawah, ex: /var/www/html/info.php
<?php
phpinfo ();
?>
Nah, sekarang coba akses page melalui browser! untuk testing apache, tinggal buka  localhost/IP server di browser:

Lalu untuk melihat apakah php dan modul2 PHP sudah terinstall dengan baik, buka aja file info.php yg udah dibuat tadi :


Sekian catatan saya tentang Install LAMP (Linux, Apache, MySQL, PHP) on CentOS ini, jika ada yang ga ngerti silahkan ditanyain dikomentar. lebih dan kurang mohon maaf, wassalam.. :)




Share this games :

0 komentar:

Posting Komentar