acl服務器模塊的部署--示例

             做者:王華濤服務器

 

acl服務器模塊acl_master,經過配置文件的配置項來控制工做進程的運行。下面以例子ioctl_echo3來說解如何配置運行。app

1)下載acl源碼包acl.3.0.3.src.tgzui

2) #tar xzvf acl.3.0.3.src.tgz將包進行解壓。debug

3)在acl/dist/master目錄下執行命令:server

#chmod a+x setup.shblog

#./setup.sh /opt/acl進程

/opt/acl是將程序發佈到這個目錄下。源碼

執行腳本後,將自動創建相應子目錄在/opt/acl路徑下。it

4)將ioctl_echo3拷貝到/opt/acl/libexec/目錄下io

5)將ioctl_echo3的配置文件ioctl_echo.cf拷貝到/opt/acl/conf/service目錄下。

6)將ioctl_echo.cf中的程序名修改成ioctl_echo3

ioctl_echo.cf的配置內容以下:

service server {

master_disable = no

master_service = 127.0.0.1:5001

master_type = inet

master_private = n

master_unpriv = n

master_chroot = n

master_wakeup = -

master_maxproc = 2

master_prefork = 2

master_command = ioctl_echo3

master_log = /opt/acl/var/log/ioctl_echo.log

ioctl_use_limit = 100

ioctl_idle_limit = 120

ioctl_pid_dir =  /opt/acl/var/pid

ioctl_queue_dir = /opt/acl/var

ioctl_rw_timeout = 120

ioctl_buf_size = 8192

ioctl_max_accept = 25

ioctl_owner = root

ioctl_delay_sec = 0

ioctl_delay_usec = 500

ioctl_event_mode = select

ioctl_max_threads = 250

ioctl_stacksize = 0

ioctl_access_allow = 127.0.0.1:255.255.255.255, 127.0.0.1:127.0.0.1

ioctl_quick_abort = 1

app_client_idle_limit = 12

debug_mem = 1

}

 

main.cf的配置內容以下:

default_process_limit = 250

owner_user = root

master_owner = root

owner_group = root

service_throttle_time = 60

process_name = acl_master

buf_size = 81920

rw_timeout = 60

event_delay_sec = 1

event_delay_usec = 5000

daemon_directory = /opt/acl/libexec

log_file = /opt/acl/var/log/acl_master

service_directory = /opt/acl/conf/service

queue_directory = /opt/acl/var

pid_file = /opt/acl/var/pid/acl_master.pid

scan_subdir = 0

 

 

7)在/opt/acl/sh目錄下執行start.sh就能夠啓動acl_master進程和ioctl_echo3進程了。

8) 經過telnet 127.0.0.1 5001進行驗證

相關文章
相關標籤/搜索