HOME 개발팁 CentOS 8.2 + PHP-FPM 7.4 + MariaDB 10.3 + 성공

프로그램 작업하다 좋은 팁, 정보, 테스트를 기록하는 곳입니다.


웹서버 | CentOS 8.2 + PHP-FPM 7.4 + MariaDB 10.3 + 성공

페이지 정보

작성자 전소현 작성일21-01-18 11:35 조회527회 댓글0건

본문

CentOS 8.2 + PHP-FPM 7.4 + MariaDB 10.3
#-----------------------------------------------------------#

[1]  PHP
dnf module list php
dnf install -y dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module list php
module reset php
dnf module enable php:remi-7.4
dnf module list php
dnf info php-fpm
dnf install php-fpm -y
php-fpm -v
systemctl start php-fpm , systemctl restart php-fpm
systemctl status php-fpm
systemctl enable php-fpm



[2] nginx

$ sudo yum install yum-utils
$ sudo vi /etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true


$ sudo firewall-cmd --permanent --zone=public --add-service=http
$ sudo firewall-cmd --permanent --zone=public --add-service=https
$ sudo firewall-cmd --permanent --zone=public --add-port=3306/tcp
$ sudo firewall-cmd --reload

$ sudo yum-config-manager --enable nginx-mainline
$ sudo yum install nginx


$ sudo systemctl start nginx , sudo systemctl restart nginx
$ sudo systemctl enable nginx

$ sudo systemctl restart nginx

-------------- nginx

vi /etc/nginx/conf.d/default.conf

server {
    listen      80;
    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    root  /usr/share/nginx/html;
    index  index.php index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    error_page  500 502 503 504  /50x.html;
    location = /50x.html {
        root  /usr/share/nginx/html;
    }

    location ~ \.php$ {
      fastcgi_pass unix:/run/php-fpm/www.sock;
      include        fastcgi_params;
      fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
      fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;

    }
}

$ vi /usr/share/nginx/html/phpinfo.php
<?
echo "--";
?>

$ vi /etc/php-fpm.d/www.conf
user = nginx
group = nginx
listen.owner = nginx
listen.group = nginx
listen.mode = 0660

sudo systemctl restart nginx


sudo chown -R nginx.nginx /usr/share/nginx/html
chcon -R -t httpd_sys_rw_content_t /usr/share/nginx/html
chmod 755 /usr/share/nginx/html

end
---------------------------------------------------------

$ sudo dnf install libreoffice-base mariadb-java-client
$ sudo dnf install mariadb-connector-odbc

$ dnf install php-fpm -y


/etc/php.ini
 - short_open_tag=On 짧은링크

[추가모듈 설치]
$ dnf install php-mysqlnd php-gd php-mcrypt php-mbstring php-curl php-xml -y
$ systemctl restart php-fpm

[주소복사] https://www.goodsweb.kr/?u=D41ENFGV
SNS 알리기
핀터레스트
텔레그램로
블로그로
카카오스토리
카톡 공유

관련 블로그
로딩중


3명  IP : 18.222.♡.133
001 216.♡.66.232 원페이지 스크롤 네비게이션 (fullpage.js) - 개발팁
(/bbs/board.php?bo_table=tip&wr_id=220&page=9)
002 18.♡.95.38 History
(/bbs/board.php?bo_table=history&me_code=1010)
003 18.♡.40.207 이클립스 프레임워크 스프링 플러그인 설치 - 개발팁
(/bbs/board.php?bo_table=tip&wr_id=147&page=14)

접속자
  • 오늘 : 91
  • 어제 : 363
  • 최대 : 874
  • 전체 : 404,013

검색로봇(Robots) 최근 방문시간
  • BING : 3시간 전
  • GOOGLE : 10시간 전
  • NAVER : 21시간 전
  • DAUM : 3일 전

ETH : 0x8abf3B748ab78828AE07685e4fd53d1a606f18D3



페이스북 네이버 블로그 굿스웹 쇼핑몰 네이버 카페 굿스웹 트위터 굿스웹 티스토리 Google Play