mac osx 10.8に手動でapacheを入れようとしたら失敗した
Mac osx 10.8に手動でapache2.2.25をいれてみました。
macにはもともとapcheは入ってるんですが、まあ勉強がてらということで。
てことで、まずgccを確認
$ gcc -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
apacheのサイトからUnix Source: httpd-2.2.25.tar.gz をダウンロードし解凍
$ tar zxvf httpd-2.2.25.tar.gz
ここから先でつまずいたんですが、./configureをしようとすると、errorがでてしまうんですね。
$ ./configure checking for chosen layout... Apache checking for working mkdir -p... yes checking build system type... x86_64-apple-darwin12.4.0 checking host system type... x86_64-apple-darwin12.4.0 checking target system type... x86_64-apple-darwin12.4.0 Configuring Apache Portable Runtime library ... checking for APR... yes setting CC to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc" setting CPP to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -E" setting CFLAGS to " " setting CPPFLAGS to " -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" setting LDFLAGS to " " Configuring Apache Portable Runtime Utility library... checking for APR-util... yes checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc checking whether the C compiler works... no configure: error: in `/usr/local/httpd-2.2.25': configure: error: C compiler cannot create executables See `config.log' for more details
1時間エラーログとか見ながら悩んだんですが、解決しました。
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/
って書いてありますけど、実際は
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/
でした。
なんで、
$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
で解決!
後はmakeしてmake intallで完了。
一件落着。(初心者には辛い。
DBでauto_incrementしたidに初期値を設定する
研修中に作ったDBのid番号が気いらなかったのか、「これって1000番からはじめられませんか?」といわれたので
調べてみたらいっぱいあったので覚書。
mysqlにて
create table testtable (id int auto_increment = 1000, name varchar(10));
ただ使い道があまりわかっていない。
refineryをインストールしてみた
refineryをインストールしたので覚書
gemをインストール
$ gem install refinerycms
$ refinerycms <サイトの名前>
$ cd <サイトの名前>
$ rails s
ブラウザでlocalhost:3000で確認
ぶろぐはじめました。
冷やし中華はじめました感覚でブログをはじめました。
よろしくお願いします。