SlideShare a Scribd company logo
SAMP
[Solaris 10, Apache 2, MySQL 5, PHP 5]




Nyoman Bogi Aditya Karna
Sisfo – IM Telkom
bogi@imtelkom.ac.id
http://bogi.blog.imtelkom.ac.id




                     Institut Manajemen Telkom
                         http://www.imtelkom.ac.id
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)


Abstrak
Saat ini banyak pengguna IT yang masih dibingungkan saat diharuskan memilih antara sistem
operasi yang paling tepat yang akan digunakan untuk suatu server. Hal ini mengingat pada
banyaknya pilihan yang tersedia, dimulai dari Linux yang terkenal atas open source dan dukungan
aplikasinya, Solaris yang terkenal atas platform hardware Sun, FreeBSD yang terkenal di kalangan
open source underground atas kestabilannya, dan Windows yang terkenal atas dukungan aplikasi
dan user friendly-nya. Sebagian besar pengguna IT memang sudah jauh lebih mengenal Linux dan
terbiasa dengannya, yang menyebabkan mereka tidak pernah sempat untuk mencoba-coba
performansi sistem jika menggunakan platform yang lain. Hal ini disebabkan karena disamping
Linux adalah platform open source yang paling banyak memiliki distribusi yang tersedia, ditambah
dengan dukungan aplikasi terkenal lainnya seperti Apache, PHP, Oracle, SAP, dan lainnya.



Latar Belakang
Meskipun Solaris bukan turunan langsung dari UNIX, namun topologi dan konfigurasi-nya sangat
mirip dengan keluarga UNIX. Solaris pada awalnya adalah platform yang didesain hanya untuk
komputer Sun yang berbasis prosesor Sparc, namun sekarang telah tersedia platform Solaris
untuk prosesor dengan arsitektur x86 dimana didalamnya mencakup Intel dan AMD. Popularitas
Solaris x86 semakin menanjak sejak di-release secara free sepanjang untuk keperluan
pembelajaran, development, dan trial.
Saat ini release terakhir dari Solaris 10 adalah Solaris 5/09 yang merupakan release pada bulan
Mei di tahun 2009. Solaris 5/09 dikemas dalam 5 CD utama ditambah dengan 1 CD tambahan
(companion). Ada beberapa aplikasi yang dibundling kedalam 5 CD tersebut, mencakup aplikasi
yang sangat dibutuhkan dalam membantu pekerjaan keseharian kita yaitu Star Office.



Tujuan
Buku manual ini ditujukan untuk memudahkan praktisi, teknisi, maupun user dalam melakukan
instalasi AMP (Apache – MySQL – PHP) diatas Solaris 10 sebagai layanan (Service) yang paling
sering dibutuhkan untuk melayani kebutuhan SME (Small Medium Enterprise). Sistem Operasi yg
di-standarkan dalam buku manual ini adalah Solaris 10, Apache 2, MySQL 5, dan PHP 5.




Seputar Solaris
Solaris merupakan solusi yang ideal untuk server, namun masih banyak keraguan dari sisi pemakai
terutama untuk platform x86 karena beberapa pemakai melaporkan pernah mengalami gangguan
(hang) saat menggunakan platform ini.
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)


Berikut tampilan dari Solaris yang menggunakan GUI GNOME




Instalasi Tool Pendukung
Instalasi tool pendukung untuk menunjang instalasi AMP di Solaris 10 semua berasal dari
Blastwave™ (http://blastwave.network.com/csw) dimana pada situs ini tersedia repository
aplikasi yang siap untuk diinstall karena telah berada dalam format package (.pkg.gz).
Instalasi tool pendukung ini akan dijelaskan per tahap :

Step 1 : Install pkgutil

INTEL users : http://blastwave.network.com/csw/pkgutil_i386.pkg
   md5 = a9dcb973ca18d63439d6d4dd12c9bf0a
   sha1 = ba8ade3f4659708de716b6b6dbf5949fe4482b55
   sha256 = c8734812a53c2b83dd6084a93a4c3fbe9a209f4ddcc8a280fcedcfb2a03f6266

# uname -a
SunOS infusion 5.10 Generic_139556-08 i86pc i386 i86pc
# cat /etc/release
                    Solaris 10 5/09 s10x_u7wos_08 X86
       Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
                      Use is subject to license terms.
                        Assembled 30 March 2009

# pkgadd -d http://blastwave.network.com/csw/pkgutil_`/sbin/uname -p`.pkg

## Downloading...
..............25%..............50%..............75%..............100%
## Download Complete
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)




The following packages are available:
 1 CSWpkgutil pkgutil - installs Solaris packages easily
           (i386) 1.4,REV=2009.01.20

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing            package            instance                       <CSWpkgutil>         from
<http://blastwave.network.com/csw/pkgutil_i386.pkg>

pkgutil - installs Solaris packages easily(i386) 1.4,REV=2009.01.20

Please see /opt/csw/share/doc/pkgutil/LICENSE for license information.

## Processing package information.
## Processing system information.
 11 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <CSWpkgutil> [y,n,?] y

Installing pkgutil - installs Solaris packages easily as <CSWpkgutil>

## Installing part 1 of 1.
/opt/csw/bin/bldcat
/opt/csw/bin/chkcat
/opt/csw/bin/pkgutil
/opt/csw/etc/pkgutil.conf.CSW
/opt/csw/libexec/pkgutil/wget
/opt/csw/share/doc/pkgutil/LICENSE
/opt/csw/share/doc/pkgutil/readme
/opt/csw/share/man/man1/pkgutil.1
/var/opt/csw/pkgutil/admin.CSW
[ verifying class <none> ]
## Executing postinstall script.

Installation of <CSWpkgutil> was successful.

# mkdir /etc/opt/csw
# cp -p /opt/csw/etc/pkgutil.conf.CSW /etc/opt/csw/pkgutil.conf

Step 2 : Fetch Software catalog

Jika kita perhatikan dari hasil instalasi di Step 1, terlihat bahwa package pkgutil telah mencakup
aplikasi ‘wget’ yang dapat digunakan untuk mengambil suatu file baik melalui protokol FTP
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)


maupun HTTP. Koneksi yang digunakan oleh ‘wget’ bisa melalui direct connection atau melalui
suatu proxy dengan setting sebagai berikut :

# cat /export/home/manager/.wgetrc
progress=dot:mega
ftp_proxy=http://192.168.35.7:8080
http_proxy=http://192.168.35.7:8080

Sesuaikan IP address dan nomor port dengan setting yang berlaku di lingkungan kita.

# /opt/csw/bin/pkgutil --catalog
Fetching new catalog if available...
--01:41:49-- http://blastwave.network.com/csw/unstable/i386/5.8/catalog
      => `/var/opt/csw/pkgutil/catalog.i386.5.8.0'
Connecting to 192.168.35.7:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 375,014 [text/plain]

  0K .....                        100% 342.27 KB/s

01:41:52 (342.27 KB/s) - `/var/opt/csw/pkgutil/catalog.i386.5.8.0' saved [375014/375014]

Step 3 : Security

Semua software dari Blastwave telah memiliki digital signature, untuk itu kita perlu
menambahkan kemampuan Solaris untuk dapat melakukan pengecekan signature ini dengan cara
instalasi GNU GPG dan MD5 hash :

# /opt/csw/bin/pkgutil --install gnupg textutils
Parsing catalog, may take a while...
New packages: CSWcommon CSWisaexec CSWexpat CSWiconv CSWncurses CSWggettext
CSWbzip2 CSWzlib CSWreadline CSWtextutils CSWgnupg
Total size: 9.2 MB
11 packages to fetch. Do you want to continue? [Y,n]

Setelah CSWgnupg terinstall, selanjutnya adalah mengambil digital key milik Blastwave.org dan
memasangnya di lokal. Untuk ini, kita bisa menggunakan GPG untuk mengambil digital key
tersebut di MIT keyserver, dengan cara :

# /opt/csw/bin/gpg --keyserver pgp.mit.edu --recv-keys A1999E90
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key A1999E90 from hkp server pgp.mit.edu
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg:    key     A1999E90:      public   key    “Blastwave   Software      (Blastwave.org   Inc.)
<software@blastwave.org>” imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)



Selanjutnya kita akan menggunakan digital key tersebut dan memasangnya di lokal dengan 3
langkah berikut :

1 ) Verifikasi digital key
# /opt/csw/bin/gpg --list-keys
//.gnupg/pubring.gpg
--------------------
pub 1024D/A1999E90 2008-08-17 [expires: 2011-08-17]
uid               Blastwave Software (Blastwave.org Inc.) <software@blastwave.org>
sub 2048g/E4845389 2008-08-17 [expires: 2011-08-17]

2 ) Tandai bahwa digital key tersebut telah sesuai :
# /opt/csw/bin/gpg --edit-key A1999E90
gpg (GnuPG) 1.4.9; Copyright (C) 2008 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


pub 1024D/A1999E90 created: 2008-08-17 expires: 2011-08-17 usage: SC
          trust: unknown      validity: unknown
sub 2048g/E4845389 created: 2008-08-17 expires: 2011-08-17 usage: E
[ unknown] (1). Blastwave Software (Blastwave.org Inc.) <software@blastwave.org>

Command> Trust
pub 1024D/A1999E90 created: 2008-08-17 expires: 2011-08-17 usage: SC
          trust: unknown      validity: unknown
sub 2048g/E4845389 created: 2008-08-17 expires: 2011-08-17 usage: E
[ unknown] (1). Blastwave Software (Blastwave.org Inc.) <software@blastwave.org>

Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

 1 = I don't know or won't say
 2 = I do NOT trust
 3 = I trust marginally
 4 = I trust fully
 5 = I trust ultimately
 m = back to the main menu

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y

pub 1024D/A1999E90 created: 2008-08-17 expires: 2011-08-17 usage: SC
            trust: ultimate validity: unknown
sub 2048g/E4845389 created: 2008-08-17 expires: 2011-08-17 usage: E
[ unknown] (1). Blastwave Software (Blastwave.org Inc.) <software@blastwave.org>
Please note that the shown key validity is not necessarily correct
unless you restart the program.

Command> quit
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)



3) edit pkgutil.conf agar pkgutil menggunakan digital key tersebut :
# Configuration file for pkgutil
#
# Nothing below is mandatory to change, pkgutil will use the default values
# noted below for each option unless something is uncommented

# Mirror to use for downloads
# See http://www.blastwave.org/mirrors.php for alternative mirrors
# Default: http://blastwave.network.com/csw/unstable
#mirror=http://blastwave.network.com/csw/unstable

# Solaris 10: If you wish to limit pkgutil to installing packages
# only to the global zone, then uncomment this line. Note that pkgrm does not
# have the same option
# WARNING: do not modify this unless you know what you're doing
# Default: blank
#pkgaddopts=-G

# Flags for use with wget, e.g. "-nv" for less verbose or "-q" for quiet
# WARNING: do not modify this unless you know what you're doing
# Default: blank
#wgetopts=-q

# To enable use of gpg or md5, uncomment these
# NOTE: it doesn't make sense to use md5 but not gpg so your options should be:
#    1. both disabled, 2. gpg enabled, 3. both enabled.
# Default: false, false
use_gpg=true
use_md5=true



Instalasi MySQL 5
Instalasi MySQL 5 sangat mudah, cukup dengan melakukan 2 command berikut :
# /opt/csw/bin/pkg-get -i mysql5 mysql5client mysql5devel mysql5rt
# /opt/csw/bin/pkg-get -i mysql5test

Seanjutnya buat file configuration di /opt/csw/mysql5/my.cnf, dengan mengacu pada salah satu
file my-*.cnf di /opt/csw/mysql5/share/mysql/ dan melakukan seting sesuai kebutuhan, seperti
mengaktifkan InnoDB jika diperlukan.

Lakukan seting group untuk MySQL :
# groupadd mysql
# useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false mysql

Inisialisasi MySQL database :
cd /opt/csw/mysql5
./bin/mysql_install_db
chown -R mysql:mysql ./var
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)


Jalankan MySQL 5 :
# cd /opt/csw/mysql5 ; /opt/csw/mysql5/bin/mysqld_safe &




Instalasi PHP 5

Instalasi PHP 5 sangat mudah, namun memerlukan beberapa aplikasi tambahan sebagai
pendukung agar PHP bisa diinstalasi, yaitu autoconf, automake, dan gsed :

global# pkg-get -i autoconf
...
global# which autoconf && autoconf --version | head -2
/opt/csw/bin/autoconf
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.

global# pkg-get -i automake
...
global# which automake && automake --version | head -2
/opt/csw/bin/automake
automake (GNU automake) 1.8.3
Written by Tom Tromey <tromey@redhat.com>.

global# pkg-get -i gsed
...
global# which gsed && gsed --version | head -2
/opt/csw/bin/gsed
GNU sed version 4.1.4
Copyright (C) 2003 Free Software Foundation, Inc.

Selain itu dibutuhkan pula beberapa aplikasi pendukung lainnya :
global# which gcc && gcc --version | head -2
/usr/sfw/bin/gcc
gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.

global# which gmake && gmake --version | head -2
/usr/sfw/bin/gmake
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.

global# which flex && flex --version | head -2
/usr/sfw/bin/flex
flex version 2.5.4

global# which bison && bison --version | head -2
/usr/sfw/bin/bison
bison (GNU Bison) 1.875
Written by Robert Corbett and Richard Stallman.
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)



global# which gm4 && gm4 --version | head -2
/opt/csw/bin/gm4
GNU M4 1.4.3
Written by Rene' Seindal.

global# which perl && perl -v | head -2
/opt/csw/bin/perl

This is perl, v5.8.7, built for sun4-solaris-thread-multi

global# which gunzip && gunzip -V | head -2
/usr/bin/gunzip
gunzip 1.3.3-patch.1
(2002-03-08)

global# which gtar && gtar --version | head -2
/usr/sfw/bin/gtar
tar (GNU tar) 1.14
Copyright (C) 2004 Free Software Foundation, Inc.
Langkah selanjutnya adalah menginstalasi PHP 5. Download source dari PHP 5 dari
http://www.php.net/downloads.php#v5 dan ambil file dengan extensi tar.gz :
global# gunzip -cd php-5.1.6.tar.gz | gtar xvpf –
global# cd php-5.1.6
global# ./configure --with-apxs2=/usr/apache2/bin/apxs --enable-dbase 
 --with-libxml-dir=/usr/local --with-config-file-path=/etc/apache2 
 --with-mysql=shared,/opt/csw/mysql5 
 --with-mysqli=shared,/opt/csw/mysql5/bin/mysql_config 
 --with-xpm-dir=/usr --with-gd --with-tiff-dir=/usr --with-bz2=/usr/lib 
 --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib --enable-mbstring 
 --enable-calendar--enable-bcmath --enable-ftp --enable-exif
global# gmake
 ...
 global# gmake install
 ...
 Installing PHP SAPI module: apache2handler
 /var/apache2/build/instdso.sh SH_LIBTOOL='/var/apache2/build/libtool' libphp5.la
/usr/apache2/libexec
 /var/apache2/build/libtool --mode=install cp libphp5.la /usr/apache2/libexec/
 cp .libs/libphp5.so /usr/apache2/libexec/libphp5.so
 chmod +x /usr/apache2/libexec/libphp5.so
 cp .libs/libphp5.lai /usr/apache2/libexec/libphp5.la
 libtool: install: warning: remember to run 'libtool --finish /build/php-5.1.2/libs'
 chmod 755 /usr/apache2/libexec/libphp5.so
 [activating module 'php5' in /etc/apache2/httpd.conf]
 Installing PHP CLI binary: /usr/local/bin/
 Installing PHP CLI man page:/usr/local/man/man1/
 Installing build environment: /usr/local/lib/php/build/
 Installing header files: /usr/local/include/php/
 Installing helper programs: /usr/local/bin/
  program: phpize
  program: php-config
SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)


Installing man pages: /usr/local/man/man1/
 page: phpize.1
 page: php-config.1
Installing PEAR environment:/usr/local/lib/php/
[PEAR] Archive_Tar - installed: 1.3.1
[PEAR] Console_Getopt - installed: 1.2
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR - installed: 1.4.6
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/include/php/ext/pdo/

Selanjutnya copy file php.ini-dist dari directory php-5.1.6 ke directory Apache :
global# cp php.ini-dist /etc/apache2/php.ini

Dan edit file konfigurasi tersebut :
 ;;;;;;;;;;;;;;;;;;;;;;
 ; Dynamic Extensions ;
 ;;;;;;;;;;;;;;;;;;;;;;
 extension=mysql.so

 ; Directory in which the loadable extensions (modules) reside.
 extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20050922/"

Pastikan bahwa modul mysql telah ada :
 # ls -l /usr/local/lib/php/extensions/no-debug-non-zts-20050922/
 total 1088
 -rwxr-xr-x1 root root103144 Aug 29 21:48 mysql.so
 -rwxr-xr-x1 root root429948 Aug 29 21:48 mysqli.so

Dan tambahkan deklarasi modul PHP di file konfigurasi Apache 2 :
 LoadModule php5_module libexec/libphp5.so
 AddType application/x-httpd-php .php

Start Apache 2:
 # svcadm enable apache2
 # svcs | grep -i apache2
 online 18:07:10 svc:/network/http:apache2

More Related Content

PDF
AT Rapier Usecase Document
PDF
Building a Secure Web Application
PDF
PDF
Desain dan Implementasi Sistem Lab From Home (LFH)
PDF
Pengolahan Database Dengan MySQL
PDF
Mengubah Hostname dari Standalone PVE 5.3 Node
PDF
Building Internet Server using CentOS 7 and CentOS Web Panel (CWP)
PDF
Podman - The Next Generation of Linux Container Tools
AT Rapier Usecase Document
Building a Secure Web Application
Desain dan Implementasi Sistem Lab From Home (LFH)
Pengolahan Database Dengan MySQL
Mengubah Hostname dari Standalone PVE 5.3 Node
Building Internet Server using CentOS 7 and CentOS Web Panel (CWP)
Podman - The Next Generation of Linux Container Tools

What's hot (20)

DOCX
Konfigurasi router debian 7
PDF
Import DEVNET Associate OVA sebagai VM pada Proxmox VE 6.3
DOCX
Dokumentasi Pembangun Server Cloud di Domain TKJ SMKN 1 Cimahi
PDF
Soal Modul B System Integration - IT Networking Support LKS NTB 2017
PPTX
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
PDF
Import Cisco CSR1000v OVA sebagai VM pada Proxmox VE 6.3
PDF
Aplikasi monitor jaringan dan keamanan linux ~ m rendi
PDF
Squid indonesia
PDF
Qmail P to V Migration
PDF
Tutorial Debian Bab 14 sekuriti dasar debian gnu linux
PDF
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
PDF
Instalasi dan konfigurasi Darwin Streaming Server di Debian 6 via VirtualBox
PDF
Instalasi dan Konfigurasi Mikrotik CHR pada Proxmox VE 5.1
PPTX
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
PPT
websecure.ppt
DOCX
Tutorial Instalasi TKJ CLoud Server
PDF
Memblokir situs dengan squid proxy di linux debian server By: Fakhri akbar CC5
DOCX
Pembahasansoallks2013
PDF
FreeBSD Installation
PDF
MEMBANGUN SERVER VIDEO STREAMING BERBASIS CLOUD DENGAN ViMP
Konfigurasi router debian 7
Import DEVNET Associate OVA sebagai VM pada Proxmox VE 6.3
Dokumentasi Pembangun Server Cloud di Domain TKJ SMKN 1 Cimahi
Soal Modul B System Integration - IT Networking Support LKS NTB 2017
TugasII SO2 Install Apache, PHP Dan MySQL Pada CentOS 7 (LAMP)
Import Cisco CSR1000v OVA sebagai VM pada Proxmox VE 6.3
Aplikasi monitor jaringan dan keamanan linux ~ m rendi
Squid indonesia
Qmail P to V Migration
Tutorial Debian Bab 14 sekuriti dasar debian gnu linux
Instalasi Asterisk dan FreePBX di Ubuntu Server 10.04 LTS
Instalasi dan konfigurasi Darwin Streaming Server di Debian 6 via VirtualBox
Instalasi dan Konfigurasi Mikrotik CHR pada Proxmox VE 5.1
cara install nginx dengan php5 dan dukungan Mysql Di CentOS 6.5
websecure.ppt
Tutorial Instalasi TKJ CLoud Server
Memblokir situs dengan squid proxy di linux debian server By: Fakhri akbar CC5
Pembahasansoallks2013
FreeBSD Installation
MEMBANGUN SERVER VIDEO STREAMING BERBASIS CLOUD DENGAN ViMP
Ad

More from Telkom Institute of Management (20)

PDF
PDF
FreeBSD VPN Server
PDF
FreeBSD Traffic Monitoring
PDF
FreeBSD Proxy Server
PDF
FreeBSD Name Server
PDF
FreeBSD web-based MUA
PDF
FreeBSD POP3/IMAP Server
PDF
FreeBSD Securing Mail Server
PDF
FreeBSD Mailing List
PDF
FreeBSD Mail Server
PDF
FreeBSD Log Analyzer
PDF
FreeBSD Database Server
PDF
FreeBSD Web Server
PDF
FreeBSD FTP Server
PDF
FreeBSD Bandwidth Management
PDF
PDF
FreeBSD Basic Setting
PDF
FreeBSD Installation
PDF
FreeBSD Installation
FreeBSD VPN Server
FreeBSD Traffic Monitoring
FreeBSD Proxy Server
FreeBSD Name Server
FreeBSD web-based MUA
FreeBSD POP3/IMAP Server
FreeBSD Securing Mail Server
FreeBSD Mailing List
FreeBSD Mail Server
FreeBSD Log Analyzer
FreeBSD Database Server
FreeBSD Web Server
FreeBSD FTP Server
FreeBSD Bandwidth Management
FreeBSD Basic Setting
FreeBSD Installation
FreeBSD Installation
Ad

Recently uploaded (20)

PDF
PPT IPS Geografi SMA Kelas X_Bab 1 Pengantar Geografi_May.pdf
PPTX
Model Lintas minat dan pendalaman materi
PDF
Lembar Kerja Mahasiswa Konsep Sistem Operasi
PPTX
materi pencegahan perkawinan usia anak.pptx
PDF
ANALISIS SOALAN BAHASA MELAYU SPM 2021-2024 (1).pdf
PPTX
XI BAB 7 SISTEM PERNAPASAN pada kelas xi
DOCX
CONTOH RANCANGAN MODUL PROYEK KOKURIKULER SMA 1.docx
PPTX
Mind_Map_Modul_5_Pedagogik_Koding_AI.pptx
PPTX
PPT MATERI KODING DAN KECERDASAN ARTIFISIAL UNTUK PEMBELAJARAN
DOCX
Modul Ajar Deep Learning PKN Kelas 10 SMA Terbaru 2025
DOCX
Lembar Kerja Mahasiswa Information System
PPTX
5. Bahan Bacaan Asinkronus Modul 5_ Perencanaan Pembelajaran.pptx
PPTX
Keragaman kerajinan tangan mancanegara.pptx
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 12 SMA Terbaru 2025
PDF
Pengenalan Undang-undang pengakap laut.pdf
PPTX
PPT Kurikulum Berbasis Cinta tahun 2025.
PPTX
MATERI MPLS TENTANG KURIKULUM DAN KEGIATAN PEMBELAJARAN
PDF
BAHASA INDONESIA KELAS 6 SD TEKS INFORMATIF
PPTX
Modul 2. Berpikir Komputasional sebagai Dasar Koding untuk Kecerdasan Artifis...
PPTX
Paparan Penyesuaian Juknis BOSP Tahun 2025
PPT IPS Geografi SMA Kelas X_Bab 1 Pengantar Geografi_May.pdf
Model Lintas minat dan pendalaman materi
Lembar Kerja Mahasiswa Konsep Sistem Operasi
materi pencegahan perkawinan usia anak.pptx
ANALISIS SOALAN BAHASA MELAYU SPM 2021-2024 (1).pdf
XI BAB 7 SISTEM PERNAPASAN pada kelas xi
CONTOH RANCANGAN MODUL PROYEK KOKURIKULER SMA 1.docx
Mind_Map_Modul_5_Pedagogik_Koding_AI.pptx
PPT MATERI KODING DAN KECERDASAN ARTIFISIAL UNTUK PEMBELAJARAN
Modul Ajar Deep Learning PKN Kelas 10 SMA Terbaru 2025
Lembar Kerja Mahasiswa Information System
5. Bahan Bacaan Asinkronus Modul 5_ Perencanaan Pembelajaran.pptx
Keragaman kerajinan tangan mancanegara.pptx
Modul Ajar Deep Learning Bahasa Inggris Kelas 12 SMA Terbaru 2025
Pengenalan Undang-undang pengakap laut.pdf
PPT Kurikulum Berbasis Cinta tahun 2025.
MATERI MPLS TENTANG KURIKULUM DAN KEGIATAN PEMBELAJARAN
BAHASA INDONESIA KELAS 6 SD TEKS INFORMATIF
Modul 2. Berpikir Komputasional sebagai Dasar Koding untuk Kecerdasan Artifis...
Paparan Penyesuaian Juknis BOSP Tahun 2025

SAMP (Solaris, Apache, MySQL, PHP)

  • 1. SAMP [Solaris 10, Apache 2, MySQL 5, PHP 5] Nyoman Bogi Aditya Karna Sisfo – IM Telkom bogi@imtelkom.ac.id http://bogi.blog.imtelkom.ac.id Institut Manajemen Telkom http://www.imtelkom.ac.id
  • 2. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) Abstrak Saat ini banyak pengguna IT yang masih dibingungkan saat diharuskan memilih antara sistem operasi yang paling tepat yang akan digunakan untuk suatu server. Hal ini mengingat pada banyaknya pilihan yang tersedia, dimulai dari Linux yang terkenal atas open source dan dukungan aplikasinya, Solaris yang terkenal atas platform hardware Sun, FreeBSD yang terkenal di kalangan open source underground atas kestabilannya, dan Windows yang terkenal atas dukungan aplikasi dan user friendly-nya. Sebagian besar pengguna IT memang sudah jauh lebih mengenal Linux dan terbiasa dengannya, yang menyebabkan mereka tidak pernah sempat untuk mencoba-coba performansi sistem jika menggunakan platform yang lain. Hal ini disebabkan karena disamping Linux adalah platform open source yang paling banyak memiliki distribusi yang tersedia, ditambah dengan dukungan aplikasi terkenal lainnya seperti Apache, PHP, Oracle, SAP, dan lainnya. Latar Belakang Meskipun Solaris bukan turunan langsung dari UNIX, namun topologi dan konfigurasi-nya sangat mirip dengan keluarga UNIX. Solaris pada awalnya adalah platform yang didesain hanya untuk komputer Sun yang berbasis prosesor Sparc, namun sekarang telah tersedia platform Solaris untuk prosesor dengan arsitektur x86 dimana didalamnya mencakup Intel dan AMD. Popularitas Solaris x86 semakin menanjak sejak di-release secara free sepanjang untuk keperluan pembelajaran, development, dan trial. Saat ini release terakhir dari Solaris 10 adalah Solaris 5/09 yang merupakan release pada bulan Mei di tahun 2009. Solaris 5/09 dikemas dalam 5 CD utama ditambah dengan 1 CD tambahan (companion). Ada beberapa aplikasi yang dibundling kedalam 5 CD tersebut, mencakup aplikasi yang sangat dibutuhkan dalam membantu pekerjaan keseharian kita yaitu Star Office. Tujuan Buku manual ini ditujukan untuk memudahkan praktisi, teknisi, maupun user dalam melakukan instalasi AMP (Apache – MySQL – PHP) diatas Solaris 10 sebagai layanan (Service) yang paling sering dibutuhkan untuk melayani kebutuhan SME (Small Medium Enterprise). Sistem Operasi yg di-standarkan dalam buku manual ini adalah Solaris 10, Apache 2, MySQL 5, dan PHP 5. Seputar Solaris Solaris merupakan solusi yang ideal untuk server, namun masih banyak keraguan dari sisi pemakai terutama untuk platform x86 karena beberapa pemakai melaporkan pernah mengalami gangguan (hang) saat menggunakan platform ini.
  • 3. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) Berikut tampilan dari Solaris yang menggunakan GUI GNOME Instalasi Tool Pendukung Instalasi tool pendukung untuk menunjang instalasi AMP di Solaris 10 semua berasal dari Blastwave™ (http://blastwave.network.com/csw) dimana pada situs ini tersedia repository aplikasi yang siap untuk diinstall karena telah berada dalam format package (.pkg.gz). Instalasi tool pendukung ini akan dijelaskan per tahap : Step 1 : Install pkgutil INTEL users : http://blastwave.network.com/csw/pkgutil_i386.pkg md5 = a9dcb973ca18d63439d6d4dd12c9bf0a sha1 = ba8ade3f4659708de716b6b6dbf5949fe4482b55 sha256 = c8734812a53c2b83dd6084a93a4c3fbe9a209f4ddcc8a280fcedcfb2a03f6266 # uname -a SunOS infusion 5.10 Generic_139556-08 i86pc i386 i86pc # cat /etc/release Solaris 10 5/09 s10x_u7wos_08 X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 30 March 2009 # pkgadd -d http://blastwave.network.com/csw/pkgutil_`/sbin/uname -p`.pkg ## Downloading... ..............25%..............50%..............75%..............100% ## Download Complete
  • 4. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) The following packages are available: 1 CSWpkgutil pkgutil - installs Solaris packages easily (i386) 1.4,REV=2009.01.20 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: Processing package instance <CSWpkgutil> from <http://blastwave.network.com/csw/pkgutil_i386.pkg> pkgutil - installs Solaris packages easily(i386) 1.4,REV=2009.01.20 Please see /opt/csw/share/doc/pkgutil/LICENSE for license information. ## Processing package information. ## Processing system information. 11 package pathnames are already properly installed. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of <CSWpkgutil> [y,n,?] y Installing pkgutil - installs Solaris packages easily as <CSWpkgutil> ## Installing part 1 of 1. /opt/csw/bin/bldcat /opt/csw/bin/chkcat /opt/csw/bin/pkgutil /opt/csw/etc/pkgutil.conf.CSW /opt/csw/libexec/pkgutil/wget /opt/csw/share/doc/pkgutil/LICENSE /opt/csw/share/doc/pkgutil/readme /opt/csw/share/man/man1/pkgutil.1 /var/opt/csw/pkgutil/admin.CSW [ verifying class <none> ] ## Executing postinstall script. Installation of <CSWpkgutil> was successful. # mkdir /etc/opt/csw # cp -p /opt/csw/etc/pkgutil.conf.CSW /etc/opt/csw/pkgutil.conf Step 2 : Fetch Software catalog Jika kita perhatikan dari hasil instalasi di Step 1, terlihat bahwa package pkgutil telah mencakup aplikasi ‘wget’ yang dapat digunakan untuk mengambil suatu file baik melalui protokol FTP
  • 5. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) maupun HTTP. Koneksi yang digunakan oleh ‘wget’ bisa melalui direct connection atau melalui suatu proxy dengan setting sebagai berikut : # cat /export/home/manager/.wgetrc progress=dot:mega ftp_proxy=http://192.168.35.7:8080 http_proxy=http://192.168.35.7:8080 Sesuaikan IP address dan nomor port dengan setting yang berlaku di lingkungan kita. # /opt/csw/bin/pkgutil --catalog Fetching new catalog if available... --01:41:49-- http://blastwave.network.com/csw/unstable/i386/5.8/catalog => `/var/opt/csw/pkgutil/catalog.i386.5.8.0' Connecting to 192.168.35.7:8080... connected. Proxy request sent, awaiting response... 200 OK Length: 375,014 [text/plain] 0K ..... 100% 342.27 KB/s 01:41:52 (342.27 KB/s) - `/var/opt/csw/pkgutil/catalog.i386.5.8.0' saved [375014/375014] Step 3 : Security Semua software dari Blastwave telah memiliki digital signature, untuk itu kita perlu menambahkan kemampuan Solaris untuk dapat melakukan pengecekan signature ini dengan cara instalasi GNU GPG dan MD5 hash : # /opt/csw/bin/pkgutil --install gnupg textutils Parsing catalog, may take a while... New packages: CSWcommon CSWisaexec CSWexpat CSWiconv CSWncurses CSWggettext CSWbzip2 CSWzlib CSWreadline CSWtextutils CSWgnupg Total size: 9.2 MB 11 packages to fetch. Do you want to continue? [Y,n] Setelah CSWgnupg terinstall, selanjutnya adalah mengambil digital key milik Blastwave.org dan memasangnya di lokal. Untuk ini, kita bisa menggunakan GPG untuk mengambil digital key tersebut di MIT keyserver, dengan cara : # /opt/csw/bin/gpg --keyserver pgp.mit.edu --recv-keys A1999E90 gpg: directory `/root/.gnupg' created gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run gpg: keyring `/root/.gnupg/secring.gpg' created gpg: keyring `/root/.gnupg/pubring.gpg' created gpg: requesting key A1999E90 from hkp server pgp.mit.edu gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key A1999E90: public key “Blastwave Software (Blastwave.org Inc.) <software@blastwave.org>” imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1
  • 6. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) Selanjutnya kita akan menggunakan digital key tersebut dan memasangnya di lokal dengan 3 langkah berikut : 1 ) Verifikasi digital key # /opt/csw/bin/gpg --list-keys //.gnupg/pubring.gpg -------------------- pub 1024D/A1999E90 2008-08-17 [expires: 2011-08-17] uid Blastwave Software (Blastwave.org Inc.) <software@blastwave.org> sub 2048g/E4845389 2008-08-17 [expires: 2011-08-17] 2 ) Tandai bahwa digital key tersebut telah sesuai : # /opt/csw/bin/gpg --edit-key A1999E90 gpg (GnuPG) 1.4.9; Copyright (C) 2008 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. pub 1024D/A1999E90 created: 2008-08-17 expires: 2011-08-17 usage: SC trust: unknown validity: unknown sub 2048g/E4845389 created: 2008-08-17 expires: 2011-08-17 usage: E [ unknown] (1). Blastwave Software (Blastwave.org Inc.) <software@blastwave.org> Command> Trust pub 1024D/A1999E90 created: 2008-08-17 expires: 2011-08-17 usage: SC trust: unknown validity: unknown sub 2048g/E4845389 created: 2008-08-17 expires: 2011-08-17 usage: E [ unknown] (1). Blastwave Software (Blastwave.org Inc.) <software@blastwave.org> Please decide how far you trust this user to correctly verify other users' keys (by looking at passports, checking fingerprints from different sources, etc.) 1 = I don't know or won't say 2 = I do NOT trust 3 = I trust marginally 4 = I trust fully 5 = I trust ultimately m = back to the main menu Your decision? 5 Do you really want to set this key to ultimate trust? (y/N) y pub 1024D/A1999E90 created: 2008-08-17 expires: 2011-08-17 usage: SC trust: ultimate validity: unknown sub 2048g/E4845389 created: 2008-08-17 expires: 2011-08-17 usage: E [ unknown] (1). Blastwave Software (Blastwave.org Inc.) <software@blastwave.org> Please note that the shown key validity is not necessarily correct unless you restart the program. Command> quit
  • 7. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) 3) edit pkgutil.conf agar pkgutil menggunakan digital key tersebut : # Configuration file for pkgutil # # Nothing below is mandatory to change, pkgutil will use the default values # noted below for each option unless something is uncommented # Mirror to use for downloads # See http://www.blastwave.org/mirrors.php for alternative mirrors # Default: http://blastwave.network.com/csw/unstable #mirror=http://blastwave.network.com/csw/unstable # Solaris 10: If you wish to limit pkgutil to installing packages # only to the global zone, then uncomment this line. Note that pkgrm does not # have the same option # WARNING: do not modify this unless you know what you're doing # Default: blank #pkgaddopts=-G # Flags for use with wget, e.g. "-nv" for less verbose or "-q" for quiet # WARNING: do not modify this unless you know what you're doing # Default: blank #wgetopts=-q # To enable use of gpg or md5, uncomment these # NOTE: it doesn't make sense to use md5 but not gpg so your options should be: # 1. both disabled, 2. gpg enabled, 3. both enabled. # Default: false, false use_gpg=true use_md5=true Instalasi MySQL 5 Instalasi MySQL 5 sangat mudah, cukup dengan melakukan 2 command berikut : # /opt/csw/bin/pkg-get -i mysql5 mysql5client mysql5devel mysql5rt # /opt/csw/bin/pkg-get -i mysql5test Seanjutnya buat file configuration di /opt/csw/mysql5/my.cnf, dengan mengacu pada salah satu file my-*.cnf di /opt/csw/mysql5/share/mysql/ dan melakukan seting sesuai kebutuhan, seperti mengaktifkan InnoDB jika diperlukan. Lakukan seting group untuk MySQL : # groupadd mysql # useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false mysql Inisialisasi MySQL database : cd /opt/csw/mysql5 ./bin/mysql_install_db chown -R mysql:mysql ./var
  • 8. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) Jalankan MySQL 5 : # cd /opt/csw/mysql5 ; /opt/csw/mysql5/bin/mysqld_safe & Instalasi PHP 5 Instalasi PHP 5 sangat mudah, namun memerlukan beberapa aplikasi tambahan sebagai pendukung agar PHP bisa diinstalasi, yaitu autoconf, automake, dan gsed : global# pkg-get -i autoconf ... global# which autoconf && autoconf --version | head -2 /opt/csw/bin/autoconf autoconf (GNU Autoconf) 2.59 Written by David J. MacKenzie and Akim Demaille. global# pkg-get -i automake ... global# which automake && automake --version | head -2 /opt/csw/bin/automake automake (GNU automake) 1.8.3 Written by Tom Tromey <tromey@redhat.com>. global# pkg-get -i gsed ... global# which gsed && gsed --version | head -2 /opt/csw/bin/gsed GNU sed version 4.1.4 Copyright (C) 2003 Free Software Foundation, Inc. Selain itu dibutuhkan pula beberapa aplikasi pendukung lainnya : global# which gcc && gcc --version | head -2 /usr/sfw/bin/gcc gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. global# which gmake && gmake --version | head -2 /usr/sfw/bin/gmake GNU Make 3.80 Copyright (C) 2002 Free Software Foundation, Inc. global# which flex && flex --version | head -2 /usr/sfw/bin/flex flex version 2.5.4 global# which bison && bison --version | head -2 /usr/sfw/bin/bison bison (GNU Bison) 1.875 Written by Robert Corbett and Richard Stallman.
  • 9. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) global# which gm4 && gm4 --version | head -2 /opt/csw/bin/gm4 GNU M4 1.4.3 Written by Rene' Seindal. global# which perl && perl -v | head -2 /opt/csw/bin/perl This is perl, v5.8.7, built for sun4-solaris-thread-multi global# which gunzip && gunzip -V | head -2 /usr/bin/gunzip gunzip 1.3.3-patch.1 (2002-03-08) global# which gtar && gtar --version | head -2 /usr/sfw/bin/gtar tar (GNU tar) 1.14 Copyright (C) 2004 Free Software Foundation, Inc. Langkah selanjutnya adalah menginstalasi PHP 5. Download source dari PHP 5 dari http://www.php.net/downloads.php#v5 dan ambil file dengan extensi tar.gz : global# gunzip -cd php-5.1.6.tar.gz | gtar xvpf – global# cd php-5.1.6 global# ./configure --with-apxs2=/usr/apache2/bin/apxs --enable-dbase --with-libxml-dir=/usr/local --with-config-file-path=/etc/apache2 --with-mysql=shared,/opt/csw/mysql5 --with-mysqli=shared,/opt/csw/mysql5/bin/mysql_config --with-xpm-dir=/usr --with-gd --with-tiff-dir=/usr --with-bz2=/usr/lib --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib --enable-mbstring --enable-calendar--enable-bcmath --enable-ftp --enable-exif global# gmake ... global# gmake install ... Installing PHP SAPI module: apache2handler /var/apache2/build/instdso.sh SH_LIBTOOL='/var/apache2/build/libtool' libphp5.la /usr/apache2/libexec /var/apache2/build/libtool --mode=install cp libphp5.la /usr/apache2/libexec/ cp .libs/libphp5.so /usr/apache2/libexec/libphp5.so chmod +x /usr/apache2/libexec/libphp5.so cp .libs/libphp5.lai /usr/apache2/libexec/libphp5.la libtool: install: warning: remember to run 'libtool --finish /build/php-5.1.2/libs' chmod 755 /usr/apache2/libexec/libphp5.so [activating module 'php5' in /etc/apache2/httpd.conf] Installing PHP CLI binary: /usr/local/bin/ Installing PHP CLI man page:/usr/local/man/man1/ Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config
  • 10. SAMP @ Institut Manajemen Telkom (http://www.imtelkom.ac.id) Installing man pages: /usr/local/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment:/usr/local/lib/php/ [PEAR] Archive_Tar - installed: 1.3.1 [PEAR] Console_Getopt - installed: 1.2 pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0) [PEAR] PEAR - installed: 1.4.6 Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path Installing PDO headers: /usr/local/include/php/ext/pdo/ Selanjutnya copy file php.ini-dist dari directory php-5.1.6 ke directory Apache : global# cp php.ini-dist /etc/apache2/php.ini Dan edit file konfigurasi tersebut : ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; extension=mysql.so ; Directory in which the loadable extensions (modules) reside. extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20050922/" Pastikan bahwa modul mysql telah ada : # ls -l /usr/local/lib/php/extensions/no-debug-non-zts-20050922/ total 1088 -rwxr-xr-x1 root root103144 Aug 29 21:48 mysql.so -rwxr-xr-x1 root root429948 Aug 29 21:48 mysqli.so Dan tambahkan deklarasi modul PHP di file konfigurasi Apache 2 : LoadModule php5_module libexec/libphp5.so AddType application/x-httpd-php .php Start Apache 2: # svcadm enable apache2 # svcs | grep -i apache2 online 18:07:10 svc:/network/http:apache2