[root]# gzip -d httpd-2.0.50.tar.gz [root]# tar xvf httpd-2.0.50.tar |
[root]# configure --enable-info --enable-logio --enable-log-config --enable-so |
[root]# make |
[root]# httpd -k stop |
[root]# make install |
[root]# httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_logio.c mod_env.c mod_setenvif.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_info.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_so.c [root]# |
[root]# ls -l -rw-r--r-- 1 root root 10876811 Aug 21 16:39 MySQL-3.23.53-0vl2.src.rpm [root]# rpm --rebuild MySQL-3.23.53-0vl2.src.rpm MySQL-3.23.53-0vl2.src.rpm をインストール中 実行中(%prep): /bin/sh -e /var/tmp/rpm-tmp.27217 + umask 022 + cd /root/rpm/BUILD + cd /root/rpm/BUILD + rm -rf mysql-3.23.53 + tar -xvvf - + /bin/gzip -dc /root/rpm/SOURCES/mysql-3.23.53.tar.gz drwxrwxrwx 503/100 0 2002-10-10 19:27:36 mysql-3.23.53/ 以下省略 |
[root]# pwd /root/rpm/RPMS/i386 [root]# ls -l 合計 12314 -rw-r--r-- 1 root root 7277191 Aug 21 17:16 MySQL-3.23.53-0vl2.i386.rpm -rw-r--r-- 1 root root 1427512 Aug 21 17:16 MySQL-Max-3.23.53-0vl2.i386.rpm -rw-r--r-- 1 root root 717585 Aug 21 17:16 MySQL-bench-3.23.53-0vl2.i386.rpm -rw-r--r-- 1 root root 2150158 Aug 21 17:16 MySQL-client-3.23.53-0vl2.i386.rpm -rw-r--r-- 1 root root 731848 Aug 21 17:16 MySQL-devel-3.23.53-0vl2.i386.rpm -rw-r--r-- 1 root root 246291 Aug 21 17:16 MySQL-shared-3.23.53-0vl2.i386.rpm [root]# rpm -Uvh MySQL-*.rpm MySQL ################################################## Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables 040821 17:21:53 /usr/sbin/mysqld: Shutdown Complete PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h vine1 password 'new-password' See the manual for more instructions. Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com Starting mysqld daemon with databases from /var/lib/mysql MySQL-Max ################################################## 040821 17:21:55 mysqld ended Giving mysqld a couple of seconds to restart Starting mysqld-max daemon with databases from /var/lib/mysql MySQL-bench ################################################## MySQL-client ################################################## MySQL-devel ################################################## MySQL-shared ################################################## [root]# |
[root]# /usr/bin/mysqladmin -u root password 'hogehoge' [root]# mysql -u root -p Enter password: hogehoge <== 先ほど設定したパスワードでログイン Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 3.23.53-Max Connection id: 2 (Can be used with mysqladmin kill) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select host,user,password from mysql.user; +-----------+------+------------------+ | host | user | password | +-----------+------+------------------+ | localhost | root | hogehogeの hash?| | vine1 | root | | | localhost | | | <== 下 2個の user名未設定の | vine1 | | | <== userは不要なので削除する +-----------+------+------------------+ 4 rows in set (0.00 sec) mysql> delete from mysql.user where user=""; Query OK, 2 rows affected (0.00 sec) mysql> select host,user,password from mysql.user; +-----------+------+------------------+ | host | user | password | +-----------+------+------------------+ | localhost | root | hogehogeの hash?| | vine1 | root | | +-----------+------+------------------+ 2 rows in set (0.00 sec) mysql> exit Bye [root]# |
[root]# chkconfig --list mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
[root]# gzip -d PHP-4.3.8.tar.gz [root]# tar xvf PHP-4.3.8.tar 以下略 |
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2) Character set '#12' is not a compiled character set and is not specified in the 'NONEXISTENT/charsets/Index' file |
[root]# cd /usr/local [root]# mkdir mysql [root]# cd mysql [root]# ln -s /usr/include/mysql/ include [root]# ln -s /usr/lib/mysql/ lib |
[root]# configure \ >--with-apxs2=/usr/local/apache2/bin/apxs \ >--enable-zend-multibyte \ >--with-mysql=/usr/local/mysql \ >--enable-track-vars \ >--enable-mbstring \ >--enable-mbregex \ >--with-png-dir=/usr/local/lib \ >--with-jpeg-dir=/usr/local/lib \ >--with-zlib-dir=/usr/local/lib >--with-zlib \ >--with-gd |
--with-apxs2=/usr/local/apache2/bin/apxs | apache2 Extension Toolの指定(と思います。既に apxsは存在してました) |
--enable-zend-multibyte | Shift_JISを使えるようにする |
--with-mysql=/usr/local/mysql | MySQLを /usr/local/binディレクトリーに指定 |
--enable-track-vars | フォームからの入力とCookieからの入力が簡単な記述で受け取れるようになる |
--enable-mbstring | 2バイト文字を有効にする。必須。 |
--enable-mbregex | マルチバイト正規表現を有効にする。必須。 |
--with-png-dir=/usr/local/lib | PNG画像作成用ライブラリの指定 |
--with-jpeg-dir=/usr/local/lib | JPEG画像作成用ライブラリの指定 |
--with-zlib-dir=/usr/local/lib | zlibの場所を指定 |
--with-zlib | zlibを有効にする |
--with-gd | グラフィックライブラリーを有効にする |
[root]# make |
ext/ctype/ctype.lo: file not recognized: File truncated collect2: ld returned 1 exit status make: *** [libphp4.la] エラー 1 [root]# make clean find . -name \*.lo | xargs rm -f find . -name \*.o | xargs rm -f find . -name \*.la | xargs rm -f find . -name \*.a | xargs rm -f find . -name \*.so | xargs rm -f find . -name .libs -a -type d|xargs rm -rf rm -f libphp4.la sapi/cli/php libphp4.la modules/* libs/* |
[root]# make install Installing PHP SAPI module: apache2handler /usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la /usr/local/apache2/modules /usr/local/apache2/build/libtool --mode=install cp libphp4.la /usr/local/apache2/modules/ cp .libs/libphp4.so /usr/local/apache2/modules/libphp4.so cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la libtool: install: warning: remember to run `libtool --finish /tmp/php-4.3.8/libs' chmod 755 /usr/local/apache2/modules/libphp4.so [activating module `php4' in /usr/local/apache2/conf/httpd.conf] Installing PHP CLI binary: /usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar - already installed: 1.1 [PEAR] Console_Getopt - already installed: 1.2 [PEAR] PEAR - already installed: 1.3.2 Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path [PEAR] DB - already installed: 1.6.2 [PEAR] HTTP - already installed: 1.2.2 [PEAR] Mail - already installed: 1.1.3 [PEAR] Net_SMTP - already installed: 1.2.3 [PEAR] Net_Socket - already installed: 1.0.1 [PEAR] XML_Parser - already installed: 1.0.1 [PEAR] XML_RPC - already installed: 1.1.0 Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config program: phpextdist [root]# |
LoadModule php4_module modules/libphp4.so |
[root]# cp php.ini-dist /etc/php.ini |
[root]# httpd -k restart |
<?php phpinfo() ?> |