Merancang webserver pada centos
LAMP (Linux – Apache – MySQL – PHP/Perl)
-Apache Web Server 2.0
-MySQL Server 5.0
-Php 5.0
-phpMyAdmin (MySQL Administration Tool)
-WebMin (ControlPanel berbasis web)
Instal Apache Server
Apache adalah Web HTTP yang sangat populer digunakan pada Sistem Operasi Server Linux.
yum install httpd httpd-devel
Direktori tempat konfigurasi Apache : /etc/httpd/conf/httpd.conf
Untuk menjalakan service httpd : /etc/init.d/httpd start
Instal MySQL Server
MySQL adalah databases openSource yang umum digunakan pada Server Linux dan dapat berintegrasi dengan PHP dan Apache pada CentOS
yum install mysql mysql-server mysql-devel
jika muncul pesan Error seperti :
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
Itu terjadi karena Anda tidak menjalankan service mysqld daemon terlebih dahulu dan setelah itu menjalankan mysql client. File /var/lib/mysql/mysql.sock selalu dibuat secara otomatis jika menjalankan mysql.
Untuk mempebaikinya, jalankan service MySQl daemon :
/etc/init.d/mysqld start
Sekarang MySQL siap untuk digunakan.
Instal script PHP5
Proses installasi PHP sangatlah mudah dan mudah di konfigurasi.
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
jangan lupa untuk menginstall php-gd(gd library). ini sangat penting untuk menjalankan script pada server salah satunya pada MySQL.
restart Apache untuk menjalankan konfigurasi PHP
/etc/init.d/httpd restart
Untuk menge-tes konfigurasi PHP, buat file test.php pada direktori /var/www/html/ dengan script di bawah ini :
// test.php
jalankan script tersebut pada Browser, ketikkan : http://localhost/test.php
Yang perlu diperharikan dalam konfigurasi PHP :
* PHP Paths (php.ini path)
* Apache paths and Loaded Modules (mod_security, mod_evasive if installed_
* PHP GD Library
* MySQL paths and other information
sekarang tinggal install webmin nya
pada ssh / console ketik
#nano /etc/yum.repos.d/webmin.repo
lalu isi dengan yang dibawah ini
[Webmin]
name=Webmin Distribution Neutral
baseurl=http://download.webmin.com/download/yum
enabled=1
You should also fetch and install my GPG key with which the packages are signed, with the command :
rpm --import http://www.webmin.com/jcameron-key.asc
You will now be able to install with the command :
yum install webmin
