Apache�APHP�AMySQL�p�b�P�[�W�̃C���X�g�[���Ō���Chef��Recipe�̊�{�I�ȏ������F�T�[�o�[�Ǘ��҂̂��߂�Chef������i4�j�i1/2 �y�[�W�j

�G���^�[�v���C�Y�����@�\���[�����Ă���Chef���g���č��������x�̍����T�[�o�[�C���t�����\�z�^�Ǘ�������@�ɂ‚��ĉ������A�ځB����́A�O��Cookbook�𗘗p�������|�W�g���ݒ��Ayum�ɂ����Apache�APHP�AMySQL�p�b�P�[�W���C���X�g�[������Recipe�̏������Ǝ��s�̎d���Ȃǂɂ‚��ĉ�����܂��B

» 2015�N05��18�� 05��00�� ���J
[��쑽�����C��IT]

�O��Cookbook�𗘗p�������|�W�g���ݒ聕yum�ɂ���ăp�b�P�[�W���C���X�g�[������Recipe�����s

uT[o[Ǘ҂̂߂ChefṽCfbNX

�A�ږڎ�

�@�O��́uWordPress�\�z�Ŋw�ԁA�T�[�o�[�\�z��Ƃ�Chef��Cookbook�Ƃ��ċL�q���邽�߂̃|�C���g�v�ł͎蓮�\�z�ɂ��WordPress�̃C���X�g�[���菇��ACookbook�̍\���AWordPress�\�z��Chef��Cookbook�ɂ��Ă������߂̕��j�ɂ‚��ĉ�����܂����B�����Chef��Cookbook���쐬���Ȃ���AChef�̍\���v�f�𗝉����Ă����܂��傤�B

�@�܂��A�O���������u�\�z�‹��̑O������v�ƁuCookbook�̍쐬���j�v���ēx�L�ڂ��Ă����܂��B

WordPress�\�z�‹��̑O�����

  1. OS��CentOS 6.6���g�p
  2. Apache��MySQL�͓���T�[�o�[���i�u�m�[�h�v�j�ɃC���X�g�[������
  3. MySQL��Remi���|�W�g�����g�p���ăC���X�g�[������
  4. �uwp.example.com�v�Ƃ����o�[�`�����z�X�g���쐬���A�z�X�g�����uwp.example.com�v�A�h�L�������g���[�g���u/var/www/wp.example.com/wordpress�v�Ƃ���
  5. �G���[���O�ƃJ�X�^�����O�̃t�@�C�������ȉ��̒ʂ�Ƃ���
    • wp.example.com-error_log
    • wp.example.com-access_log
  6. MySQL��wordpress���[�U�[��wordpress�f�[�^�x�[�X���쐬���A���[�U�[�Ƀf�[�^�x�[�X�ւ̃A�N�Z�X����t�^����

WordPress�\�zCookbook�̍쐬���j

�y1�z���|�W�g���ݒ聨�O��Cookbook�𗘗p
�y2�zApache�APHP�AMySQL�̃C���X�g�[����Resource�Œ�`
�y3�zWordPress�̃_�E�����[�h�Ɖ𓀁�Resource�Œ�`
�y4�z�o�[�`�����z�X�g�ݒ聨Template���g�p
�y5�zWordPress�pMySQL�ݒ聨Template���g�p

�@���̂�������́y1�z�Ɓy2�z�ɂ‚��č�Ƃ�i�߂Ă����܂��B

�y1�z�O��Cookbook�𗘗p�������|�W�g���ݒ�

�@�O���i�T�[�h�p�[�e�B���jCookbook�Ƃ��āAEPEL��Remi�̃��|�W�g�����C���X�g�[���ł���Cookbook�����J����Ă���̂ŁA��������g�p���܂��B

�@�ŏ��Ɂuyum-epel�v�uyum-remi�v��Cookbook���C���X�g�[�����܂��B

$ sudo knife cookbook site install yum-epel
$ sudo knife cookbook site install yum-remi

�@�m�[�h��Knife-Zero���g�p����Chef-Zero���Z�b�g�A�b�v���܂��B

$ sudo bundle exec knife zero bootstrap node01 -x �����[�U�[���� --sudo -P ���p�X���[�h��
Connecting to node01
node01 Installing Chef Client...
node01 --2015-05-11 22:58:13--  https://www.opscode.com/chef/install.sh
node01 Resolving www.opscode.com... 166.78.227.233
node01 Connecting to www.opscode.com|166.78.227.233|:443... connected.
node01 HTTP request sent, awaiting response... 200 OK
����������������
node01 Preparing...                                                   ########################################### [100%]
node01    1:chef                                                      ########################################### [100%]
node01 Thank you for installing Chef!
node01 Starting first Chef Client run...
node01 Starting Chef Client, version 12.3.0
����������������
node01 Running handlers:
node01 Running handlers complete
node01 Chef Client finished, 0/0 resources updated in 1.63139453 seconds

�@�Z�b�g�A�b�v������������A�m�[�h��run_list�ɑ΂��Ď��s����Cookbook��lj����Ă����܂��B

�@�����yum-epel��yum-remi��2�‚����s�����邽�߂ɁA�uknife node run_list add�v�R�}���h��2����s���܂��B

$ sudo knife node run_list add node01 'recipe[yum-epel]'
node01:
  run_list: recipe[yum-epel]
$ sudo knife node run_list add node01 'recipe[yum-remi]'
node01:
  run_list:
    recipe[yum-epel]
    recipe[yum-remi]

�@�m�[�h�ɑ΂���run_list�ɓo�^����Cookbook�����s���܂��B

$ sudo bundle exec knife zero chef_client 'name:node01' -x �����[�U�[���� -P ���p�X���[�h�� --sudo
node01 Starting Chef Client, version 12.3.0
node01 resolving cookbooks for run list: ["yum-epel", "yum-remi"]
node01 Synchronizing Cookbooks:
node01   - yum-epel
node01   - yum-remi
����������������
node01 Recipe: yum-epel::default
node01   * yum_repository[epel] action create
node01     * template[/etc/yum.repos.d/epel.repo] action create
����������������
node01 Recipe: yum-remi::default
node01   * yum_repository[remi] action create
node01     * template[/etc/yum.repos.d/remi.repo] action create
����������������
node01 Running handlers:
node01 Running handlers complete
node01 Chef Client finished, **/** resources updated in **.******** seconds

�@�C���X�g�[��������������A�����ăp�b�P�[�W�̃C���X�g�[�����s���܂��B

�@�@�@�@�@�@ 1|2 ���̃y�[�W��

Copyright © ITmedia, Inc. All Rights Reserved.

'; this.insertTarget = document.querySelector('#cmsBody .subscription') || document.querySelector('#cmsBody .inner'); }; BodyAdIMSWithCCE.prototype = Object.create(BodyAdContent.prototype); BodyAdIMSWithCCE.prototype.activate = function () { refreshGam('InArtSpecialLink'); } // global reference window.itm = itm; //entry point BodyAdEventBase.polyfill(); const bodyAdManager = BodyAdManager.getInstance(); bodyAdManager.addEventListener(BodyAdManager.EVENTS.READY, function (ev) { bodyAdManager.loadAdvertise(); }); bodyAdManager.init(); })();
�X�|���T�[����̂��m�点PR

���ڂ̃e�[�}

Microsoft  WindowsőO2025
AI for GWjAO
[R[h^m[R[h Zg by IT - ITGWjArWlX̒SŊ􂷂gD
Cloud Native Central by IT - XP[uȔ\͂gD
�V�X�e���J���m�E�n�E �y�����i�r�zPR
���Ȃ��ɂ������߂̋L��PR

RSS�ɂ‚���

�A�C�e�B���f�B�AID�ɂ‚���

���[���}�K�W���o�^

��IT�̃��[���}�K�W���́A �������A���ׂĖ����ł��B���Ѓ��[���}�K�W�������w�ǂ��������B