Django1.1 + Ubuntu9.04 + Apache2 +mod_wsgi での環境構築メモ
年末の為に、手順を記す。for me
Ubuntuのいんすこから終了まで目標20分以内
追記:実際にインスコからやってみた時間を計ってみた
Ubuntuインストール | 8分 |
アップデート | 8分 |
インスコsh | 4分 |
ぎりぎり20分という感じ。この程度であれば何回でも出来るな。
パッケージインストール
- zsh
- vim
- openssh-server
- easy_install
- python_all_dev
- apache2
- mod_wsgi
- ntp
- memcached
- django1.1
- mercurial1.3.1
- python_memcache
プロキシーがある場合
export http_proxy=http://proxy.domain.com:8080
一気にインストール
sudo -s
からーの
#!/bin/sh apt-get update apt-get install zsh apt-get install vim apt-get install openssh-server apt-get install python-setuptools apt-get install python-all-dev apt-get install apache2 apt-get install libapache2-mod-wsgi apt-get install ntp apt-get install memcached easy_install django easy_install mercurial mkdir download cd download wget ftp://ftp.tummy.com/pub/python-memcached/old-releases/python-memcached-1.44.tar.gz gunzip python-memcached-1.44.tar.gz tar xvf python-memcached-1.44.tar cd python-memcached-1.44 python setup.py install
5分以内に出来上がるはず。
上記shを、http://bit.ly/djangoinstallに登録したので入れ立てのUbuntuでもネットさえ繋がっていれば、wgetからそのまま行ける。こりゃ便利。
実際にやってみた時の、スクリーンキャストを取ってみた。途中数回Yesを選択する為のエンターが必要であるが、サクサクとインストールは進む。
各種設定
- /etc/sshd/sshd_config
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes