2020. 5. 6.

[Linux] apache 서버 설치 정리


bridege 연결된 153 리눅스에 아파치를 다운받는다.

cd /usr/local/

파일 가져오는 과정 (안정버전)

ftp 192.168.10.11
kst11 #로그인
get httpd-2.2.34.tar.gz
bye

using binary mode to transfer files. 
ftp) cd homedata 
Directory successfully changed. 
ftp) cd down 
Directoy successfully changed. 
ftp) Is 
227 Entering Passive mode 
Here comes the directoy listing. 
øe:16 
as: 15 
dnvxr-xr-x 
dnvxr-xr-x 
dnvxr-xr-x 
dnvxr-xr-x 
dnvxr-xr-x 
dnvxr-xr-x 
3 11324 
2 1ß24 
3 11324 
3 11324 
2 1ß24 
3 11324 
lløø 
141 
29ø 
Apr 
Apr 
Apr 
Apr 
Apr 
Apr 
13 
13 
22 
13 
13 
13 
øø 
: 24 
: 24 
: 24 
Net 
Llt 
a pm 
security 
226 Directoy send OK. 
ftp) cd apm 
Directory successfully changed. 
ftp) get httpd-2.2.34.tar.gz 
local: httpd-2.2.34.tar.gz remote: httpd-2.2.34.tar.gz 
227 Entering Passive mode 
Opening BINARY mode data connection for httpd-2.2.34.tar.gz (7684419 bytes). 
226 Transfer complete. 
7684419 bytes received in ø.ø781 secs (98428.6ø Kbytes/ sec) 
ftp)

cd /usr/local/
tar xvfz httpd-2.2.34.tar.gz
#압축을 푼다

httpd - 2 
httpd - 2 
httpd - 2 
httpd - 2 
httpd - 2 
httpd-2 
httpd - 2 
httpd - 2 
httpd - 2 
httpd-2 2.34/buiId/win32/httpd.rc 
httpd - 2 
2.34/ build apache. ico 
httpd-2 
2.34/ build/ get-version . sh 
httpd - 2 
httpd-2.2.34/build/config.sub 
2.34/buiId/ruIes . mk. in 
2.34/ build / sysv_makefile 
2.34/buiId/instaII.sh 
2.34/ build /UWGNLltaiI. inc 
httpd-2 2.34/buiId/defauIt.pI 
httpd-2 
2.34/buiId/instdso.sh 
2.34/buiId/nw ver. awk 
2.34/ build /make_exports . awk 
2.34/ build 'ma . awk 
httpd-2 2.34/buiId/mkdep. perl 
httpd-2 2.34/buiId/win32/ 
2.34/ build /win32/win32ver. awk 
httpd-2 2.34/buiId/Iibray.mk 
httpd-2 2.34/buiId/buiIdinfo.sh 
httpd-2 2.34/buiId/bsd makefile 
httpd-2 2.34/buiId/Itmain.sh 
2.34/ build/ Printpath 
httpd-2 2.34/buiId/fastgen.sh 
root@153 
tar xvfz httpd 
-2.2 
. 34

cd ./httpd-2.2.34
# 설치된 httpd 하위 디렉토리로 이동
./configure --prefix=/app/apache --enable-so
#
# --enable-so : 동적 라이브러리 사용 가능하게 해준다.

ABOUT APACHE 
Apache.dsw 
8uiIdAII.dsp 
auildain .dsp 
CHANGE s 
INSTALL 
root@153:/usr/local/httpd-22.34 
Croot@153 cd . /httpd-2 
.2.34 
Croot@153 httpd-2.2.34)# Is 
httpd.spec 
LICENSE 
Makefile. in 
Ma kef ile. win 
NOTICE 
UWGNlJm a kef i le 
README 
Installain . d sp REAWE-win32.txt 
READFIE . platforms 
ROAm•tA p 
VERSIONING 
acincIude.m4 
build 
buildccnf 
config. layout 
ccnfigu-e 
configure. in 
docs 
- style 
emac s 
httpd.dep 
httpd.dsp 
httpd.mak 
include 
Iibhttpd.dep 
Iibhttpd.dsp 
Iibhttpd.mak 
modules 
sen'er 
srclib 
s u pport 
test 
Croot@153 httpd-2.2.34)# . 'configure --prefix=/app/apache --enable-so 
checking for chosen layout. 
Apache 
checking for working mkdir -p. 
yes 
checking build system type... x86_64-unknown-Iinux-gnu 
checking host system type... x86_64-unknown-Iinux-gnu 
checking target system type... x86_64-unknown-Iinux-gnu 
Configuring Apache Portable Runtime libray . 
checking for APR... reconfig 
configuring package in srclib/apr now 
checking build system type... 
checking host system type. 
checking target system type. 
x86 64-unknown-linux-gnu 
x86 64-unknown-linux-gnu 
x86 64-unknown-linux-gnu

make
# 컴파일러 소환
make install
# 컴파일해서 설치

root@153:/usr/local/httpd-22.34 
-2.2.34/moduIes/mappers -I/usr/IocaI/httpd-2.2.34/moduIes/database -I/usr/local/ A 
httpd-2.2.34/srcIib/apr/incIude -I/usr/IocaI/httpd-2.2.34/srcIib/apr-utiI/incIud 
e -I/usr/IocaI/httpd-2.2.34/srcIib/apr-utiI/xmI/expat/Iib -I/usr/IocaI/httpd-2.2 
.34/moduIes/proy/. ./generators -I/usr/IocaI/httpd-2.2.34/moduIes/ssI 
-I/usr/loc 
al/ httpd-2.2.34/moduIes/dav/main 
-c 
/ us r/ httpd-2.2.34/srclib/apr/libtool 
--silent --mode=link gcc -g -02 -pthr 
ead 
-o httpd modules. 10 buildmark.o -export-dynamic mo 
dules/aaa/libmod authn file.la modules/aaa/libmod authn default.la modules/aaa/l 
ibmod authz_host.la modules/aaa/libmod authz_groupfile.la modules/aaa/libmod_aut 
hz user.la modules/aaa/libmod authz default.la modules/aaa/libmod auth basic.la 
modules/filters/libmod_include.la modules/filters/libmod filter. la modules/ logge 
modules/metadata/libmod_env.la modules/metadata/libmod_s 
etenvif.la modules/metadata/libmod_version.la modules/http/libmod_http.la module 
s/http/libmod_mime.la modules/generators/libmod_status.la modules/generators/lib 
mod_autoindex.la modules/generators/libmod_asis.la modules/generators/libmod_cgi 
. la modules/mappers/libmod_negotiation.la modules/mappers/libmod_dir.la modules/ 
mappers/libmod_actions.la modules/mappers/libmod_userdir.la modules/mappers/libm 
od_alias.la modules/mappers/libmod_so.la os/uni 
x/ Iibos.la -1m /usr/IocaI/httpd-2.2.34/srcIib/pcre/Iibpcre.Ia /usr/IocaI/httpd-2 
.2.34/srcIib/apr-utiI/IibaprutiI-I.Ia /usr/IocaI/httpd-2.2.34/srcIib/apr-utiI/xm 
I/expat/libexpat.la /usr/IocaI/httpd-2.2.34/srcIib/apr/Iibapr-I.Ia -Irt -Icypt 
-Ipthread -Idl 
makeCI): Leaving directoy /usr/IocaI/httpd-2.2.34' 
Croot@153 httpd-2.2.34)# make instal

#서버 네임을 등록해줘야한다
vi /app/apache/conf/httpd.conf

입력해준다.
ServerName localhost

root@153:/usr/local/httpd-22.34 
# as error documents. 
e.g. admin@your-domain.com 
SetwerAdmin you@example.com 
# Server-Name gives the name and port that the server uses to identify itself. 
# This can often be determined automatically, but we reconnend you specify 
# it explicitly to prevent problems during startup. 
# If your host doesn't have a registered DNS name, enter its IP address here. 
*Server-Name paw.example.com:W 
SetwerName localhost 
# DocumentRoot: The directoy out of which you will semie your 
# documents. By default, all requests are taken from this directoy, but 
# symbolic links and aliases may 
DocumentRoot "/app/apache/htdocs" 
# Each directoy to which Apache 
to which setwices and features 
be used to point to other locations. 
has 
access can be configured with respect 
allowed and/or disabled in that

# Apache 서버 구동
# 항상 아파치는 이렇게 실행해야한다.
/app/apache/bin/apachectl start

root@153:/usr/local/httpd-22.34 
Croot@153 httpd-2.2.34)# /app/apache/bin/apachectl 
httpd (pid 48521) already running 
Croot@153 httpd-2.2.34)# /app/apache/bin/apachectl 
Croot@153 httpd-2.2.34)# 
1 
sta rt 
resta rt

#구동확인

같은 네트워크에서 접속해본다
192.168.10.153

centos 7 152 
11 
192.168.10.153/ 
It works! 
Firefox 
@ 192.168.10.153

댓글 없음:

댓글 쓰기