Linux Tips Note

Note & Tips for Linux.

TTF Font install

2005-10-23 21:01:36 | Debian - sarge
apt-get install defoma fontconfig ttmkfdir cabextract

vi /etc/X11/XF86Config-4
Section "Files"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
FontPath "/usr/share/fonts/truetype"
FontPath "/usr/local/share/fonts/truetype"
FontPath "/usr/lib/X11/fonts/CID"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
EndSection

# vi /etc/fonts/fonts.confに追加
<dir>/usr/local/share/fonts</dir>

インストールされているフォント一覧
$> fc-list

フォントインストール先フォルダ作成
mkdir -p /usr/local/share/fonts/truetype/

TTFをそこにコピーする。そして、
#> cd /usr/local/share/fonts/truetype/
#> mkfontscale
#> mkfontdir

Apache2 + SSL

2005-10-21 19:54:44 | Debian - sarge
証明書つくる
apache2-ssl-certificate

vi /etc/apache2/sites-available/default
--
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem

</VirtualHost>
--

mods-enabled# ln -s ../mods-available/ssl.* .

Apache2 + Tmecat4

2005-10-21 19:34:08 | Debian - sarge
apt-get install apache2 apache2-common apache2-doc apache2-mpm-prefork
apt-get install tomcat4 libapache2-mod-jk2 libtomcat4-java libservlet2.3-java

vi /etc/bash.bashrc
export JAVA_HOME="xxx"

vi /etc/apache2/apache2.conf
SetHandler server-status
Order deny,allow
# Deny from all
Allow from all

SetHandler server-info
Order deny,allow
# Deny from all
Allow from all

cp /etc/apache2/mods-available/info.load /etc/apache2/mods-enabled/

create workers2.properties file
vi /etc/apache2/workers2.properties
--
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
file=${serverRoot}/logs/jk2.shm

[uri:/shibboleth/*]
info=Shibboleth

[uri:/examples/*]
info=A set of JSP examples for testing
--

edit jk2.conf file
------------------
vi /etc/apache2/mods-enabled/jk2.conf
uncomment 'JkSet config.file /etc/apache2/workers2.properties'

/etc/init.d/tomcat4 stop
/etc/init.d/apache2 stop
/etc/init.d/tomcat4 start
/etc/init.d/apache2 start

日本語入力

2005-10-21 16:54:36 | Debian - sarge
/etc/apt/source.listへ下記追記
deb http://everybody.good-day.net/~ikuya/debian/sarge/anthy ./
deb http://everybody.good-day.net/~ikuya/debian/sarge/uim ./

インストール順番が大切
# apt-get update
# apt-get install anthy
# apt-get install uim

.xinitrcへ
if type uim-xim &> /dev/null; then
uim-xim &
fi
XMODIFIERS=@im=uim ; export XMODIFIERS
GTK_IM_MODULE=uim ; export GTK_IM_MODULE
UIM_IM_ENGINE=anthy ; export UIM_IM_ENGINE

exec uim-xim &
#exec uim-helper-toolbar-gtk-systray &
exec uim-toolbar-gtk-systray &

.uimへ
(define default-im-name 'anthy)
(define anthy-show-segment-separator? #t)

Sun のJavaインストール

2005-10-21 16:43:00 | Debian - sarge
Java専用 Debianパッケージ変換ソフトのインストール
# sudo apt-get update
# sudo apt-get install java-package
Debian用パッケージ変換
# fakeroot make-jpkg jdk-1_5_0_03-linux-i586.bin
java共通パッケージインストール
# sudo apt-get install java-common
パッケージインストール
# sudo dpkg -i sun-j2sdk1.4_1.4.1.01-0.8_i386.deb
環境変数の設定
export JAVA_HOME=/usr/lib/j2sdk1.4-sun
export PATH=${JAVA_HOME}/bin:$PATH