
php-5.3.3にGD環境をインストール(tarball configure)
2013年8月25日Apache 設定
- Apacheの最新版、apache-2.4.6をインストール
- APRの入手~インストール
- Apacheのインストール前に実行
$ cd /usr/local/src $ wget http://ftp.meisei-u.ac.jp/mirror/apache/dist//apr/apr-1.4.8.tar.gz $ tar zxf apr-1.4.8.tar.gz $ cd apr-1.4.8 $ ./configure --prefix=/usr/local/httpd-2.4.6/apr-1.4.8 $ sudo make $ sudo make install
- ARP-UTILの入手~インストール
- Apacheのインストール前に実行
$ cd /usr/local/src $ wget http://ftp.meisei-u.ac.jp/mirror/apache/dist//apr/apr-util-1.5.2.tar.gz $ tar zxf apr-util-1.5.2.tar.gz $ cd apr-util-1.5.2 $ ./configure --prefix=/usr/local/httpd-2.4.6/apr-util-1.5.2 --with-apr=/usr/local/httpd-2.4.6/apr-1.4.8 $ sudo make $ sudo make install
- PRCEの入手~インストール
- Apacheのインストール前に実行
$ cd /usr/local/src $ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz $ tar zxf pcre-8.33.tar.gz $ cd pcre-8.33 $ ./configure --prefix=/usr/local/httpd-2.4.6/pcre-8.33 $ sudo make $ sudo make install
- OpenSSLの入手~インストール
- Apacheのインストール前に実行
$ cd /usr/local/src $ wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz $ tar zxf openssl-1.0.1e.tar.gz $ cd openssl-1.0.1e $ ./config --prefix=/usr/local/openssl-1.0.1e $ sudo make $ sudo make install
- Apacheの入手~インストール
- Apacheのインストール
$ cd /usr/local/src $ wget http://ftp.riken.jp/net/apache//httpd/httpd-2.4.6.tar.gz $ cd ../httpd-2.4.6 $ ./configure --prefix=/usr/local/httpd-2.4.6 --enable-so --enable-rewrite=shared --enable-dav=shared --enable-dav-fs=shared --enable-dav-lock=shared --enable-ssl=shared --with-ssl=/usr/local/openssl-1.0.1e --with-apr=/usr/local/httpd-2.4.6/apr-1.4.8 --with-apr-util=/usr/local/httpd-2.4.6/apr-util-1.5.2 --with-pcre=/usr/local/httpd-2.4.6/pcre-8.33 $ sudo make $ sudo make install
- 証明書作成
- 以下で証明書を作成
$ cd /usr/local/httpd-2.4.12 $ sudo openssl genrsa -aes128 1024 > conf/server.key $ sudo openssl req -new -key conf/server.key > conf/server.csr Enter pass phrase for serverkey: You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value,</li> </ul></li> </ul> <h2>If you enter '.', the field will be left blank.</h2> Country Name (2 letter code) [XX]:JP State or Province Name (full name) []:【都道府県】 Locality Name (eg, city) [Default City]:【市町村】 Organization Name (eg, company) [Default Company Ltd]:【団体名】 Organizational Unit Name (eg, section) []:【組織名】 Common Name (eg, your name or your server's hostname) []:【ホスト名】 Email Address []:【メールアドレス】 Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: $ sudo openssl x509 -in conf/server.csr -days 3650 -req -signkey conf/server.key > conf/server.crt $ sudo ./bin/apachectl restart $ sudo mv conf/server.key conf/server.key.back $ sudo openssl rsa -in conf/server.key.back > conf/server.key $ sudo ./bin/apachectl restart
PHP設定
- libxml2の入手~インストール
- GDのインストール前に実行
$ cd /usr/local/src $ wget http://xmlsoft.org/sources/libxml2-2.9.0.tar.gz $ tar zxf libxml2-2.9.0.tar.gz $ cd libxml2-2.9.0 $ ./configure --prefix=/usr/local/libxml2-2.9.0 $ sudo make $ sudo make install
- GDのインストール前に実行
- zlibの入手~インストール
- GDのインストール前に実行
$ cd /usr/local/src/ $ wget http://zlib.net/zlib-1.2.8.tar.gz $ tar zxf zlib-1.2.8.tar.gz $ cd zlib-1.2.8 $ ./configure --prefix=/usr/local/zlib-1.2.8 $ sudo make $ sudo make install
- GDのインストール前に実行
- libjpegの入手~インストール
- GDのインストール前に実行
$ cd /usr/local/src $ wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz $ tar zxf jpegsrc.v8d.tar.gz $ cd jpeg-8d/ $ ./configure --prefix=/usr/local/jpeg-8d --enable-shared $ sudo make && make install</li> <li>libxml2の入手~インストール</li> <li>PHPのインストール前に実行 $ cd /usr/local/src $ wget ftp://gd.tuwien.ac.at/pub/libxml/libxml2-sources-2.9.0.tar.gz $ tar zxf libxml2-sources-2.9.0.tar.gz $ cd libxml2-2.9.0 $ ./configure --prefix=/usr/local/libxml2-2.9.0/ $ sudo make && make install</li> </ul></li> <li>libxsltの入手~インストール <ul> <li>GDのインストール前に実行 $ cd /usr/local/src $ wget ftp://xmlsoft.org/libxslt/libxslt-1.1.28.tar.gz $ tar zxf libxslt-1.1.28.tar.gz $ cd libxslt-1.1.28 $ ./configure --prefix=/usr/local/libxslt-1.1.28 --with-libxml-prefix=/usr/local/libxml2-2.9.0 $ sudo make $ sudo make install
- GDのインストール前に実行
- libpngの入手~インストール
- GDのインストール前に実行
$ cd /usr/loca/src $ wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.3.tar.gz?download 1767 tar zxf libpng-1.6.3.tar.gz $ cd libpng-1.6.3 $ ./configure --prefix=/usr/local/libpng-1.6.3 $ sudo make $ sudo make install
- GDのインストール前に実行
- freetypeの入手~インストール
- GDのインストール前に実行
$ cd /usr/local/src $ wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.1.tar.gz $ tar zxf freetype-2.5.0.1.tar.gz $ cd freetype-2.5.0.1 $ ./configure --prefix=/usr/local/freetype-2.5.0.1 $ make && make install
- libXpm-develのインストール
- yumを利用
$ sudo yum install -y libXpm-devel
- libxml2-develのインストール
- yumを利用
$ sudo yum install libxml2-devel
- freetypeのインストール
- yumを利用
$ sudo yum install -y freetype freetype-devel
- libXfontのインストール
- yumを利用
$ sudo yum install libXfont libXfont-devel
- libvpxのインストール
- yumを利用
$ sudo yum install libvpx libvpx-devel
- libtiffのインストール
- yumを利用
$ sudo yum install libtiff libtiff-devel
- fontconfigのインストール
- yumを利用
$ sudo yum install fontconfig fontconfig-devel
- GDの入手~インストール
- PHPのインストール前に実行
$ cd /usr/local/src/ $ wget https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz $ tar zxf libgd-2.1.0.tar.gz $ cd libgd-2.1.0 $ ./configure --prefix=/usr/local/libgd-2.1.0 --with-png=/usr/local/libpng-1.6.3 --with-jpeg=/usr/local/jpeg-8d --with-freetype=/usr/local/freetype-2.5.0.1 --without-vpx $ sudo make $ sudo make install
- PHPの入手~インストール
- PHPのインストール
$ cd /usr/local/src $ wget http://jp2.php.net/get/php-5.5.3.tar.gz/from/jp1.php.net/mirror $ tar zxf php-5.5.3.tar.gz $ cd php-5.3.3 $ ./configure --disable-dba --disable-debug --disable-dom --disable-fileinfo --disable-json --disable-pdo --disable-phar --disable-posix --disable-rpath --disable-sysvmsg --disable-sysvsem --disable-sysvshm --disable-wddx --disable-xmlreader --disable-xmlwriter --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-shmop --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-ucd-snmp-hack --enable-xml --mandir=/usr/share/man --prefix=/usr/local/php-5.5.3 --with-apxs2=/usr/local/httpd-2.4.6/bin/apxs --with-freetype-dir=/usr/local/freetype-2.5.0.1 --with-gd=/usr/local/libgd-2.1.0 --with-gettext --with-iconv --with-jpeg-dir=/usr/local/jpeg-8d --with-kerberos --with-layout=GNU --with-libxml-dir=/usr/local/libxml2-2.9.0 --with-mysql --with-openssl --with-pcre-regex=/usr/local/httpd-2.4.6/pcre-8.33 --with-pear --with-pgsql --with-pic --with-png-dir=/usr/local/libpng-1.6.3 --with-system-tzdata --with-zlib-dir=/usr/local/zlib-1.2.8 --without-curl --without-gdbm --without-pspell --without-sqlite --without-sqlite3 --without-unixODBC --enable-opcache=no $ sudo make $ sudo make test $ make install
- GDのインストール前に実行
- 最後に
- Apacheやphp設定を行って完了
- 本当は、yumを使わずに対応したかったけど、compileエラーが頻発したので、やむなくyumを利用
- libxml2の入手~インストール
- 以下で証明書を作成