2023-10-31 13:05:13
728x90

untangle + apache,php + MySQL 구조 그림
구성도

728x90

web
ip 설정
selinux 설정
yum install -y httpd
vi /etc/httpd/conf/httpd.conf 164 index.php 변경
yum install -y epel-release yum-utils
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php73
yum install -y php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
php 파일 이동 및 변경
systemctl enable --now httpd

db
ip 설정
selinux 설정
yum install -y http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
vi /etc/yum.repos.d/mysql-community.repo 5.7버전 gpg값 0으로 변경
yum install -y mysql-community-server
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --reload
systemctl enable --now mysqld
cat /var/log/mysqld.log | grep password 패스워드 확인
mysql_secure_installation 설정 변경
mysql -uroot -pIt12345!
grant all privileges on *.* to 'root'@'%' identified by 'It12345!'
create database test;
create database member;
use member;
create table member (no int not null, id varchar(30) not null, name varchar(30) not null, phone varchar(30) not null, address varchar(100) not null);

 

인터페이스 추가, Internal1이 HostOnly의 gateway가 되고 Internal2가 VMnet2의 Gateway가 된다.
NetWork -> Advanced -> Access Rules

 

80번 포트에 대한 포트포워딩 작업
80번 포트의 도착지는 172.254.0.11(web)으로 포트포워딩
10.0.0.1의 주소를 입력하고 접속해도 172.254.0.11(web)의 http 화면을 띄워준다

728x90