|
|
当サイトは、玄箱PRO (KURO-BOX/Pro)を中心とした組み込み、Linuxと電子工作を扱っています。
会社案内
情報セキュリティおよび個人情報の取り扱いについて コメントとトラックバックは、spamを予防するために、編集担当が公開の作業をするまで非公開になっています。コメントはそれぞれ投稿した人のものです。 |
玄箱(pro)の環境
kurobox:~# uname -acc は gcc が指定されます。
Linux kurobox 2.6.12.6-oabi #3 Fri Jun 8 13:47:34 JST 2007 armv5tejl GNU/Linux
kurobox:~# ls -l /usr/bin/cc lrwxrwxrwx 1 root root 20 2007-10-13 13:30 /usr/bin/cc -> /etc/alternatives/cc kurobox:~# ls -l /etc/alternatives/cc lrwxrwxrwx 1 root root 12 2007-10-13 13:30 /etc/alternatives/cc -> /usr/bin/gccgcc のバージョンを下に表示しました。
kurobox:~# which gcc /usr/bin/gcc kurobox:~# /usr/bin/gcc --version gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Kurobox:/home/k-wada/kurobox/wwwcount2.5# make
==========================================================
Please type the approptiate tag with make
all - compile all with default settings in src/config.h
makefiles - generate Makefiles
all_libs - make the libraries
Count.cgi - compile the Count.cgi program
mkstrip - compile the mkstrip utility
extdgts - compile the extdgts utility
config.h - generate the config.h header (interactive)
cfg - generate count.cfg file
install - install everything (interactive)
clean - remove object all object files etc
pristine - clean real good
==========================================================
(環境設定をする)
./configure
(ライブラリの生成)
make all_libs
(ヘッダ・ファイル生成)
make config.h
-----
Your configuration:
----------------------------------------------------------------
CgiBinDir=/var/www/apache2-default/cgi-bin
BaseDir= /var/www/Counter
DigitDir=/var/www/Counter/digits
ConfDir= /var/www/Counter/conf
ConfFile=count.cfg
DataDir=/var/www/Counter/data
LogDir=/var/www/Counter/logs
LogFile=Count2_5.log
----------------------------------------------------------------
Everything looks OK [y|n]?
(wwwcount の設定ファイル生成)
make cfg
(例としての設定値を表示しておいた)
cat count.cfg
[options]
auto_file_creation=Yes
strict_mode=Yes
allow_rgb_database=Yes
count_reload=Yes
log_error_messages=Yes
show_error_messages_to_browsers=Yes
; You can specify IP address of the hosts you want to ignore from counting.
; netmasks can be used to ignore a entire network or a specificrange of
; hosts in the network. Read the counter documentation to know about
; netmasks. Wild card can be used as well. one item per line.
;
[ignore IPs]
192.168.1.8
;
; All possible names and IP addresses by which your host can be referred.
; These hosts can access the counter remotely or locally. Host running
; the http server must exist here. Wild card can be used. one item per line.
;
[authorized]
kurobox.azland.ne.jp
kurobox
192.168.1.8
test.counter.com
(実行ファイルを生成)
make Count.cgi
(インストールの実行)
make install
-------------------------------------------------------------------------
Your configuration is shown below. You are only allowed to change the
cgi-bin directory. If you want to change it, edit the file Config.tmpl
and change the variable CGIBIN_DIR to the appropriate directory. Do not change
anything else.
cgi-bin directory = /var/www/apache2-default/cgi-bin
conf directory = /var/www/Counter/conf
conf file to install= count.cfg
digit directory = /var/www/Counter/digits
data directory = /var/www/Counter/data
log directory = /var/www/Counter/logs
log file = Count2_5.log
RGB file to install = ./data/rgb.txt
-------------------------------------------------------------------------
Press Control-C to abort
Continue [y|n]?
proceeding...
Now if you know what user and group id child processes of http
server use, I can change the ownership and access permission
accordigly. If you do not know, they are usually defined in the
file httpd.conf with User and Group. I suggest create a unique
user and group say httpd and set the User and Group to httpd.
*Do you know the user and group id of httpd' child process [y|n]:? y
*Enter user id of httpd's child process [no default]:? www-data
*Enter group id of httpd's child process [no default]:? www-data
installing Count.cgi->/var/www/apache2-default/cgi-bin
installing count.cfg->/var/www/Counter/conf
(パーミッションを設定しておく)
kurobox:/home/k-wada/kurobox/wwwcount2.5# ls -l /var/www/apache2-default/cgi-bin/Count.cgi
-rwx------ 1 www-data www-data 167830 2007-12-16 17:29 /var/www/apache2-default/cgi-bin/Count.cgi
kurobox:/home/k-wada/kurobox/wwwcount2.5#
kurobox:/var/www/Counter# chown www-data:www-data data/ 最後は、カウンタの画像が表示されるかを確認します。このブログ記事を参照しているブログ一覧: コーヒーの有無をオンラインでチェックしたい(その6)
このブログ記事に対するトラックバックURL: http://www.eleki-jack.com/mt/mt-tb.cgi/1192
おすすめ書籍 |
![]() |
コメントする