GHCのインストール
最初にGHC(Glasgow Haskell Compiler)をインストールする、laymanでhaskellを追加しておくvkarimakubo ~ # layman -L vkarimakubo ~ # layman -a haskell ... ... vkarimakubo ~ # emerge -pv ghc ... [ebuild N ~] dev-lang/ghc-7.0.4::gentoo-haskell USE="doc -bash-completion -binary -ghcbootstrap -llvm" 104,062 kB [ebuild N ~] app-admin/haskell-updater-1.2.0.5::gentoo-haskell 23 kB [ebuild N ~] dev-haskell/syb-0.3.6::gentoo-haskell USE="doc -hoogle -hscolour -profile" 38 kB ... vkarimakubo ~ # emerge ghc ...意外と時間がかかるので放置で.....
Yesodのインストール
面倒なので/etc/portage/package.keywordsへ書いておく、エラい多いです
自分で調整したい方は以下のようにやった方がいいと思います。
vkarimakubo ~ # cat /etc/make.conf ... EMERGE_DEFAULT_OPTS="--autounmask=y" ... vkarimakubo ~ # emerge -v1 --autounmask-write =dev-haskell/yesod-0.10.1.3 vkarimakubo ~ # dispatch-ocnf
エイヤァって人は下をpackage.keywordsへコピペしてください
########################### # ghc ########################### dev-lang/ghc ~amd64 dev-haskell/syb ~amd64 ########################### # Yesod ########################### dev-haskell/mmap ~amd64 dev-haskell/haddock ~amd64 dev-haskell/dataenc ~amd64 dev-haskell/monadcatchio-mtl ~amd64 dev-haskell/cabal-install ~amd64 dev-haskell/happy ~amd64 dev-haskell/yesod ~amd64 dev-haskell/wai-logger ~amd64 dev-haskell/unordered-containers ~amd64 dev-haskell/vector ~amd64 dev-haskell/warp ~amd64 dev-haskell/primitive ~amd64 dev-haskell/authenticate ~amd64 dev-haskell/ranges ~amd64 dev-haskell/cookie ~amd64 dev-haskell/shakespeare-js ~amd64 dev-haskell/yesod-auth ~amd64 dev-haskell/yesod-json ~amd64 dev-haskell/puremd5 ~amd64 dev-haskell/xml-conduit ~amd64 dev-haskell/pool-conduit ~amd64 dev-haskell/hamlet ~amd64 dev-haskell/cryptohash ~amd64 dev-haskell/shakespeare-i18n ~amd64 dev-haskell/crypto-pubkey-types ~amd64 dev-haskell/http-conduit ~amd64 dev-haskell/skein ~amd64 dev-haskell/case-insensitive ~amd64 dev-haskell/yesod-form ~amd64 dev-haskell/entropy ~amd64 dev-haskell/cprng-aes ~amd64 dev-haskell/yesod-routes ~amd64 dev-haskell/socks ~amd64 dev-haskell/zlib-conduit ~amd64 dev-haskell/xml-types ~amd64 dev-haskell/yesod-core ~amd64 dev-haskell/tagged ~amd64 dev-haskell/cereal ~amd64 dev-haskell/resource-pool ~amd64 dev-haskell/failure ~amd64 dev-haskell/crypto-api ~amd64 dev-haskell/shakespeare ~amd64 dev-haskell/tls ~amd64 dev-haskell/yesod-persistent ~amd64 dev-haskell/mime-mail ~amd64 dev-haskell/byteorder ~amd64 dev-haskell/enumerator ~amd64 dev-haskell/email-validate ~amd64 dev-haskell/simple-sendfile ~amd64 dev-haskell/semigroups ~amd64 dev-haskell/fast-logger ~amd64 dev-haskell/asn1-data ~amd64 dev-haskell/system-filepath ~amd64 dev-haskell/hashable ~amd64 dev-haskell/attoparsec-enumerator ~amd64 dev-haskell/blaze-builder-conduit ~amd64 dev-haskell/vault ~amd64 dev-haskell/path-pieces ~amd64 dev-haskell/http-types ~amd64 dev-haskell/largeword ~amd64 dev-haskell/cryptocipher ~amd64 dev-haskell/lifted-base ~amd64 dev-haskell/zlib-bindings ~amd64 dev-haskell/wai-extra ~amd64 dev-haskell/shakespeare-text ~amd64 dev-haskell/network-conduit ~amd64 dev-haskell/persistent-template ~amd64 dev-haskell/bytestring-lexing ~amd64 dev-haskell/persistent ~amd64 dev-haskell/data-default ~amd64 dev-haskell/attoparsec-conduit ~amd64 dev-haskell/shakespeare-css ~amd64 dev-haskell/conduit ~amd64 dev-haskell/certificate ~amd64 dev-haskell/clientsession ~amd64 dev-haskell/tls-extra ~amd64 dev-haskell/aeson ~amd64 dev-haskell/wai ~amd64 dev-haskell/pwstore-fast ~amd64 dev-haskell/utf8-light ~amd64 dev-haskell/language-javascript ~amd64 dev-haskell/transformers ~amd64 dev-haskell/blaze-html ~amd64 dev-haskell/blaze-builder ~amd64 dev-haskell/safe ~amd64 dev-haskell/base64-bytestring ~amd64 dev-haskell/base-unicode-symbols ~amd64 dev-haskell/sha ~amd64 dev-haskell/transformers-base ~amd64 dev-haskell/mtl ~amd64 dev-haskell/tagsoup ~amd64 dev-haskell/network ~amd64 dev-haskell/monad-control ~amd64 dev-haskell/text ~amd64 dev-haskell/css-text ~amd64 dev-haskell/deepseq ~amd64 dev-haskell/attoparsec ~amd64 dev-haskell/xss-sanitize ~amd64 dev-haskell/dlist ~amd64 dev-haskell/unix-compat ~amd64 dev-haskell/http ~amd64 dev-haskell/ghc-paths ~amd64 dev-haskell/cabal-dev ~amd64 dev-haskell/tar ~amd64 dev-haskell/language-javascript ~amd64 dev-haskell/random ~amd64 dev-haskell/hjsmin ~amd64 ######################## # haskell postgres ######################## dev-haskell/hdbc-postgresql ~amd64 dev-haskell/hdbc ~amd64 dev-haskell/convertible ~amd64
Yesodをインストールする
vkarimakubo ~ # emerge -pv yesod These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] dev-haskell/cabal-1.10.2.0::gentoo-haskell USE="-doc -profile" 251 kB [ebuild N ~] dev-haskell/transformers-0.2.2.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 17 kB [ebuild N ] dev-haskell/time-1.2.0.3::gentoo-haskell USE="-doc -hscolour -profile" 84 kB [ebuild N ~] dev-haskell/cereal-0.3.5.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 22 kB [ebuild N ] dev-haskell/parsec-2.1.0.1::gentoo-haskell USE="-doc -profile" 16 kB [ebuild N ~] dev-haskell/deepseq-1.1.0.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/base64-bytestring-0.1.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 6 kB [ebuild N ~] dev-haskell/failure-0.2.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 2 kB [ebuild N ~] dev-haskell/unix-compat-0.3.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 13 kB [ebuild N ~] dev-haskell/primitive-0.4.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 9 kB [ebuild N ~] dev-haskell/entropy-0.2.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ] dev-haskell/utf8-string-0.3.6 USE="-doc -profile" 9 kB [ebuild N ] dev-haskell/binary-0.5.0.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 41 kB [ebuild N ~] dev-haskell/base-unicode-symbols-0.2.2.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ~] dev-haskell/largeword-1.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 2 kB [ebuild N ~] dev-haskell/semigroups-0.8::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 9 kB [ebuild N ~] dev-haskell/dlist-0.5::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ] dev-haskell/stm-2.1.2.2::gentoo-haskell USE="-doc -profile" 6 kB [ebuild N ] dev-haskell/zlib-0.5.3.1 USE="-doc -hscolour -profile" 123 kB [ebuild N ~] dev-haskell/ranges-0.2.4::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 3 kB [ebuild N ] dev-haskell/alex-2.3.5::gentoo-haskell USE="-doc" 78 kB [ebuild N ~] dev-haskell/vault-0.1.0.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/safe-0.3.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 5 kB [ebuild N ~] dev-haskell/byteorder-1.0.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 2 kB [ebuild N ] dev-haskell/ansi-terminal-0.5.5::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 13 kB [ebuild N ~] dev-haskell/text-0.11.1.13-r1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 118 kB [ebuild N ~] dev-haskell/network-2.3.0.11::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 131 kB [ebuild N ~] dev-haskell/vector-0.9.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 103 kB [ebuild N ~] dev-haskell/mtl-2.0.1.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 14 kB [ebuild N ~] dev-haskell/transformers-base-0.4.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 3 kB [ebuild N ~] dev-haskell/data-default-0.3.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 2 kB [ebuild N ~] dev-haskell/sha-1.5.0.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 2,651 kB [ebuild N ~] dev-haskell/zlib-bindings-0.0.3.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 53 kB [ebuild N ~] dev-haskell/email-validate-0.2.8::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ~] dev-haskell/random-1.0.1.1::gentoo-haskell USE="-profile" 9 kB [ebuild N ~] dev-haskell/bytestring-lexing-0.4.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 15 kB [ebuild N ~] dev-haskell/blaze-builder-0.3.1.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 67 kB [ebuild N ~] dev-haskell/attoparsec-0.10.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 29 kB [ebuild N ~] dev-haskell/monad-control-0.3.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 11 kB [ebuild N ~] dev-haskell/tagged-0.2.3.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/shakespeare-0.11::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 8 kB [ebuild N ~] dev-haskell/hashable-1.1.2.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 9 kB [ebuild N ~] dev-haskell/path-pieces-0.1.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 3 kB [ebuild N ~] dev-haskell/tagsoup-0.12.6::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 30 kB [ebuild N ~] dev-haskell/enumerator-0.4.18::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 53 kB [ebuild N ] dev-haskell/regex-base-0.93.1::gentoo-haskell USE="-doc -profile" 9 kB [ebuild N ~] dev-haskell/xml-types-0.3.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/system-filepath-0.4.6::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 14 kB [ebuild N ~] dev-haskell/socks-0.4.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ~] dev-haskell/simple-sendfile-0.2.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/crypto-api-0.9::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 44 kB [ebuild N ~] dev-haskell/lifted-base-0.1.0.3-r1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 9 kB [ebuild N ~] dev-haskell/case-insensitive-0.4.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/blaze-html-0.4.3.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 69 kB [ebuild N ~] dev-haskell/shakespeare-css-0.10.8::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 14 kB [ebuild N ~] dev-haskell/shakespeare-js-0.11.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 7 kB [ebuild N ~] dev-haskell/fast-logger-0.0.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/unordered-containers-0.1.4.6::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 18 kB [ebuild N ~] dev-haskell/cookie-0.4.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/yesod-routes-0.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 13 kB [ebuild N ~] dev-haskell/shakespeare-text-0.11::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 5 kB [ebuild N ~] dev-haskell/mime-mail-0.4.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ~] dev-haskell/resource-pool-0.2.1.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 5 kB [ebuild N ~] dev-haskell/attoparsec-enumerator-0.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 3 kB [ebuild N ] dev-haskell/regex-posix-0.94.1::gentoo-haskell USE="-doc -profile" 13 kB [ebuild N ~] dev-haskell/css-text-0.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 4 kB [ebuild N ~] dev-haskell/shakespeare-i18n-0.0.2.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ~] dev-haskell/conduit-0.2.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 31 kB [ebuild N ~] dev-haskell/http-types-0.6.9::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 10 kB [ebuild N ~] dev-haskell/aeson-0.6.0.0-r1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 97 kB [ebuild N ~] dev-haskell/hamlet-0.10.9.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 17 kB [ebuild N ~] dev-haskell/cryptohash-0.7.4::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 38 kB [ebuild N ~] dev-haskell/asn1-data-0.6.1.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 16 kB [ebuild N ~] dev-haskell/crypto-pubkey-types-0.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 3 kB [ebuild N ~] dev-haskell/puremd5-2.1.0.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ] dev-haskell/regex-compat-0.92::gentoo-haskell USE="-doc -profile" 5 kB [ebuild N ~] dev-haskell/xss-sanitize-0.3.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 9 kB [ebuild N ~] dev-haskell/skein-0.1.0.5::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 114 kB [ebuild N ~] dev-haskell/wai-1.1.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 5 kB [ebuild N ~] dev-haskell/blaze-builder-conduit-0.2.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 4 kB [ebuild N ~] dev-haskell/cryptocipher-0.3.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 31 kB [ebuild N ~] dev-haskell/attoparsec-conduit-0.2.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 3 kB [ebuild N ~] dev-haskell/certificate-1.1.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 14 kB [ebuild N ~] dev-haskell/zlib-conduit-0.2.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 4 kB [ebuild N ~] dev-haskell/pwstore-fast-2.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 7 kB [ebuild N ~] dev-haskell/pool-conduit-0.0.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 3 kB [ebuild N ~] dev-haskell/network-conduit-0.2.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 4 kB [ebuild N ~] dev-haskell/persistent-0.8.0.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 27 kB [ebuild N ~] dev-haskell/wai-extra-1.1.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 29 kB [ebuild N ~] dev-haskell/wai-logger-0.1.4::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 5 kB [ebuild N ~] dev-haskell/tls-0.9.0::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 32 kB [ebuild N ~] dev-haskell/cprng-aes-0.2.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/warp-1.1.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 12 kB [ebuild N ~] dev-haskell/xml-conduit-0.5.3.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 24 kB [ebuild N ~] dev-haskell/persistent-template-0.8.1.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 10 kB [ebuild N ~] dev-haskell/tls-extra-0.4.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 13 kB [ebuild N ~] dev-haskell/clientsession-0.7.4.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 7 kB [ebuild N ~] dev-haskell/yesod-core-0.10.3::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 36 kB [ebuild N ~] dev-haskell/http-conduit-1.2.6::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 25 kB [ebuild N ~] dev-haskell/yesod-persistent-0.3.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 2 kB [ebuild N ~] dev-haskell/yesod-json-0.3.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 4 kB [ebuild N ~] dev-haskell/authenticate-1.0.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 8 kB [ebuild N ~] dev-haskell/yesod-form-0.4.2.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 17 kB [ebuild N ~] dev-haskell/yesod-auth-0.8.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 14 kB [ebuild N ~] dev-haskell/yesod-0.10.2::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 34 kB Total: 105 packages (105 new), Size of downloads: 4,994 kB * IMPORTANT: 5 news items need reading for repository 'gentoo'. * Use eselect news to read news items. vkarimakubo ~ # emerge yesod
cabal(Common Architecture for Building Applications and Libraries)系のインストール
vkarimakubo ~ # emerge dev-haskell/cabal-install dev-haskell/cabal-dev
ビルドの途中で足りないとのエラーが発生したので以下を追加(行き当たりバッタリで申し訳ない)
vkarimakubo ~ # emerge -pv hjsmin These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ~] dev-haskell/happy-1.18.9::gentoo-haskell USE="-doc" 155 kB [ebuild N ~] dev-haskell/utf8-light-0.4.0.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 6 kB [ebuild N ~] dev-haskell/language-javascript-0.4.10::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 67 kB [ebuild N ~] dev-haskell/hjsmin-0.0.15::gentoo-haskell USE="-doc -hoogle -hscolour -profile" 11 kB ... ... vkarimakubo ~ # emerge hjsmin
YesodがDBへ接続するため、PostgreSQL関係をインストール(SQLiteあたりも使える)
vkarimakubo ~ # emerge -pv dev-haskell/hdbc-postgresql These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ~] dev-haskell/convertible-1.0.11.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 15 kB [ebuild N ] app-admin/eselect-postgresql-1.0.10 4 kB [ebuild N ] dev-db/postgresql-base-9.1.3 USE="nls pam readline ssl zlib -doc -kerberos -ldap -pg_legacytimestamp -threads" LINGUAS="-af -cs -de -en -es -fa -fr -hr -hu -it -ko -nb -pl -pt_BR -ro -ru -sk -sl -sv -tr -zh_CN -zh_TW" 15,222 kB [ebuild N ~] dev-haskell/hdbc-2.3.1.1::gentoo-haskell USE="-doc -hoogle -hscolour -mysql -odbc -postgres -profile -sqlite3 -test" 23 kB [ebuild N ~] dev-haskell/hdbc-postgresql-2.3.2.1::gentoo-haskell USE="-doc -hoogle -hscolour -profile -test" 25 kB vkarimakubo ~ # emerge dev-haskell/hdbc-postgresql
PostgreSQL Serverのインストール
vkarimakubo ~ # emerge -pv postgresql-server These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] dev-db/postgresql-server-9.1.3 USE="nls pam -doc -perl -pg_legacytimestamp -python (-selinux) -tcl -uuid -xml" LINGUAS="-af -cs -de -en -es -fa -fr -hr -hu -it -ko -nb -pl -pt_BR -ro -ru -sk -sl -sv -tr -zh_CN -zh_TW" 3 kB .. .. .. vkarimakubo ~ # emerge -pv postgresql-server vkarimakubo ~ # emerge --config =dev-db/postgresql-server-9.1.3 vkarimakubo ~ # /etc/init.d/postgresql-9.1 start
ユーザー設定、ユーザーとDBを作成しておく、注意点としてディフォルトでデータベース名とデータベースの接続ユーザーは「Project name:」で指定されたものが利用される。
「Foundation:」は大文字ではじめないと、先へ進めない。
vkarimakubo yesodsample # su - postgres postgres@vkarimakubo ~ $ createdb yesodsample postgres@vkarimakubo ~ $ createuser yesodsample Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) y Shall the new role be allowed to create more new roles? (y/n) n postgres@vkarimakubo ~ $
Yesodをセットアップ
自分のホームで以下を実行
cuomo@vkarimakubo ~ $ cabal update cuomo@vkarimakubo ~ $ yesod init Welcome to the Yesod scaffolder. I'm going to be creating a skeleton Yesod project for you. What is your name? We're going to put this in the cabal and LICENSE files. Your name: karky7 Welcome karky7. What do you want to call your project? We'll use this for the cabal name. Project name: yesodsample Great, we'll be creating yesodsample today, and placing it in yesodsample. What's going to be the name of your foundation datatype? This name must start with a capital letter. Foundation: Karky7 Yesod uses Persistent for its (you guessed it) persistence layer. This tool will build in either SQLite or PostgreSQL or MongoDB support for you. We recommend starting with SQLite: it has no dependencies. We have another option: a tiny project with minimal dependencies. Mostly this means no database and no authentication. s = sqlite p = postgresql mongo = mongodb t = tiny mysql = MySQL (experimental) So, what'll it be? p That's it! I'm creating your files now... Generating deploy/Procfile Generating config/postgresql.yml Generating config/settings.yml Generating main.hs Generating devel.hs Generating yesodsample.cabal Generating .ghci Generating LICENSE Generating Foundation.hs Generating Import.hs Generating Application.hs Generating Handler/Root.hs Generating Model.hs Generating Settings.hs Generating Settings/StaticFiles.hs Generating templates/default-layout.lucius Generating templates/default-layout.hamlet Generating templates/default-layout-wrapper.hamlet Generating templates/normalize.lucius Generating templates/homepage.hamlet Generating config/routes Generating templates/homepage.lucius Generating templates/homepage.julius Generating config/models Generating messages/en.msg --------------------------------------- ___ {-) |\ [m,].-"-. / [][__][__] \(/\__/\)/ [__][__][__][__] | | [][__][__][__][__][] / | [__][__][__][__][__]| /| | [][__][__][__][__][]| || | ejm [__][__][__][__][__]__,__, \__/ --------------------------------------- The foundation for your web application has been built. There are a lot of resources to help you use Yesod. Start with the book: http://www.yesodweb.com/book Take part in the community: http://yesodweb.com/page/community Start your project: cd yesodsample && cabal install && yesod devel or if you use cabal-dev: cd yesodsample && cabal-dev install && yesod --dev devel cuomo@vkarimakubo ~ $ cd yesodsample && cabal install && yesod devel ... ... Registering ....... Starting development server: runghc -package-confdist/package.conf.inplace devel.hs Starting devel application Devel application launched, listening on port 3000
ブラウザでhttp://IP:3000、またはhttp://localhost:3000などで確認してください
何故かJavascript関連がうまく機能していないか分からないのですが以下の画面が出力された
いといろいパッケージをいじくったりしたのですが、良く分からないうちに治ってました、また調べておきます。(いつになるかは解らんが...っていうか誰かおしえて)、正解の画面はこちらです。
適当なインストールログでもうしわけない、なにせHaskellでさえ片言しか喋れませんので、、しばらくこれを弄ってみます。
0 件のコメント:
コメントを投稿