ファイルの拡張子をhtmlからphpに変更したためアドレスが変わりました。 新しいページはこちらからお入りください。

2003年11月30日

次にOsCommerceのインストールにチャレンジ。

しかし・・・
こんなエラーがでてインストールができない。。。
FATAL ERROR: register_globals is disabled in php.ini, please enable it!

php.iniのregister_globalsをOnにすればOKのはずが、
直してもエラーのまま。
Googleでエラーメッセージを検索したら、海外のサイトに情報が!
infoseek使って翻訳して、試してみたらなんとかOKに。
でも、ほんとにこれでいいのかな・・・


.: OsCommerce goes Xoops :. - Forum

投稿者 kazuhiko : 01:02 | コメント (0)

Linuxでファイルを探すときのコマンド。

よく使うけど、いつも忘れてしまいます。。。

(例)
# find / -name php.ini


日経Linux : Linuxコマンド集 : find

投稿者 kazuhiko : 00:45 | コメント (0)

2003年11月29日

# tar xvfz /home/****/work/php-4.3.4.tar.gz
# cd php-4.3.4

./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-gd \
--with-zlib \
--enable-zend-multibyte \
--enable-mbstring \
--enable-mbstr-euc-trans \
--enable-ftp \
--with-config-file-path=/usr/local/apache/conf/php

# make
# make install

# cp php.ini-dist /usr/local/lib/php.ini

とりあえず・・・

ちょっと修正(2003.11.29)
やっぱり違ったようす・・・

投稿者 kazuhiko : 01:09 | コメント (0)

# tar xvfz /home/****/work/mysql-3.23.58-pc-linux-i686.tar.gz
# ln -s ./mysql-3.23.58-pc-linux-i686 ./mysql
# cd mysql
# chmod u+rx ./scripts/mysql_install_db
# ./scripts/mysql_install_db
# groupadd mysql
# useradd -M -g mysql mysql
# chown -R root .
# chown -R mysql ./data
# chgrp -R mysql .
# cp ./support-files/my-medium.cnf /etc/my.cnf
# vi /etc/my.cnf


# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-networking
user = mysql
default-character-set = ujis

skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=8M
log-bin
server-id = 1

# Point the following paths to different dedicated disks
tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#set-variable = bdb_cache_size=4M
#set-variable = bdb_max_lock=10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/var/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/var/
#innodb_log_arch_dir = /usr/local/mysql/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
# Set .._log_file_size to 25 % of buffer pool size
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = innodb_lock_wait_timeout=50

[mysqldump]
quick
set-variable = max_allowed_packet=16M
#add kato
default-character-set = ujis

[mysql]
no-auto-rehash
#add kato
default-character-set = ujis
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

[mysqlhotcopy]
interactive-timeout


バックグラウンドでsafe_mysqldスクリプトを起動
# ./bin/safe_mysqld --user=mysql &

テスト用DBを削除
# ./bin/mysqladmin -u root drop test
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.

Do you really want to drop the 'test' database [y/N] y
Database "test" dropped

パスワードを設定
# ./bin/mysqladmin -u root password 'kokonipassword'

# ./bin/mysql -u root -p
mysql> use mysql
Database changed
mysql> delete from user where user='';
Query OK, 2 rows affected (0.00 sec)
mysql> create database xoops;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on xoops.* to xoops@localhost identified by 'kokonipassword';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye

Mysqlを自動起動
/etc/rc.d/rc.localの一番最後に追加
/bin/sh -c 'cd /usr/local/mysql ;
./bin/safe_mysqld &'


とりあえず・・・

投稿者 kazuhiko : 01:08 | コメント (0)

2003年11月28日

xoopsインストールのため、Apacheを入れ直します。

# rpm -qa | grep apache
apache-1.3.27-0vl3
apache-devel-1.3.27-0vl3
apache-manual-1.3.27-0vl3
# rpm -e apache-manual-1.3.27-0vl3
# rpm -e apache-devel-1.3.27-0vl3

依存関係のあるmod_ssl-2.8.12-0vl3を削除

# rpm -e mod_ssl-2.8.12-0vl3
# rpm -e apache-1.3.27-0vl3

# cd /usr/local/src
# tar xvfz /home/****/work/mod_ssl-2.8.16-1.3.29.tar.gz
# tar xvfz /home/****/work/apache_1.3.29.tar.gz

# cd mod_ssl-2.8.16-1.3.29
# ./configure --with-apache=../apache_1.3.29

# cd ../apache_1.3.29
# OPTIM="-O2" ./configure --enable-module=so --enable-rule=SHARED_CORE --enable-module=ssl --activate-module=src/modules/php4/libphp4.a
# OPTIM="-O2" ./configure --enable-module=so --enable-rule=SHARED_CORE --enable-module=ssl
# make
# make install

これでインストールは終了

自動起動の設定方法
/etc/rc.d/rc.local
の最後の部分に、
/usr/local/apache/bin/apachectl start

投稿者 kazuhiko : 23:40 | コメント (0)

2003年11月26日

一般からスーパーユーザに変更
$su -
------------
proftpd.confのバックアップ
#cd /etc
#ls -al proftpd*
#cp proftpd.conf proftpd.conf.org
------------
viでproftpd.confの編集
#vi proftpd.conf

# This is a basic ProFTPD configuration file
#
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group "nobody" and "ftp"
# for normal operation and anon.

ServerName "ProFTPD Basic Configuration"   ←ここを修正(任意)
ServerType standalone      ←ここを修正(inetdに変更)
DefaultServer on

:wq!で書き込み
------------
inetd.confのバックアップ
#cp inetd.conf inetd.conf.org

------------
viでinetd.confの編集
# vi inetd.conf

ファイル内で下記の箇所を探して修正
#ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd
 ↓(#をとる)
ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd

------------
inetdを再起動
# killall -HUP inetd

これでFTPソフトで接続できればOK!!

投稿者 kazuhiko : 22:55 | コメント (0)

シャットダウンコマンド

電源OFF
#shutdown -h now

再起動
#shutdown -r now

投稿者 kazuhiko : 22:22 | コメント (0)

2003年11月24日

自宅にVine Linuxを入れて勉強中。

インストールしたばかりなので、まずはもろもろアップデート。
Vine Linuxの場合、apt-getコマンドを使うようです。

#apt-get update
#apt-get check
#apt-get upgrade

で通常はOK。

今回途中でエラーになって「--fix-missing」つけてみろとのことで
#apt-get upgrade --fix-missing
で無事完了。

参考にしたのは下記です。

apt for rpm コマンド使用方法--Vine Linux インストール & 設定メモ

投稿者 kazuhiko : 22:55 | コメント (0)

ヘッドラインをメインに表示していて見たい記事をクリックすると、いったんヘッドラインの画面が
表示され、それからもう一回同じ記事をクリックしないと見たい情報が見れません。
それを変更する方法があったので試してみました。

modules/xoopsheadline/blocks/headline_block.html の以下のソースを修正すれば
よいようです。

------------------
<{section name=i loop=$items}>
<{if $items[i].title != ""}>
<li>
<a href="<{$xoops_url}>/modules/xoopsheadline/index.php?id=<{$site_id}>#<{$items[i].link}>"><{$items[i].title}></a>
</li>
<{/if}><{/section}>
------------------

となってる部分を

------------------
<{section name=i loop=$items}><{if $items[i].title != ""}>
<li>
<a href="<{$items[i].link}>" target="_blank"><{$items[i].title}></a>
</li>
<{/if}>
<{/section}>
------------------
とすればいいようです。

詳しくはXOOPS日本公式サイト - フォーラムを。

投稿者 kazuhiko : 21:11 | コメント (0)