본문 바로가기

APM 설치

by ^..^v 2019. 4. 22.
728x90
반응형

APM = Apache + PHP + MySQL

  1. root 권한으로 로그인

  2. dpkg 명령어로 apache2, php7.0-common, mysql-server 설치 여부 확인
  3. root@ubuntu:# dpkg -l apache2
    dpkg-query: no packages found matching apache2
    root@ubuntu:# dpkg -l php7.0-common
    dpkg-query: no packages found matching php7.0-common
    root@ubuntu:~# dpkg -l mysql-server
    dpkg-query: no packages found matching mysql-server
    

  4. apt-get 명령어로 apm 설치
  5. root@ubuntu:~# apt-get -y install lamp-server^
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Note, selecting 'libgssapi3-heimdal' for task 'lamp-server'
    Note, selecting 'libhttp-message-perl' for task 'lamp-server'
    Note, selecting 'libnghttp2-14' for task 'lamp-server'
    Note, selecting 'php7.2-common' for task 'lamp-server'
    		:
    

  6. dpkg 명령어로 apache2, php7.0-common, mysql-server 설치 여부 확인
  7. root@ubuntu:~# dpkg -l apache2
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    +++-==========================-==================-==================-=========================================================
    ii  apache2                    2.4.29-1ubuntu4.6  amd64              Apache HTTP Server
    root@ubuntu:~# dpkg -l php7.0-common
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                       Version            Architecture       Description
    +++-==========================-==================-==================-=========================================================
    un  php7.0-common              none               none               (no description available)
    root@ubuntu:~# dpkg -l mysql-server
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                       Version            Architecture       Description
    +++-==========================-==================-==================-=========================================================
    ii  mysql-server               5.7.25-0ubuntu0.18 all                MySQL database server (metapackage depending on the lates
    

  8. apache2 서비스 시작
  9. root@ubuntu:~# systemctl restart apache2
    root@ubuntu:~# systemctl enable apache2
    Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable apache2
    root@ubuntu:~# systemctl status apache2
    ● apache2.service - The Apache HTTP Server
       Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
      Drop-In: /lib/systemd/system/apache2.service.d
               └─apache2-systemd.conf
       Active: active (running) since Mon 2019-04-22 02:09:22 PDT; 24s ago
     Main PID: 14739 (apache2)
        Tasks: 6 (limit: 1080)
       CGroup: /system.slice/apache2.service
               ├─14739 /usr/sbin/apache2 -k start
               ├─14740 /usr/sbin/apache2 -k start
               ├─14741 /usr/sbin/apache2 -k start
               ├─14742 /usr/sbin/apache2 -k start
               ├─14743 /usr/sbin/apache2 -k start
               └─14744 /usr/sbin/apache2 -k start
    
    Apr 22 02:09:22 ubuntu systemd[1]: Starting The Apache HTTP Server...
    Apr 22 02:09:22 ubuntu apachectl[14735]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'Se
    Apr 22 02:09:22 ubuntu systemd[1]: Started The Apache HTTP Server.
    

  10. mysql 서비스 시작
  11. root@ubuntu:~# systemctl restart mysql
    root@ubuntu:~# systemctl enable mysql
    Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable mysql
    

  12. Firefox 브라우저를 통해 http://localhost 또는 http://127.0.0.1로 접속 확인

  13. PHP 정보 페이지 작성
  14. root@ubuntu:~# gedit /var/www/html/phpinfo.php
    
        
    <?php
        phpinfo();
    ?>
    

  15. Firefox 브라우저를 통해 http://localhost/phpinfo.php 또는 http://127.0.0.1/phpinfo.php로 접속

728x90
반응형

'' 카테고리의 다른 글

Ubuntu node.js 설치  (0) 2019.04.24
VirtualBox에 Ubuntu 18.04.2 설치  (0) 2019.04.23
XE를 이용한 웹 사이트 구축 2  (0) 2019.04.22
XE를 이용한 웹 사이트 구축 1  (0) 2019.04.22

댓글