bashtag

宮崎でITベンチャーから非ITベンチャーへ転職したサーバエンジニアのブログ

LAMPをyumる - 32bit対応版

あらすじ

先日、ソースコンパイルで構築するエントリーを書きました 今回は手軽にyumってLAMP環境をつくってみます。

Linux Apache Mysql Php = LAMP

OS - CentOS 6.4 32bit

yum

リポジトリ登録

rpmforgerpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

rpm -ivh http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

epel

rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

remi

rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
rpm -ivh http://rpms.famillecollet.com/enterprise/6/remi/i386/remi-release-6.5-1.el6.remi.noarch.rpm vi /etc/yum.repos.d/epel.repo

httpd

yum install httpd-devel
yum install mod_ssl

php

yum -y install php php-devel php-pdo php-mysql php-mbstring php-mcrypt php-gd php-pear php-pear-DB
yum -y install php-pear-Auth php-pecl-apc-devel zlib-devel 
yum install php-intl

mysql

yum -y install mysql-devel 
yum -y install mysql-server 

まとめ

これであっさりインストールできちゃいます。 参考までに

WordBench宮崎の取組 〜BenchからBonchへ

あらすじ

「WordBench宮崎」を「WordBonch宮崎」(わーどぼんち)と変えて、WordBench宮崎を主催している関係で、ちょっと取り組みを紹介します。

WordBench宮崎の取組

スライドー

WordVolcanoとかかっちょいい!!

宮崎もWordBenchを宮崎っぽくしようということで、WordBonchってしちゃったわけですが、 盆地が多いってわけではなく、どちらかと言うと海よりだったりして。。

でも、ドメイン取ってしまったのでご愛嬌。 われこそはWordBonchにふさわしいというコミュニティの県があられましたら、ご連絡ください。 サブドメインなど柔軟にお貸し出来ますので。。。

http://wordbonch.org/

まとめ

WordBonch宮崎、WordBench宮崎をよろしくお願いします。 次回は、2014年7月12日開催予定です。

僕が「独立」を選択しなかった3つの理由

独立ではなく転職

昨日、転職の話を書き始めたが、最近、仕事で個人で開発を請け負っている方と一緒にお仕事をすることが多くなってきたので、自分が独立という選択肢を持たない理由を考えてみた。

1.責任を持つことが不安

単純に実力が足りないということでもあるが、一人ですべての責任を持つことが出来そうにないということである。もし、世界最高の技術を身につけていたとしても、この不安感は拭えない。

チームを作って、開発のプロジェクトの一員に加わるのであれば、話は別だが、そんな仕事ばかりでは、食っては行けぬかな。

2.朝が不安

朝弱いくせに夜更かし気味。好きなモノを見つけてしまったら、没頭し練る時間を忘れる。仕事にも支障がでるし、何か言い訳を作ってしまう。おそらく個人でそれをしてしまうと、仕事が来なくなる。

そんな状況が目に見えている中では、いけない。

3.周りを巻き込む力が「まだまだ」

これはマネジメント力不足。

家族、クライアント、そして自分自身。すべてをマネジメントできているからこそ、「独立」という選択をできるのではないだろうか?

まとめ

理由をあげてみましたが、結局のところ全部後付けで、独立するのが「恐い」だけのような気がします。 ともあれ、会社に所属することでいろんな接点を頂けるし、他の技術的なアウトプットももらえて、とても楽しいです。

当面の目標は、今の給料で「駄菓子屋」を子どものために開くことですね。

転職を機に

あらすじ

このブログを仕事に関する、あらゆる備忘録として残そうと思います。

次回がいつになるかわかりませんが、簡単に自分履歴を残します。

社会人としての記録

インターンとしての1年間

大学(教育系)では技術教育と木工、時々ダンスとコラボレーションしながらピアノを弾いたりバンド活動をしていました。

就職を考えた時に、結局何も身についていないと切に感じ、情報技術系の大学院(工学部)に進学し、プログラミングの「プ」も知らないという苦痛の中、1年を過ぎようとしていたころ、就職活動も架橋にさしかかろうとした寸前に宮崎のIT企業と出会い、大学院1年の3月からインターンとして従事する。

社員20人。

こうして僕はWebという業界に片足を突っ込んだ

そこで、プログラミングとコーディングを教わりながら、簡単なバナーも作成していたがあまり得意ではなかった。メインは専ら「サーバ」、「Linux」及び「bash」であった。所謂、インフラエンジニア、サーバインジニアの部類である。

実践でもって、技術を身につけていきながら、大学院では天体の研究(画像解析)をしていた。 「ガンマ線バースト」を発見するというメインミッションを持ち、画像データをデータベースに格納していくサーバを構築していた。

卒業する頃に結婚し、入社する頃には会社はすでに30人となっていた。

サーバエンジニアとしての4年間

ここからは次回・・・

S3をコマンドで操作したかったので、aws_cliがあるけれどもs3cmdをyumってみた

s3cmdをインストールしてみた

ソースインストールじゃなくても

s3cmdがリポジトリに登録されたらしいので、yumで確認してみた。

リポジトリ epel の場合

yum info --enablerepo=epel s3cmd

Versionが「1.0.1」

Available Packages
Name : s3cmd
Arch : noarch
Version : 1.0.1
Release : 1.el6
Size : 94 k
Repo : epel
Summary : Tool for accessing Amazon Simple Storage Service
URL : http://s3tools.logix.cz/s3cmd
License : GPLv2
Description : S3cmd lets you copy files from/to Amazon S3
: (Simple Storage Service) using a simple to use
: command line client.

リポジトリ epel-testing の場合

yum info --enablerepo=epel-testing s3cmd

Versionが「1.5.0」

Name : s3cmd
Arch : noarch
Version : 1.5.0
Release : 0.4.gitb196faa5.el6
Size : 137 k
Repo : epel-testing
Summary : Tool for accessing Amazon Simple Storage Service
URL : http://s3tools.logix.cz/s3cmd
License : GPLv2
Description : S3cmd lets you copy files from/to Amazon S3
: (Simple Storage Service) using a simple to use
: command line client.

実際には「1.5.0-beta」となっています。

最新版をインストール

 yum --enablerepo=epel-testing install s3cmd

Version確認

s3cmd --version

確認

s3cmd version 1.5.0-beta1

参考

まとめ

最新版だとマルチパートアップロード機能や、スタティックウェブサイトホスティング機能等を使えるようなので、インストールしてみてください。

ソースコンパイルでサーバ構築 CentOS版 Part6

このシリーズは今日でラストです

  • OS:CentOS6.4
  • Web:Nginx + php-fpm + PHP
  • DB:MySQL

Symfonyをインストールします

# Composerでインストールするとパッケージ管理ができて便利
curl -s https://getcomposer.org/installer | php

#----- 出力 START
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /var/www/html/composer.phar
Use it: php composer.phar
#----- 出力 E N D


# ComposerでSymfonyをインストール
# 最後のバージョンの部分を最新安定版の数字に置き換えてください
php composer.phar create-project symfony/framework-standard-edition /var/www/html/Symfony 2.4.2

#----- 出力 START
Installing symfony/framework-standard-edition (v2.4.2)
  - Installing symfony/framework-standard-edition (v2.4.2)
    Downloading: 100%

Created project in /var/www/html/Symfony
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing jdorn/sql-formatter (v1.2.17)
    Downloading: 100%

  - Installing psr/log (1.0.0)
    Downloading: 100%

  - Installing twig/twig (v1.15.1)
    Downloading: 100%

  - Installing doctrine/lexer (v1.0)
    Downloading: 100%

  - Installing doctrine/annotations (v1.1.2)
    Downloading: 100%

  - Installing doctrine/collections (v1.2)
    Downloading: 100%

  - Installing doctrine/cache (v1.3.0)
    Downloading: 100%

  - Installing doctrine/inflector (v1.0)
    Downloading: 100%

  - Installing doctrine/common (v2.4.1)
    Downloading: 100%

  - Installing symfony/symfony (v2.4.2)
    Downloading: 100%

  - Installing symfony/icu (v1.1.0)
    Downloading: 100%

  - Installing doctrine/dbal (v2.4.2)
    Downloading: 100%

  - Installing doctrine/doctrine-bundle (v1.2.0)
    Downloading: 100%

  - Installing kriswallsmith/assetic (v1.1.2)
    Downloading: 100%

  - Installing symfony/assetic-bundle (v2.3.0)
    Downloading: 100%

  - Installing sensio/framework-extra-bundle (v3.0.0)
    Downloading: 100%

  - Installing doctrine/orm (v2.4.2)
    Downloading: 100%

  - Installing twig/extensions (v1.0.1)
    Downloading: 100%

  - Installing swiftmailer/swiftmailer (v5.0.3)
    Downloading: 100%

  - Installing symfony/swiftmailer-bundle (v2.3.5)
    Downloading: 100%

  - Installing monolog/monolog (1.7.0)
    Downloading: 100%

  - Installing symfony/monolog-bundle (v2.5.1)
    Downloading: 100%

  - Installing sensio/distribution-bundle (v2.3.4)
    Downloading: 100%

  - Installing sensio/generator-bundle (v2.3.4)
    Downloading: 100%

  - Installing incenteev/composer-parameter-handler (v2.1.0)
    Downloading: 100%

kriswallsmith/assetic suggests installing leafo/lessphp (Assetic provides the integration with the lessphp LESS compiler)
kriswallsmith/assetic suggests installing leafo/scssphp (Assetic provides the integration with the scssphp SCSS compiler)
kriswallsmith/assetic suggests installing ptachoire/cssembed (Assetic provides the integration with phpcssembed to embed data uris)
kriswallsmith/assetic suggests installing leafo/scssphp-compass (Assetic provides the integration with the SCSS compass plugin)
monolog/monolog suggests installing mlehner/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
Writing lock file
Generating autoload files
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
database_driver (pdo_mysql):
database_host (127.0.0.1):
database_port (null):
database_name (symfony):
database_user (root): symfony
database_password (null): symfony
mailer_transport (smtp):
mailer_host (127.0.0.1):
mailer_user (null):
mailer_password (null):
locale (en): ja
secret (ThisTokenIsNotSoSecretChangeIt): xdmBxaLYjytQVbk4
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution

#----- 出力 E N D


# チェック
php app/check.php
#----- 出力 START
*********************************                              *
*  Symfony requirements check  *
*                              *
********************************

* Configuration file used by PHP: /etc/php.ini

** ATTENTION **
*  The PHP CLI can use a different php.ini file
*  than the one used with your web server.
*  To be on the safe side, please also launch the requirements check
*  from your web server using the web/config.php script.

** Mandatory requirements **

 OK       PHP version must be at least 5.3.3 (5.5.9 installed)
 OK       PHP version must not be 5.3.16 as Symfony wont work properly with it
 OK       Vendor libraries must be installed
 OK       app/cache/ directory must be writable
 OK       app/logs/ directory must be writable
 OK       date.timezone setting must be set
 OK       Configured default timezone "Asia/Tokyo" must be supported by your installation of PHP
 OK       json_encode() must be available
 OK       session_start() must be available
 OK       ctype_alpha() must be available
 OK       token_get_all() must be available
 OK       simplexml_import_dom() must be available
 OK       detect_unicode must be disabled in php.ini
 OK       PCRE extension must be available

** Optional recommendations **

 OK       Requirements file should be up-to-date
 OK       You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions
 OK       When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156
 OK       You should not use PHP 5.4.0 due to the PHP bug #61453
 OK       When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)
 OK       You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909
 OK       PCRE extension should be at least version 8.0 (8.32 installed)
 OK       PHP-XML module should be installed
 OK       mb_strlen() should be available
 OK       iconv() should be available
 OK       utf8_decode() should be available
 WARNING  posix_isatty() should be available
          Install and enable the php_posix extension (used to colorize the CLI output).

 OK       intl extension should be available
 OK       intl extension should be correctly configured
 OK       intl ICU version should be at least 4+
 WARNING  a PHP accelerator should be installed
          Install and enable a PHP accelerator like APC (highly recommended).

 OK       short_open_tag should be disabled in php.ini
 OK       magic_quotes_gpc should be disabled in php.ini
 OK       register_globals should be disabled in php.ini
 OK       session.auto_start should be disabled in php.ini
 OK       PDO should be installed
 OK       PDO should have some drivers installed (currently available: mysql, sqlite)

#----- 出力 E N D


# cacheとlogsのディレクトリに書き込み権限を付与
chmod 777 app/cache
chmod 777 app/logs

# IPを許可して
Symfony/web/config.php

# アクセス

ソースコンパイルによるサーバ構築の備忘録はここまで。