Instalasi LAMP, apalagi install dari source, adalah pengalaman yang baru. Betapa tidak, untuk menginstallnya saja, saya perlu bolak-balik baca manual (karena banyak dependensi). Berbeda dengan instalasi menggunakan RPM, jika kita menginstall langsung dari paket source, maka kenikmatan yang kita peroleh adalah kita bisa melakukan kustomisasi sesuai yang kita butuhkan.
Instalasi http server di linux :
1. Ektrak paket
# tar -xvzf /windows/punyarito/rito/buat\ di\ bakup/lamp/httpd-2.0.54.tar.gz
2. Masuk ke direktory http
# cd httpd-2.0.54/
3. Makukan kompilasi sesuai keinginan
# ./configure –enable-usertrack –prefix=/server/httpd –sysconfdir=/etc/httpd/ –bindir=/usr/bin/ –sbindir=/usr/sbin/ –enable-cache –enable-dav –enable-http –enable-vhost-alias –enable-speling –enable-so –enable-info –enable-suexec –enable-static-rotatelogs –enable-static-htpasswd –with-ssl=/usr/ –enable-ssl –enable-case-filter –enable-mem-cache –enable-mime-magic –enable-case-filter-in –enable-logio –enable-cern-meta –enable-headers –enable-expires –enable-proxy –enable-proxy-connect –enable-proxy-ftp –enable-proxy-http
# make
# make install
5. Jalankan httpd service
# /etc/init.d/httpd start
Memulai httpd:httpd: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName [ OK ]
6. Cek service httpd udah jalan ato belum
# netstat -plnat | grep httpd
tcp 0 0 :::80 :::* LISTEN 2336/httpd
7. Server httpd telah terinstal sempurna
===========================================================================
Instalasi mysql server
1. Extrak paket
# tar -xvzf /windows/punyarito/rito/buat\ di\ bakup/lamp/mysql-max-4.1.11-pc-linux-gnu-i686.tar.gz
2. Kemudian pindahkan file hasil ektraksi ke direktory yang telah ditentukan
# mv mysql-max-4.1.11-pc-linux-gnu-i686 /server/mysql
3. Buat user dan grup nya dulu
# /usr/sbin/groupadd mysql
# /usr/sbin/useradd -g mysql -d /server/mysql/ mysql
4. Jalankan script instalasi
# scripts/mysql_install_db –user=mysql
5. Ubah hak akses nya
# chown -R root .
# chown -R mysql data/
# chgrp -R mysql .
6. Copy daemon dari mysql ke /etc/init.d
# cp support-files/mysql.server /etc/init.d/mysql
7. buat soft link dari bin mysql
# ln -s /server/mysql/bin/ /usr/local/bin
# ln -s /server/mysql/bin/ /usr/bin
# ln -s /server/mysql/bin/ /bin
8. salin my.cnf ke /etc
# cp support-files/my-large.cnf /etc/my.cnf
9. jalankan service
# /etc/init.d/mysql start
Starting MySQL. [ OK ]
10. test mysql
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.11-max-log
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
11. Mysql Server telah terinstall secara benar
=======================================================================
Instalasi PHP
1. extrack paket php
# tar -xvzf /windows/punyarito/rito/buat\ di\ bakup/lamp/php-5.0.4.tar.gz
2. masuk kedirektori source php, kemudian lakukan kompilasi
# cd php-5.0.4/
# ./configure –prefix=/server/php –bindir=/usr/bin/ –sbindir=/usr/sbin/ –sysconfdir=/etc/php –with-apxs2=/usr/sbin/apxs –with-mod_charset –enable-force-cgi-redirect –with-config-file-path=/etc/php –with-config-file-scan-dir=/etc/php –enable-safe-mode –enable-magic-quotes –enable-libgcc –with-libxml-dir=/usr –enable-bcmath –with-bz2 –enable-calendar –with-jpeg-dir=/ –with-tiff-dir=/ –with-curlwrappers –enable-dio –enable-exif –with-fam –enable-filepro –enable-ftp –with-gd=/usr/ –with-jpeg-dir –with-png-dir –with-zlib-dir –with-xpm-dir –with-ttf –with-freetype-dir –enable-gd-native-ttf –with-gettext –enable-mbstring –disable-mbregex –with-mime-magic –with-mysql=/server/mysql/ –with-ncurses=/ –with-unixODBC=/ –with-pspell –enable-shmop –enable-sockets –enable-sysvmsg –enable-sysvsem –enable-sysvshm –enable-yp –enable-maintainer-zts –enable-memory-limit –enable-zend-multibyte –enable-shared –with-gnu-ld –with-pic –with-pgsql=/var/lib/pgsql/
# make
# make install
3. tambahkan script berikut setelah instalasi di httpd.conf
AddType application/x-httpd-php .php .phtml
4. restart httpd
[root@asterix filedownload]# /etc/init.d/httpd restart
Menghentikan httpd: [ OK ]
Memulai httpd:httpd: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
6. uji apakah php suedah terinstall, caranya dengan membuatkan script phpinfo.
contoh file:
more /server/httpd/htdocs/tes.php
kemudian buka di browser
http://localhost/tes.php
http://www.ilmukomputer.org/wp-content/uploads/2006/11/install-lamppdftar.gz
Cari di sini
Rabu, 08 Desember 2010
Instalasi LAMP (Linux Apache MySQL PHP)
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar