More Related Content
Similar to Lapp環境をソースからインストールする(debian)
Similar to Lapp環境をソースからインストールする(debian) (20)
Lapp環境をソースからインストールする(debian)
- 2. makeに必要なツールのインストール
# apt-get install build-essential
# apt-get install bison flex libxml2-dev zlib1g-dev
libreadline6-dev
# apt-get install vim
#apt-get install sysv-rc-conf
#apt-get install tmux
- 4. Apacheインストール(2)
◎ APR-Utilのインストール
$ wget http://ftp.kddilabs.jp/infosystems/apache//apr/apr-util-1.5.1.tar.bz2
$ tar jxfv apr-util-1.5.1.tar.bz2
$ cd apr-util-1.5.1/
$ ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
$ make
# make install
- 5. Apacheインストール(3)
◎ PCREのインストール
$ wget http://sourceforge.net/projects/pcre/files/pcre/8.32/pcre-8.32.tar.bz2
$ tar jxvf pcre-8.32.tar.bz2
$ cd pcre-8.32/
$ ./configure --prefix=/usr/local/pcre
$ make
# make install
- 6. Apacheインストール(4)
◎ Apaheのインストール
$ wget http://ftp.riken.jp/net/apache//httpd/httpd-2.4.3.tar.bz2
$ tar jxfv httpd-2.4.3.tar.bz2
$ cd httpd-2.4.3/
$ ./configure --prefix=/usr/local/apache --enable-so --enablerewrite --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
--with-pcre=/usr/local/pcre
$ make
# make install
- 7. Apacheインストール(5)
◎ Apache実行用のユーザ、グループ作成
# groupadd apache && useradd -g apache apache
◎ Apache設定ファイルの変更
# cd /usr/local/apache/conf/
# cp httpd.conf httpd.conf.bak
# vi httpd.conf
(155行目) daemon => apache
(156行目) daemon => apache
(186行目)#ServerName www.example.com:80
=> ServerName localhost
- 10. PostgreSQLのインストール(1)
# adduser postgres
# mkdir /usr/local/pgsql
# chown postgres.postgres /usr/local/pgsql
# su – postgres
$ wget http://ftp.postgresql.org/pub/source/v9.2.3/postgresql-9.2.3.tar.bz2
$ tar jxvf postgresql-9.2.3.tar.bz2
$ cd postgresql-9.2.3/
$ ./configure
$ make
$make install
- 11. PostgreSQLのインストール(2)
$ cd ~
$ vi .bashrc
(以下を追記し、保存)
POSTGRES_HOME=/usr/local/pgsql
export PATH="$PATH":/usr/local/pgsql/bin
export PGLIB=$POSTGRES_HOME/lib
export PGDATA=$POSTGRES_HOME/data
export MANPATH="$MANPATH":$POSTGRES_HOME/man
$ source .bashrc
- 12. PostgreSQLのインストール(3)
$ initdb --no-locale --encoding=UNICODE
$ vi /usr/local/pgsql/data/postgresql.conf
(300行目)logging_collector = on
(309行目)log_filename = '%a.log'
(上記のように変更し保存)
$ pg_ctl start
$ psql -l
(これで、データベースの一覧が表示されたらOK)
$pg_ctl stop
(で、停止)
- 14. PHPのインストール(1)
(別途、ソースファイルをダウンロード)
$ tar jxvf php-5.4.11.tar.bz2
$ cd php-5.4.11/
$ ./configure --with-apxs2=/usr/local/apache/bin/apxs --enablembstring --enable-mbregex --with-pgsql --with-zlib
$ make
# make install
# cp php.ini-development /usr/local/lib/php.ini