Server -> Install

APM Install (CentOS 6.5 64bit + Apache2.4 + MariaDB10.1 + Php 7.*)

Author: Thorpe Lee(koangbok@gmail.com), Front&Back-end Developer, posted on 2016-07-27 09:31:45

Print - 프린트하기


DESCRIPTION

Notice

Steps : Install CentOS -> Php -> MariaDB 

Application and Envirment

OS CentOS 6.5 64bit
Apache 2.4
MariaDb 10.1
Php 7.0

 

Common


root@shell:~$ yum update
root@shell:~$ yum install git rdate zip unzip wget

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile        | 4.6 kB     00:00      * base: centos.mirror.cdnetworks.com
 * epel: mirror.premi.st
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
 * webtatic: sp.repo.webtatic.com
~~~~~~~~~~~~~~~~중간생략~~~~~~~~~~~~~~~~~~~~
Y :
~~~~~~~~~~~~~~~~중간생략~~~~~~~~~~~~~~~~~~~~

root@shell:~$ crontab -e

rdate -s time.bora.net

 

INSTALL APPLICAION

root@shell:~$vi /etc/sysconfig/selinux

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                     | 4.6 kB     00:00     
 * base: centos.mirror.cdnetworks.com
 * epel: mirror.premi.st
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
 * webtatic: sp.repo.webtatic.com
~~~~~~~~~~~~~~~~중간생략~~~~~~~~~~~~~~~~~~~~
Y :
~~~~~~~~~~~~~~~~중간생략~~~~~~~~~~~~~~~~~~~~


APM설치 (WEBSTIC를 이용한 PHP 7.0.* 버전 설치)


Repo URL 적용


root@shell:~$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
root@shell:~$ rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

PHP 설치 


root@shell:~$ yum install php70w 
root@shell:~$ php –v

PHP 7.0.4 (cli) (built: Mar  5 2016 01:22:48) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

root@shell:~$ yum install php70w-fpm php70w-opcache php70w-common \
php70w-memcache php70w-gd php70w-mcrypt php70w-mysql php70w-odbc php70w-opcache \
php70w-pdo php70w-process php70w-mbstring php70w-intl php70w-devel php70w-xml

root@shell:~$ chkconfig httpd on

COMPOSER 설치


참고 URL: https://getcomposer.org/download/
root@shell:~$ php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
root@shell:~$ php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '7228c001f88bee97506740ef0888240bd8a760b046ee16db8f4095c0d8d525f2367663f22a46b48d072c816e7fe19959') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
root@shell:~$ php composer-setup.php
root@shell:~$ php -r "unlink('composer-setup.php');"
root@shell:~$ mv composer.phar /usr/local/bin/composer

root@shell:~$ composer

  ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.2.0 2016-07-19 01:28:52

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  about           Short information about Composer
  archive         Create an archive of this composer package
  browse          Opens the packages repository URL or homepage in your browser.
  clear-cache     Clears composers internal package cache.
  clearcache      Clears composers internal package cache.
  config          Set config options
  create-project  Create new project from a package into given directory.
  depends         Shows which packages cause the given package to be installed
  diagnose        Diagnoses the system to identify common errors.
  dump-autoload   Dumps the autoloader
  dumpautoload    Dumps the autoloader
  exec            Execute a vendored binary/script
  global          Allows running commands in the global composer dir ($COMPOSER_HOME).
  help            Displays help for a command
  home            Opens the packages repository URL or homepage in your browser.
  info            Show information about packages
  init            Creates a basic composer.json file in current directory.
  install         Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  licenses        Show information about licenses of dependencies
  list            Lists commands
  outdated        Shows a list of installed packages that have updates available, including their latest version.
  prohibits       Shows which packages prevent the given package from being installed
  remove          Removes a package from the require or require-dev
  require         Adds required packages to your composer.json and installs them
  run-script      Run the scripts defined in composer.json.
  search          Search for packages
  self-update     Updates composer.phar to the latest version.
  selfupdate      Updates composer.phar to the latest version.
  show            Show information about packages
  status          Show a list of locally modified packages
  suggests        Show package suggestions
  update          Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  validate        Validates a composer.json and composer.lock
  why             Shows which packages cause the given package to be installed
  why-not         Shows which packages prevent the given package from being installed

MariaDB설치 


참고 URL : 
https://downloads.mariadb.org/mariadb/repositories/#mirror=kaist&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.1
https://mariadb.com/kb/en/mariadb/yum/

root@shell:~$ vi /etc/yum.repos.d/MariaDB.repo

# MariaDB 10.1 CentOS repository list - created 2016-03-22 07:54 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

root@shell:~$ yum install MariaDB-server MariaDB-client

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.oasis.onnetcorp.com
 * epel: mirror.premi.st
 * extras: mirror.oasis.onnetcorp.com
 * updates: mirror.oasis.onnetcorp.com
 * webtatic: uk.repo.webtatic.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
중간생략
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


root@shell:~$ chkconfig mysql on