Archive for April, 2011

Apache run under Multiple User

Posted: April 30, 2011 in Debian

1. Install apache2-mpm-itk

aptitude install apache2-mpm-itk

2. After Create user

adduser WebAdmin

**force user to use apache group

usermod -g www-data WebAdmin

3. Add this line on vhost

<IfModule mpm_itk_module>

AssignUserId WebAdmin www-data

</IfModule>

4. Chown folder to user

chown WebAdmin:www-data /var/www/web/* -R

5. Reload apache

service apache2 reload

install openwrt first

http://downloads.openwrt.org/kamikaze/8.09.2/x86/openwrt-x86-squashfs.image

Use PhysGUIto install

download here : http://m0n0wall.monostar.net/download/physdiskwrite-0.5.2-PhysGUI-bundle.zip

Install x-wrt

#opkg update

#opkg install nano

#opkg install -force-overwrite http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/x86/webif_latest.ipk

Memula check dulu php apa yang ada…

taip..

# rpm -qa |grep php

akan keluar mcm nih ..

php-common-5.1.6-15.el5.i386

php-cli-5.1.6-15.el5.i386

php-5.1.6-15.el5.i386

php-pdo-5.1.6-15.el5.i386

php-bcmath-5.1.6-15.el5.i386

php-ldap-5.1.6-15.el5.i386

php-devel-5.1.6-15.el5.i386

php-gd-5.1.6-15.el5.i386

php-xml-5.1.6-15.el5.i386

php-mbstring-5.1.6-15.el5.i386

php-mysql-5.1.6-15.el5.i386

php-dba-5.1.6-15.el5.i386

pastu update repo utk php.

kalau pakai pico pun picolah kalau pakai vi pun taip lah vi .. ;p

# vi /etc/yum.repos.d/CentOS-Testing.repo

msukkan benda alah nih ..

#————————- potong di sini ————————————–

# CentOS-Testing:

# !!!! CAUTION !!!!

# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.

# They may or may not replace core CentOS packages, and are not guaranteed to function properly.

# These packages build and install, but are waiting for feedback from testers as to

# functionality and stability. Packages in this repository will come and go during the

# development period, so it should not be left enabled or used on production systems without due

# consideration.

[c5-testing]

name=CentOS-5 Testing

baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/

enabled=1

gpgcheck=1

gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

includepkgs=php*

#————————- potong di sini ————————————–

kemudian taip

# yum update -y

dah sudah tu restart apache

# service httpd restart

test php jadi ko dop pakai command nih …

# php -v

akan keluar mcm nih

PHP 5.2.6 (cli) (built: Sep 15 2008 20:42:05)

Copyright (c) 1997-2008 The PHP Group

Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

BEYEH AHH TUH ………………

# /etc/yum.repos.d/CentOS-Testing.repo

mysql -u username -p –default-character-set=utf8 “database” < backup.sql