Fedora13のセットアップ
秋口にFedora13をいじっていたが、覚え書きを残す前にFedora14が出てしまった。14を入れる前に、13でやったセットアップを覚え書きとして残しておこう。用途は「開発機」兼「よろず実験機」なので、インストールしているものには一貫性がないので悪しからず。
- GD,php-gd
こちらを参考にさせていただいた。
PHPExcelを使うため。
リポジトリエクスプローラーからMySQLとMySQL Clientをインストール。
次に
で開発キットをインストール。
serviceコマンドでデーモンを起動すると、データベースの初期化が行われる。
service mysql start
MySQL データベースを初期化中: Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h fc13-x60 password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! [ OK ] mysqld を起動中: [ OK ]
とでるので、rootのパスを設定。
[root@fc13-x60 httpd]# /usr/bin/mysqladmin -u root password 'root'
MySQLに入ってみる。
[root@fc13-x60 httpd]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.48 Source distributionCopyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 licenseType 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- php-mcrypt ; phpMyAdminで使う
こちらを参考にさせていただいた。
libmcryptも一緒に入れてくれる。
- php-mbstring;
本家サイトからダウンロード。
展開後に/var/www/htmlに移動。シンボリックリンクをはる
ln -s ./phpMyAdmin-3.3.6-all-languages/ phpMyAdmin
- php-pdo
こちらを参考にさせていただいた。
wget "http://pear.php.net/go-pear"
mv go-pear go-pear.php
chmod 755 go-pear.php
php go-pear.php
とする。
(注記)CentOS5.5+PHP5.3.4にインストールした際には、エラーでインストールできなかった。
PEARサイトのコメント(これ)にあるように、
wget http://pear.php.net/go-pear.phar
php go-pear.phar
とした。このとき、インストールディレクトリを聞かれるので、/usr/lib(64bitのときはlib64)/php/pear/PEARを指定する。
また、必要に応じて、/usr/lib/php/pearにて、
としてモジュールをインストールする。これにより、/etc/php.iniにinclude_pathが追加される(以下)。
;***** Added by go-pear
include_path=".:/usr/lib/php/pear/PEAR:/usr/lib/php/pear:/usr/share/php/includes"
;*****
インストールされているモジュールは、以下のように確認できる。
[root@fc13-x60 pear]# pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.7 stable
Config 1.10.11 stable
Console_Getopt 1.2.3 stable
HTML_Template_IT 1.3.0 stable
MDB2 2.4.1 stable
MIME_Type 1.2.0 stable
Mail_Mime 1.8.1 stable
PEAR 1.9.1 stable
PEAR_Frontend_Web 0.7.4 beta
Structures_Graph 1.0.3 stable
- CとC++
sunのサイトからjdk-6u21-linux-i586.binをダウンロード。
でアンパッキング。
mv ./jdk1.6.0_21/ /usr/local/
export JAVA_HOME=/usr/local/jdk1.6.0_21 export PATH=$JAVA_HOME/bin:$PATH
この2行を.bashrcに追加。全体に反映したければ、rc.localでもいいかもね。
source /home/tetsuya/.bashrc
で反映。
本家サイトから、eclipse-jee-helios-linux-gtk.tar.gzをダウンロード
tar zxfv eclipse-jee-helios-linux-gtk.tar.gz
mv ./eclipse ../
gnome画面で「パネル」を右クリック、「パネルへ追加」>「カスタム・アプリケーションのランチャ」でeclipseの起動ランチャを追加。
本家サイトから以下の2つをダウンロード。
mecab-0.98.tar.gz
mecab-ipadic-2.7.0-20070801.tar.gz
tar zxfv mecab-0.98.tar.gz
cd mecab-0.98
./configure --prefix=/usr --with-charset=utf8
make
make installtar zxfv mecab-ipadic-2.7.0-20070801.tar.gz
cd mecab-ipadic-2.7.0-20070801
./configure --prefix=/usr --with-charset=utf8
make
make install
make installで以下の場所にインストールされる。
/usr/etc/mecabrc /usr/libexec/mecab /usr/libexec/mecab/mecab-dict-index /usr/libexec/mecab/mecab-system-eval /usr/libexec/mecab/mecab-dict-gen /usr/libexec/mecab/mecab-test-gen /usr/libexec/mecab/mecab-cost-train /usr/bin/mecab /usr/bin/mecab-config /usr/share/man/man1/mecab.1 /usr/lib/mecab /usr/include/mecab.h
実験してみる。
echo "ここで履物をぬいでください" | mecab -Owakati
ここ で 履物 を ぬい で くださいecho "ここではきものをぬいでくださ い" mecab -Owakati
ここ で は きもの を ぬい で ください
1.6.9をソフトウェアの追加で追加。いらないかな。
svnでチェックアウト。
cd senna
./configure --prefix=/usr
はNGでした。
なので、こちらからsenna-1.1.5.tar.gzをダウンロード。
tar zxfv senna-1.1.5.tar.gz
cd senna-1.1.5
./configure --prefix=/usr
make
make install
これにはphp-develが必要
./configure
make
make install
Installing shared extensions: /usr/lib/php/modules/
cd /etc/php.d
vi sen_ctx.ini
でファイルを作成。
extension=sen_ctx.so
とだけ記述して、保存。
httpd restart