Skip to content
Search

APM Stack

lastmod 2021-02-04created 2021-02-041 edits

A term formed from the initials of the main tools that make up a web server: Apache httpd, PHP, and MySQL (or MariaDB). Adding Linux to these, it is also called LAMP.

How to install CentOS7

Install in the following order.

# ROOT 권한으로 접속한다.

## Apache HTTPD Install:
$ yum update -y
$ yum install -y httpd mod_ssl
$ systemctl start httpd
$ systemctl enable httpd

## PHP Install:
$ yum install -y php php-common

## PHP Extension:
$ yum install -y gd gd-devel php-gd
$ yum install -y curl curl-devel php-curl
$ yum install -y php-simplexml
$ yum install -y zip php-zip
$ yum install -y php-mysql
$ yum install -y php-process

## MariaDB Install:
$ yum install mariadb mariadb-server
$ systemctl start mariadb.service
$ systemctl enable mariadb.service

Subsequent changes

Edit the /etc/httpd/conf/httpd.conf file to disable the HTTP protocol of Apache httpd.

Change PHP's file upload size:

upload_max_filesize = 100M
post_max_size = 100M

MariaDB security fixes:

$ /usr/bin/mysql_secure_installation

Add a user (MySql:User):

grant all privileges on `DB이름`.* to 사용자아이디@localhost identified by '비밀번호' with grant option;
create database DB이름
flush privileges;

Installing PHP services

After installing PHP-related services in /var/www/html, change the ownership of all files.

$ chown apache:apache -R path/

## SELinux setting:
$ chcon -t httpd_user_rw_content_t -R path/

Example

See also

author Zer0 sitemap