2014/05/29(木)ubuntuインストール (apache, php)

sudo apt-get install apache2
sudo a2enmod userdir
sudo a2enmod include
sudo a2enmod cgi

/etc/apache2/sites-available/000-default.conf を適当な名前 (custom.confとした) でコピーして、
<IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root
        <Directory /home/*/public_html>
               (ここは各自違うと思う)
        </Directory>
</IfModule>

<IfModule mod_mime.c>
AddHandler cgi-script .cgi
</IfModule>
を(<VirtualHost *:80> </VirtualHost>の中に)加える。

public_html以下の設定は、ユーザを最大限信用するなら、例えば、
                AllowOverride All
                Options All
                Order allow,deny
                Allow from all
のような感じ。

sudo a2dissite 000-default
sudo a2ensite custom
sudo service apache2 restart

さらに、自分の好みで、public_html以下に置いたcgiはそのディレクトリのユーザの権限で
動くようにする、suexecを設定。

sudo apt-get install apache2-suexec-custom
/etc/apache2/suexec/www-data の2行目を、public_html/cgi-bin →public_html に。
sudo a2enmod suexec
sudo service apache2 restart

最後にphpの設定。

sudo apt-get install php5
/etc/apache2/mods-available/php5.conf で、
php_admin_value engine Off をコメントアウトする。
sudo service apache2 restart

2014/05/29(木)ubuntuインストール (samba)

sambaでwindowsとのファイル共有設定。

sudo apt-get install samba
sudo apt-get install libpam-smbpass

これで、適当なフォルダを右クリックで共有設定ができるようになる。

homeを恒久的に共有するために、/etc/samba/smb.conf で、
;[homes]
;   comment = Home Directories
;   browseable = no
のコメントを外し、
;   read only = yes

   read only = no
に。
sudo service smbd restart

2014/05/29(木)ubuntuインストール (プログラミング系)

プログラミングで使うツールをいろいろ入れる。

[c++]
sudo apt-get install build-essential
sudo apt-get install libboost-all-dev

[Java]
sudo apt-get install default-jdk
sudo apt-get install icedtea-plugin

[lua]
sudo apt-get install lua5.2
sudo apt-get install liblua5.2-dev
sudo apt-get install luajit

[その他]
sudo apt-get install python-dev
sudo-apt-get install gfortran
sudo apt-get install libblas-dev
sudo apt-get install libblas-doc
sudo apt-get install liblapack-dev
sudo apt-get install liblapack-doc
sudo apt-get install python-numpy
sudo apt-get install python-numpy-doc
sudo apt-get install python-scipy
sudo apt-get install python-matplotlib
sudo apt-get install python-matplotlib-doc
sudo apt-get install ipython
sudo apt-get install ipython-doc
sudo apt-get install r-recommended
sudo apt-get install git

[-m32で32bitバイナリを作る]
sudo apt-get install gcc-multilib
sudo apt-get install g++-multilib

2014/05/29(木)ubuntuインストール (vim)

vi大好きなのでvimを使う。

sudo apt-get install vim

/etc/vim/vimrc.local を、
set encoding=utf-8
set fileencodings=euc-jp,sjis,iso-2022-jp,utf-8
colorscheme ron
set ambiwidth=double
の内容で作成。
最後の行の設定で、gnome-terminal上で○や→の幅がおかしくなる現象が直る。

2014/05/28(水)ubuntuインストール (TeX関連)

ubuntuのTeX関連のインストールメモ。

10.04と違って、ちゃんとUTF8でtexソースを書くようになった。

sudo apt-get install texlive-lang-cjk
sudo apt-get install texlive-fonts-recommended
sudo apt-get install texlive-fonts-extra
sudo apt-get install xdvik-ja
sudo apt-get install dvipsk-ja
sudo apt-get install gv

pdfを見るのに、acroreadはパッケージになく、evinceかfirefoxの内蔵ビューアを使うことにする。ところが、明朝になるべきところがゴシックになってしまう問題あり。そこで、 /etc/fonts/local.conf を
<fontconfig>
<match target="pattern">
    <test qual="any" name="family">
        <string>Ryumin</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
        <string>IPAexMincho</string>
    </edit>
</match>
<match target="pattern">
    <test qual="any" name="family">
        <string>GothicBBB Medium Identity H</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
        <string>IPAexGothic</string>
    </edit>
</match>
</fontconfig>
の内容で作成。

更に、文書作成関連として、

sudo apt-get install nkf
sudo apt-get install gnuplot
sudo apt-get install gnuplot-x11
sudo apt-get install gnuplot-doc
sudo apt-get install tgif
sudo apt-get install gimp
sudo apt-get install inkscape
sudo apt-get install mimetex
sudo apt-get install latexdiff

あたりを。
OK キャンセル 確認 その他