Created
July 5, 2012 04:13
-
-
Save pjxiao/3051286 to your computer and use it in GitHub Desktop.
Install apache + MySQL + PHP5 on Cygwin 1.7.15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ローカルの開発環境を新規開発のサーバと合わせたかったので、ローカルにそれぞれをビルドしてインストールするメモ。 | |
Apache | |
リモート側のコンパイルオプションを確認して、ビルド・インストール。 | |
$ ./configure --hogehoge=fugafuga | |
$ make | |
$ make install | |
ビルド時に特に問題は発生せず。 | |
$ /usr/sbin/apachectl start | |
/usr/sbin/apachectl start: httpd started | |
$ ps ax | grep httpd | |
7856 2428 2428 7856 pty1 14300 10:23:17 /usr/sbin/httpd | |
7788 2428 2428 7788 pty1 14300 10:23:17 /usr/sbin/httpd | |
6928 2428 2428 6928 pty1 14300 10:23:17 /usr/sbin/httpd | |
4816 2428 2428 4816 pty1 14300 10:23:17 /usr/sbin/httpd | |
916 2428 2428 916 pty1 14300 10:23:17 /usr/sbin/httpd | |
2428 1 2428 2428 pty1 14300 10:23:16 /usr/sbin/httpd | |
$ /usr/sbin/apachectl stop | |
/usr/sbin/apachectl stop: httpd stopped | |
MySQL | |
ビルドは挫折。情報がすくないし、Cygwin はサポート外orz | |
インストーラを使って、ビルドオプションで指定されたものと同じところにインストール | |
C:\cygwin\PATH\mysql\ | |
みたいな感じ。 | |
(http://sonson.jp/?p=106) | |
インストーラには書き込み権限がないっぽいので、 | |
あらかじめインストール先に mysql ディレクトリを作成してパーミッションを変更しておく。 | |
インストール後、MySQL Server Instance Configuration Wizard が起動するので、適宜設定を変更する。 | |
で設定を実行。しようとすると「応答なし」になる。 | |
再インストールすればいいとか、/mysql/data/ 下にエラーログがあるみたいだけど、だるいしエラーログもでてない。 | |
なんとなく /mysql/bin/ をのぞいたらさっきの設定ツール(MySQLInstanceConfig.exe)がいたので、直接実行。なぜか設定完了。 | |
あとは、Cygwin から | |
$ mysql | |
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql.sock' (2) | |
ksg!! っとここで、-hlocalhost だとつながらないよーみたいな話をどっかできいたのを思い出す。 | |
$ mysql -h127.0.0.1 | |
ERROR 1045 (28000): Access denied for user 'bokunonamae'@'localhost' (using password: NO) | |
とでたので、ユーザ名とパスワードをしていしてやって | |
$ mysql -h127.0.0.1 -uroot -pPASSWRD | |
mysql: Unknown OS character set 'CP932'. | |
mysql: Switching to the default character set 'latin1'. | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 8 | |
Server version: 5.0.96-community-nt MySQL Community Edition (GPL) | |
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. | |
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. | |
mysql> | |
いけた。文字コード回りでなんかエラー吐いてるけどとりあえず MySQL はこれで。 | |
あと、以下にビルドしようと(して挫折)したときにやったこと | |
リモートのコンパイルオプションを確認 | |
$ string /PATH/mysqlbug | grep config | |
コンパイルオプション | |
--with-mysqld-user を自分の アカウント名に変更 | |
--without-readline オプションを追加 | |
(http://d.hatena.ne.jp/htada/20111205/1323109003) | |
だるくなってきた。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment