얕고넓은지식/linux

rocky linux phpmyadmin 설치방법

쪽마 2021. 12. 26. 01:59

어렵게 가지말고

아래꺼 복사해서 넣으면 쉽다

 

혹시 복사할때 주소가 같이복사될수도있어서 댓글에 한번더 적어두겠다

 

 

방화벽을 열어주자

80은 http

443은 https

앞서 포스팅에 인증서 받는 방법도 올려뒀으니까

멀리가지말고 복사해서 사용하도록 하자

https://zzokma.tistory.com/1694

 

rocky linux 8에...ssl 인증서 https 가능하게 만들어보자 Let's Encrypt SSL 무료 인증서로 Apache

앞서...먼저..한방에 설치까지 다 따라하고난뒤에 오면좋다 https://zzokma.tistory.com/1693 rocky linux 웹 서버설치 한방에 따라하기 1. 아파치설치 [root@localhost ~]# dnf install httpd -y 2. db설치 [roo..

zzokma.tistory.com

 

 

 

[root@localhost www]# firewall-cmd --permanent --zone=public --add-service=80

[root@localhost www]# firewall-cmd --permanent --zone=public --add-service=443

[root@localhost www]# firewall-cmd --reload

 

[root@localhost www]# dnf -y install php php-pdo php-pecl-zip php-json php-mbstring php-mysqlnd

[root@localhost www]# dnf -y install libxml2 libxml2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel

[root@localhost ~]# dnf -y install epel-release

[root@localhost /]# dnf -y  install php-gd

[root@localhost www]# mkdir download

[root@localhost download]#  wget https://www.php.net/distributions/php-7.4.10.tar.gz

[root@localhost download]# tar zxvf php-7.4.10.tar.gz

[root@localhost download]# cd php-7.4.10

[root@localhost php-7.4.10]# LIBS="-liconv"

[root@localhost php-7.4.10]# export LIBS

[root@localhost php-7.4.10]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-gd --with-jpeg --with-kerberos --with-freetype --enable-mbstring --enable-sockets --disable-debug --enable-dba=shared --with-iconv-dir=/usr/local/lib64 --with-mhash --with-curl --enable-opcache --with-openssl=/usr/local/openssl

[root@localhost www]# systemctl enable httpd.service

[root@localhost www]# systemctl start httpd.service

 

자....여기까지는 준비

아래부터 phpmyadmin 을 다운해서

압축풀고

위치옮기고

권한주고

접속까지해보자

 

 

[root@localhost www]# wget https://files.phpmyadmin.net/phpMyAdmin/5.0.1/phpMyAdmin-5.0.1-all-languages.zip

[root@localhost www]# unzip phpMyAdmin-5.0.1-all-languages.zip

[root@localhost www]# mv phpMyAdmin-5.0.1-all-languages /usr/share/phpmyadmin

[root@localhost www]# mkdir /usr/share/phpmyadmin/tmp

[root@localhost www]# chown -R apache:apache /usr/share/phpmyadmin

[root@localhost www]# chmod 777 /usr/share/phpmyadmin/tmp

[root@localhost www]# nano /etc/httpd/conf.d/phpmyadmin.conf

 

phpmyadmin.conf파일의 내용은 아래와 같이 입력한다.

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin/>
   AddDefaultCharset UTF-8
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
      Require all granted
     </RequireAny>
   </IfModule>
</Directory>

<Directory /usr/share/phpmyadmin/setup/>
   <IfModule mod_authz_core.c>
 # Apache 2.4
     <RequireAny>
       Require all granted
     </RequireAny>
   </IfModule>
</Directory>

 

 

[root@localhost www]# chcon -Rv --type=httpd_sys_content_t /usr/share/phpmyadmin/*

[root@localhost www]# systemctl restart httpd.service

 

 

https://내도메인이나아이피/phpmyadmin

 

앞서 설정한 비밀번호를 입력후

https://zzokma.tistory.com/1693

 

rocky linux 웹 서버설치 한방에 따라하기

시작전에 업데이트부터해준다 0. [root@localhost ~]# dnf update -y 1. 아파치설치 [root@localhost ~]# dnf install httpd -y 2. db설치 [root@localhost ~]# dnf module list mysql Rocky Linux 8 - App..

zzokma.tistory.com

로그인해보자

 

 

짜란~~

 

반응형