Web Server di Fedora Core 4

Berikut adalah tutorial pembuatan MYSQL, HTTPD dan PGP untuk membuat Sebuah Server berbasis Web (Webserver). Sebelumnya sudah ada tutorial percakapan yg panjang lebar. Dan sekarang saya akan padat kan.

Saya memakai;

[root@NGETOP widhe]# id;uname -a
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(di sk),10(wheel)
Linux NGETOP.NET.BLOK.4 2.6.17-1.2142_FC4 #1 Tue Jul 11 22:41:14 EDT 2006 i686 i686 i386 GNU/Linux

Dengan memakai minimal Installation FC4 ini, saya cukup kewalahan dengan update/install library yg dibutuhkan..

MYSQL 5.0.24

[root@NGETOP widhe]# wget

[root@NGETOP widhe]# tar -zxvf mysql-standard-5.0.22-linux-i686.tar.gz
[root@NGETOP widhe]# mv mysql-standard-5.0.22-linux-i686 /usr/local/mysql
[root@NGETOP widhe]# cd /usr/local/mysql
[root@NGETOP mysql]# scripts/mysql_install_db
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password ‘new-password’
./bin/mysqladmin -u root -h NGETOP.NET.BLOK.4 password ‘new-password’
See the manual for more instructions.

You can start the MySQL daemon with:
cd .; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the ‘sql-bench’ directory:
cd sql-bench; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
Support MySQL by buying support/licenses at
[root@NGETOP mysql]# cd ..
[root@NGETOP local]# chown -R root.mysql mysql
[root@NGETOP local]# chmod -R 640 mysql
[root@NGETOP local]# chmod -R u+X,g+X mysql
[root@NGETOP local]# chmod -R ug+x mysql/bin
[root@NGETOP local]# chmod -R g+w mysql/data
[root@NGETOP local]# chmod -R u+x mysql/scripts
[root@NGETOP local]# cp mysql/support-files/my-medium.cnf /usr/local/mysql/data/my.cnf
[root@NGETOP local]# chgrp mysql mysql/data/my.cnf
[root@NGETOP local]# cd mysql
[root@NGETOP mysql]# bin/safe_mysqld –user=mysql &
[1] 7162
WARNING: Found /usr/local/mysql/data/my.cnf
Datadir is deprecated place for my.cnf, please move it to /usr/local/mysql

Starting mysqld daemon with databases from /usr/local/mysql/data

[root@NGETOP mysql]# ps ax |grep mysql

[root@NGETOP mysql]# bin/mysqladmin -u root password ‘passwordkamu’
[root@NGETOP mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysql
[root@NGETOP mysql]# chmod 744 /etc/rc.d/init.d/mysql
[root@NGETOP mysql]# chkconfig –add mysql
[root@NGETOP mysql]# service mysql restart
[root@NGETOP mysql]# ln -s /usr/local/mysql/bin/mysql /sbin/mysql
[root@NGETOP widhe]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 8 to server version: 5.0.22-standard-log

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.


=== Selesai ===


[root@NGETOP widhe]# wget
[root@NGETOP widhe]# tar -zxvf httpd-2.2.3.tar.gz
[root@NGETOP widhe]# cd httpd-2.2.3
[root@NGETOP httpd-2.2.3]# groupadd www
[root@NGETOP httpd-2.2.3]# useradd -g www www
[root@NGETOP httpd-2.2.3]# id www
uid=502(www) gid=502(www) groups=502(www)
[root@NGETOP httpd-2.2.3]# ./configure

— truncated —

[root@NGETOP httpd-2.2.3]# make
[root@NGETOP httpd-2.2.3]# make install


[root@NGETOP widhe]# wget
[root@NGETOP widhe]# tar -zxvf php-4.4.3.tar.gz
[root@NGETOP widhe]# cd php-4.4.3
[root@NGETOP widhe]# ./configure –prefix=/usr/local –with-apxs2=/usr/local/apache/bin/apxs –with-mysql-dir=/usr/local –with-xml –enable-bcmath –enable-calendar –enable-exif –enable-ftp –with-gettext –enable-mbstring –enable-mbstr-enc-trans –enable-mbregex –enable-discard-path –with-pear –with-ttf –enable-gd-native-ttf –with-openssl –with-zlib-dir=/usr/include –enable-libxml –with-libxml-dir=/usr/include/libxml2 –enable-module=so
[root@NGETOP widhe]# make
[root@NGETOP widhe]# make install

Lalu add AddType application/x-httpd-php .php dan DirectoryIndex index.php index.html

[root@NGETOP widhe]# cp php.ini-dist /usr/local/lib/php.ini
[root@NGETOP widhe]# chown -R root.www /usr/local/lib/php
[root@NGETOP widhe]# chmod -R g-w,o-rwx /usr/local/lib/php
[root@NGETOP widhe]# pico /etc/rc.d/init.d/httpd

Isinya ambil di ??? (contact saya di yahoo(YM) ID: ehdiw

[root@NGETOP widhe]# chmod 755 /etc/rc.d/init.d/httpd
[root@NGETOP widhe]# chkconfig –add httpd
[root@NGETOP widhe]# service httpd start

Buat di /usr/local/apache/htdocs test.php
pico test.php
Isinya :

Leave a Reply

Your email address will not be published. Required fields are marked *

dono naik “kangguru”