본문 바로가기

공부

vi 편집 연습, Source설치

vlan 연습

서브넷팅없이 연습.

위 사진에 적힌대로 ip configuration.

스위치 CLI

en
conf t
vlan 10
name admin
vlan 20
name sales
vlan 30
name tech
exit
int r fa0/1-4
sw a vl 10
int r fa0/5-8
sw a vl 20
int r fa0/9-12
sw a vl 30

int r f0/23-24

sw mo t

쭉 복사해서 스위치 세대에 모두 복붙해줍니다.

do wr

en
conf t
vlan 100
name admin
vlan 200
name sales
vlan 300
name infra
vlan 400
name tech
exit
int r fa0/1-5
sw a vl 100
int r fa0/6-10
sw a vl 200
int r fa0/11-15
sw a vl 300
int r fa0/16-20
sw a vl 400
int r f0/23-24
sw mo t
do wr

스위치 하나에 트렁크모드를 해놓으면 이어지는 인터페이스쪽은 신경안써도 됩니다.

위 사진같은 경우에 왼쪽 두개 스위치에 트렁크모드를 해놓으면 오른쪽 스위치는 포트까지만 switch access해주면 됩니다.

 

 

 

1. Source 설치 3단계
 1.1. 환경설정: 설치 위치나 필요 라이브러리등을 지정
#./configure --prefix=설치할디렉토리 --with-라이브러리 or 다른 source 설치파일 지정
 1.2. 컴파일: 사람이 인식할 수 있는 프로그래밍 언어로 작성된 코드를 기계어로 번역하는 과정
# make     <-> make disclean
 1.3. 설치: App 설치
# make install <-> make uninstall

 

 

apache httpd를 설치해보겠습니다.

일단 wget bzip2 gcc gcc-c++ expat-devel 다섯가지를 yum으로 먼저 설치해줘야합니다.

일단 wget bzip2를 먼저 설치해놓습니다.

yum install -y wget bzip2

apache.org --> downloads --> distributions 에 들어갑니다.

httpd로 들어가서 bzip2버전에 마우스 오른쪽키 -> 링크주소 복사

복사하고 wget 붙여넣기.

 

빨간부분이 붙여넣기한 부분입니다.

tar xvfj http......(방금다운로드받은 아카이브된 파일)

 

ls로 확인합니다.

./configure --prefix=/usr/local/apache2

이라고 치면 apr, apr-util이라는 의존성파일이 필요하다고 나옵니다.(스크린샷이 삭제됐습니다...)

 

apr도 apache.org에서 찾아서 주소복사합니다.

https://downloads.apache.org/apr/apr-1.7.4.tar.bz2

그대로 wget https://downloads.apache.org/apr/apr-1.7.4.tar.bz2

똑같이 tar해서 아카이브를 풀어줍니다.

yum으로 gcc gcc-c++ expat-devel 설치합니다.

다시 ./configure --prefix=/web/apr 

make

make install

 

/web/apr에 설치됐습니다.

 

cd .. 으로 /web으로 돌아갑니다.

aprutil도 wget해줍니다.

wget https://downloads.apache.org/apr/apr-util-1.6.3.tar.bz2

tar xvfj apr-util-1.6.3.tar.bz2

cd apr-util-1.6.3

./configure --prefix=/web/aprtuil

ARP를 찾지 못합니다.

./configure --prefix=/web/aprutil --with-apr=/web/apr

make

make install

 

자꾸 fatal error라고 하면서 make && make install이 안됩니다...

아까 분명 yum으로 expat-devel 받았는데 ... 다시 받아줍니다.

실수로 expat.devel이라고 쳣네요...

다시 받은 다음 cd /web/apr-util....

make

make install

드디어 aprutil이 만들어졌습니다.

 

아직 pcre가 없어서 설치가 되지 않습니다.

pcre도 똑같이 pcre.org에서 다운로드 링크 주소 복사해서 가져옵니다.

cd ..

wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2(pcre.org에서 가져온 링크주소)

ssl인증서 문제로 인해 가져와지지 않는 모습.

--no-check-certificate를 붙여줍니다.

wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2 --no-check-certificate

 

 

설치가 되었습니다.

아카이브해제 후

cd pcre-8.45

./configure --prefix=/web/pcre

make

make install

모든 준비는 끝났습니다

 

cd ../httpd-2.4.58

./configure --prefix=/usr/local/apache2 --with-apr=/web/apr --with-apr-util=/web/aprutil --with-pcre=/web/pcre/bin/pcre-config

make

make install

/usr/local/apache2/bin/apachectl start

 

 

 

 

작업공간지정 -> #!

스크립트 생성. 설치 자동화.

 

#! /bin/bash

yum install -y wget bzip2 gcc gcc-c++ expat-devel
mkdir /web
cd /web


wget https://downloads.apache.org/httpd/httpd-2.4.58.tar.bz2
wget https://downloads.apache.org/apr/apr-1.7.4.tar.bz2
wget https://downloads.apache.org/apr/apr-util-1.6.3.tar.bz2
wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2 --no-check-certificate
tar xvfj httpd-2.4.58.tar.bz2
tar xvfj apr-1.7.4.tar.bz2
tar xvfj apr-util-1.6.3.tar.bz2
tar xvfj pcre-8.45.tar.bz2
cd apr-1.7.4
./configure --prefix=/web/apr ; make ; make install
cd ../apr-util-1.6.3
./configure --prefix=/web/aprutil --with-apr=/web/apr ; make ; make install
cd ../pcre-8.45
./configure --prefix=/web/pcre ; make ; make install
cd ../httpd-2.4.58
./configure --prefix=/usr/local/apache2 --with-apr=/web/apr --with-apr-util=/web/aprutil --with-pcre=/web/pcre/bin/pcre-config
make ; make install
/usr/local/apache2/bin/apachectl start


※파일두개를 비교하는 명령어 cmp, diff

cmp보다 diff가 더 유용하기때문에 diff를 더 자주 씁니다.

 

오늘도 고생하셨습니다.

 

'공부' 카테고리의 다른 글

패킷트레이서, 리눅스를 사용한 dhcp  (0) 2024.02.13
interVLAN, Process 기초  (0) 2024.02.08
패키지관리  (1) 2024.02.06
LVM(Logical Volume Manager)  (0) 2024.02.05
리눅스 복습 !  (0) 2024.02.04