2010年12月3日金曜日

media wiki install in Ubuntu Desktop

英語の読める人は、ここを参考にすればよい

http://www.mediawiki.org/wiki/Manual:Installing_MediaWiki_on_Ubuntu_via_GUI_and_Synaptic

以下のMediaWikiのインストール方法は、Ubuntu Karmic (9.10)用に作成されていいるそうだ。
この時の、UbuntuのSynapticに入っているバージョンは MediaWiki 1.15. だったそうだ。

ちなみに僕がインストールした時はこんな感じ。
MediaWiki 1.15.1
Ubuntu 10.10 (wubi経由)
PHP 5.3.2-1ubuntu4.5 installed
Connected to mysql 5.1.41-3ubuntu12.7; enabling MySQL 4.1/5.0 charset mode

サーバー版へのインストール方を知りたい人は、こっちをよんでくれ。

んじゃ、インストールを始めよう。

1. メニュー:システム/システム管理/Synaptic パッケージ・マネージャー(もちろん自分の(sudoの)パスワードを入れて入る)
2. mediawiki と mysql-admin を検索してチェックを入れてくれ(Apache & PHP はmediawiki に入っているから気にするな)
3. 適用をクリック
4. MySQLがrootパスワードを求めてきたら入れてやってくれ

[edit] Set URL alias of MediaWiki and server name for Apache

This section assumes you want your wiki's URL to be http://localhost/mediawiki. If this is not what you want, change "localhost" to your preferred server name and "mediawiki" to your preferred URL alias in the following instructions.

First we have to set the server name for your new Apache server.

1. アプリケーション/アクセサリ/端末 を開いて次のコマンドを入れてくれ:

gksudo gedit /etc/apache2/httpd.conf
オマセチャンはgedit を gvim か emacs にすると楽しいぞ。(楽しくなかった奴は身の程を知れ)

gksudo を使う理由:GUI に対する sudo
http://www.psychocats.net/ubuntu/graphicalsudo
http://wat-ubuntu-game.blogspot.com/2010/08/guigksudo.html

2. どうだ頭が真っ白になったか?大丈夫。元々何にも入ってない。次の文字(スクリプト)を入力してくれ:

ServerName localhost
localhost の所は、omaehaahoka でも何でもいいぞ。俺はそんなの知らんから、以下のlocalhostの所を自分で書き換えといてくれ。

3. もちろん、記録してから閉ろよな。

(more here)

Next you have to set the URL alias of the MediaWiki installation.

1. Menu: Applications → Accessories → Terminal
2. Run the following command to open Apache configuration file:

gksudo gedit /etc/mediawiki/apache.conf

3. Remove the '#' on the third line so that line reads:

Alias /mediawiki /var/lib/mediawiki

(You can replace /mediawiki with any alias you want, such as /mywiki)
[edit] Restart Apache service

Apache has to be restarted to read the changed configuration files.

Run in Terminal:

sudo /etc/init.d/apache2 restart

そしたらこんな事言い返してくるので、華麗にスルーしてくれ
* Restarting web server apache2 ... waiting [ OK ]

Or from Gnome Desktop GUI:

1. Menu: System → Administration → Services
2. Uncheck and re-check the checkbox next to Web server (Apache2)

Configure your wiki

1. Open web browser and navigate to: http://localhost/mediawiki (if you changed the server name or URL alias in previous section, change the URL accordingly)
2. Click "set up the wiki" link.
3. For "Wiki name", you can choose any name (but not "MediaWiki") unless this installation is for a pre-existing MediaWiki instance, in which case use the same 'Wiki name' as the previous installation.
4. "Contact e-mail", "Language", "Copyright/license", "Admin username" can be left unchanged.
5. You will have to enter a password for the wiki administrator (default username 'WikiSysop'), and enter it again to confirm.
6. "Shared memory cacheing", "Memcached servers": leave unchanged.
7. "E-mail features (global)" - set to "Disabled" unless you plan to use MediaWiki's e-mail features.
8. "User-to-user e-mail", "E-mail notification about changes", "E-mail address authentication", "Database type", "Database host": leave unchanged.
9. "Database name", "DB username": leave unchanged to allow MediaWiki to create a user for accessing the wiki database, unless you have already used MySQL Administrator to create a database and user for MediaWiki.
10. "DB password", "DB password confirm": Enter password for the wiki database user twice. Warning: This password will be stored in plain text in LocalSettings.php!
11. To let MediaWiki create the wiki database and database user, click the "Use superuser account" checkbox and enter the MySQL superuser name and password.
12. Click 'Install MediaWiki!' button.

Move LocalSettings.php
Run in Terminal:
sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/


math パッケージがインストールできていないらしい。
Synaptic から後付けでmediawiki-mathをインストールした。

インストールした後で、LocalSettings.php(デフォルトでは/etc/mediawiki)でインラインのLaTeX数式を有効にします:

$wgUseTeX = true;

詳しくはここ

もう一度
localhost/mediawiki
に行くと、自動的にメインページに転送される。

2010年10月16日土曜日

pyxplot install

apt-get install fftw3-dev gcc gs gv imagemagick libc6-dev libcfitsio3-dev libgsl0-dev libkpathsea-dev libpng12-dev libreadline5-dev libxml2-dev make texlive-latex-extra texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended wget zlib1g-dev

tar xvfz pyxplot_0.8.3.tar.gz
cd pyxplot-0.8.x/
./configure
make
make install

E: ロックファイル /var/lib/dpkg/lock をオープンできません - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Ubuntu Linuxのルートパスワード
Ubuntu LinuxではOSのインストール時には管理者であるルート(root)のパスワードは設定されていない。

管理者(root)権限でコマンドを実行する際にはsudoコマンドを用いる必要がある。
sudoを用いた場合コマンドを実行する前にパスワードを要求されるが、このパスワードはインストール時に作成した現在ログイン中のユーザのパスワードを入力しなければならない。

※GUIベースでsudoを使用したい場合にはgksudoを用いればよい。

また、この状態ではsuコマンドでrootにはなれい。
(su: Authentication failureと表示されて拒否される)

suコマンドでrootになる場合にはrootのパスワードを作成する必要がある。

パスワードの作成は以下の方法で可能
[コマンド]
$ sudo su -
# passwd
http://80286.blog62.fc2.com/blog-entry-17.html#

sudo su -

apt-get install fftw3-dev gcc gs gv imagemagick libc6-dev libcfitsio3-dev libgsl0-dev libkpathsea-dev libpng12-dev libreadline5-dev libxml2-dev make texlive-latex-extra texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended wget zlib1g-dev

アップグレード: 0 個、新規インストール: 22 個、削除: 0 個、保留: 0 個。
326MB のアーカイブを取得する必要があります。
この操作後に追加で 607MB のディスク容量が消費されます。
続行しますか [Y/n]? Y

root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3# ./configure
Checking for latex ............. YES
Checking for ImageMagick convert............ YES
Checking for sed ............. YES
Checking for gunzip ............. YES
Checking for wget ............. YES
Checking for ghostscript ............. YES
Checking for ghostview ............. YES (gv, double hyphen options)
Checking for ggv ............. NO
Checking for GNU make ............. YES (make)
Checking for gcc ............. YES
Checking for libreadline-dev ............. YES
Checking for libcfitsio-dev ............. YES
Checking for libgsl0-dev ............. YES
Checking version of libgsl0-dev ............ YES
Checking for libfftw3-dev ............. YES
Checking for gunzip ............. YES
Checking for libxml2-dev ............. YES
Checking for libpng-dev ............. YES
Checking for libkpathsea-dev ............. YES
Configuration successful.
To continue installation, type 'make'.

Installation as User
root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3#make
root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3#./bin/pyxplot

root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3# ./bin/pyxplot

____ __ ______ _ _ PYXPLOT
| _ \ _ _\ \/ / _ \| | ___ | |_ Version 0.8.3
| |_) | | | |\ /| |_) | |/ _ \| __| 15/09/2010
| __/| |_| |/ \| __/| | (_) | |_
|_| \__, /_/\_\_| |_|\___/ \__| Copyright (C) 2006-2010 Dominic Ford
|___/ 2008-2010 Ross Church
2010 Zoltan Voros

Send comments, bug reports, feature requests and coffee supplies to:


pyxplot>


System-wide Installation
root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3#make install
root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3#pyxplot


root@ubuntu:/home/netbookny/ダウンロード/pyxplot-0.8.3# pyxplot

____ __ ______ _ _ PYXPLOT
| _ \ _ _\ \/ / _ \| | ___ | |_ Version 0.8.3
| |_) | | | |\ /| |_) | |/ _ \| __| 15/09/2010
| __/| |_| |/ \| __/| | (_) | |_
|_| \__, /_/\_\_| |_|\___/ \__| Copyright (C) 2006-2010 Dominic Ford
|___/ 2008-2010 Ross Church
2010 Zoltan Voros

Send comments, bug reports, feature requests and coffee supplies to:


pyxplot>