You Are Here: Home » Operating System » -BSD » Install Web Server

Install Web Server

Install Web Server

: Yang dibutuhkan adalah source-source berikut :

1. mysql-3.22.32.tar.gz
2. apache_1.3.26.tar.gz
3. php-4.1.2.tar.gz
4. openssl-0.9.6d.tar.gz
5. mod_ssl-2.8.10-1.3.26.tar.gz

: Kita Download dulu Source Codenya :

server# pwd
/usr/local/src
server# wget http://sunsite.bilkent.edu.tr/pub/mysql/Downloads/MySQL-3.22/mysql-3.22.32.tar.gz
server# wget http://ftp.inet.ufop.br/adm/SO/freebsd/ports/apache_1.3.26.tar.gz
server# wget http://museum.php.net/php4/php-4.1.2.tar.gz
server# wget http://ftp.inet.ufop.br/adm/SO/freebsd/ports/openssl-0.9.6d.tar.gz
server# wget http://ftp.inet.ufop.br/adm/SO/freebsd/ports/mod_ssl-2.8.10-1.3.26.tar.gz
: Install MySQL-nya Dulu :

unpack source nya, compile dan Install :

server# tar -xzvf mysql-3.22.32.tar.gz
server# cd mysql-3.22.32/
server# ./configure –prefix=/usr/local/src/mysql
server# make
server# make install
server# ./scripts/mysql_install_db

Creating db table
Creating host table
Creating user table
Creating func table
Creating tables_priv table
Creating columns_priv table

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

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/local/src/mysql/bin/mysqladmin -u root password ‘new-password’
See the manual for more instructions.

Please report any problems with the /usr/local/src/mysql/bin/mysqlbug script!

The latest information about MySQL is available on the web at http://www.mysql.com
Support MySQL by buying support/licenses at http://www.tcx.se/license.htmy.

: Menjalankan MySQL :

server# cd /usr/local/mysql/bin
server# ./safe_mysqld &
[1] 24269
server# Starting mysqld daemon with databases from /usr/local/mysql/var

: Unpack Apachenya Dulu :

server# cd /usr/local/src/
server# tar -xzvf apache_1.3.26.tar.gz
server# cd apache_1.3.26/
server# ./configure –prefix=/usr/local/src/apache

Configuring for Apache, Version 1.3.26
+ using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for FreeBSD 4.4 platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ using builtin Expat
+ checking sizeof various data types
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard

: Install PHP :

server# cd ..
server# tar -xzvf php-4.1.2.tar.gz
server# cd php-4.1.2/
server# ./configure –with-mysql=/usr/local/src/mysql
? –with-xml
? –with-apache=/usr/local/src/apache_1.3.26
? –enable-track-vars
+——————————————————————–+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+——————————————————————–+
Thank you for using PHP.

server# make
server# make install
server# cp php.ini-dist /usr/local/lib/php.ini
server# cd ..

: Instal opensslnya dulu :

server# tar -zxvf openssl-0.9.6d.tar.gz
server# cd openssl-0.9.6d/
server# ./config –prefix=/usr/local/src/ssl
server# make
server# make test
server# make install

: Instal mod_ssl :

server# cd ..
server# tar -zxvf mod_ssl-2.8.10-1.3.26.tar.gz
server# cd mod_ssl-2.8.10-1.3.26
server# ./configure –with-apache=/usr/local/src/apache_1.3.26

Done: source extension and patches successfully applied.

Now proceed with the following commands (Bourne-Shell syntax):
$ cd /usr/local/src/apache_1.3.26
$ SSL_BASE=/path/to/openssl ./configure … –enable-module=ssl
$ make
$ make certificate
$ make install

server# cd ..

: Install Apache :

server# cd apache_1.3.26/
server# ./configure
server# –enable-module=ssl
–activate-module=src/modules/php4/libphp4.a
–enable-module=php4
–prefix=/usr/local/src/httpd
–enable-shared=ssl

Creating Makefile in src/support
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/ssl
Creating Makefile in src/modules/php4

server# make
server# make certificate TYPE=custom
server# make install
+——————————————————–+
| You now have successfully built and installed the |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the |
| (initially created or preserved) configuration files |
| |
| /usr/local/src/httpd/conf/httpd.conf
| |
| and then you should be able to immediately fire up |
| Apache the first time by running: |
| |
| /usr/local/src/httpd/bin/apachectl start
| |
| Or when you want to run it with SSL enabled use: |
| |
| /usr/local/src/httpd/bin/apachectl startssl
| |
| Thanks for using Apache. The Apache Group |
| http://www.apache.org/ |
+——————————————————–+

: Selesai :

: Konfigurasi Apache :

Edit httpd.conf yang berada di /usr/local/src/httpd/conf/httpd.conf,

server# ee /usr/local/src/httpd/conf/httpd.conf

dan tambahkan baris berikut :

AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

: Mari kita Jalankan apache :

# /usr/local/src/httpd/bin/apachectl start

: Untuk menjalankan apache dengan mode SSL :

# /usr/local/src/httpd/bin/apachectl startssl

Menjalankan dengan mode SSL, kita akan diminta memasukkan pass-phrase nya.
apabila kita tidak ingin memasukkan pass-phrase setiap kali apache di jalankan, lakukan langkah-langkah berikut :

1. Hilangkan enkripsi dari RSA private key ( dan kita backup file aslinya ) :

# cd /usr/local/apache/conf/ssl.key/
# cp server.key server.key.org
# openssl rsa -in server.key.org -out server.key

2. Pastikan file server.key hanya terbaca oleh root:

# chmod 400 server.key

Selamat Mencoba, Semoga Berhasil

: Referensi :

Untuk ambil source codenya, silahkan rujuk site berikut ini :
– http://ftp.inet.ufop.br/adm/SO/freebsd/ports/
– http://museum.php.net/php4/
– http://www.freebsd-docs.netfirms.com/

About The Author

harrychanputra.web.id

Number of Entries : 295

Leave a Comment

© 2011 Powered By Wordpress, Goodnews Theme By Geeks Docuementation

Scroll to top