CentOS7 센토스가 머임
CentOS 7 = Apache + PHP74 + MariaDB 설치

step.01.Apache

# yum  install httpd mod_ssl 
# systemctl start httpd 
# systemctl enable httpd 
# firewall-cmd --permanent --zone=public --add-service=http 
# firewall-cmd --permanent --zone=public --add-service=https 
# firewall-cmd --reload

# cp -av /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.original 
# sed -i 's/AddDefaultCharset UTF-8/ #AddDefaultCharset UTF-8/' /etc/httpd/conf/httpd.conf 
# sed -i 's/DirectoryIndex index.html/DirectoryIndex index.html Index.html Index.php index.php/' /etc/httpd/conf/httpd.conf 
# sed -i 's/Options Indexes FollowSymLinks/Options FollowSymLinks/' /etc/httpd/conf/httpd.conf 
# echo 'KeepAlive On ServerTokens Prod ' >> /etc/httpd/conf/httpd.conf 
# systemctl restart httpd

step.02.php

# yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm 
# yum -y install epel-release yum-utilssudo yum-config-manager --disable remi-php54 
# yum-config-manager --enable remi-php74
# yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json

# cp -av /etc/php.ini /etc/php.ini.original 
# sed -i 's/short_open_tag = Off/short_open_tag = On/' /etc/php.ini 
# sed -i 's/expose_php = On/expose_php = Off/' /etc/php.ini 
# sed -i 's/display_errors = Off/display_errors = On/' /etc/php.ini 
# sed -i 's/;error_log = php_errors.log/error_log = php_errors.log/' /etc/php.ini 
# sed -i 's/error_reporting = E_ALL \& ~E_DEPRECATED/error_reporting = E_ALL \& ~E_NOTICE \& ~E_DEPRECATED \& ~E_USER_DEPRECATED/' /etc/php.ini 
# sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/' /etc/php.ini 
# sed -i 's/post_max_size = 8M/post_max_size = 100M/' /etc/php.ini 
# sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 100M/' /etc/php.ini 
# sed -i 's/;date.timezone =/date.timezone = "Asia\/Seoul"/' /etc/php.ini 
# sed -i 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 86400/' /etc/php.ini 
# systemctl restart httpd 
 

step.03.MariaDB

설치 전, 아래 주소에 접속하여 원하는 버전을 선택하여 저장소 파일을 만든다.
https://downloads.mariadb.org/mariadb/repositories/#mirror=kaist&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1

# yum install MariaDB-server MariaDB-client 
# systemctl restart mysql 
# mysql_secure_installation 
# systemctl restart mysql 
# firewall-cmd --permanent --zone=public --add-service=mysql # firewall-cmd --reload 
# mysql -u root -p  GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'DB암호' WITH GRANT OPTION; 
# systemctl restart mysql

첨부파일
Comments
  • [[남군]빛고을총각] fdsasf 2020-11-05
  • 비밀글