일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 사무실 필수 엑셀 기능
- 엑셀 화면 최적화
- 파일업로드다운로드
- AWS
- 광고 삽입 방법
- SFTP
- 엑셀 화면 설정
- shell 스크립트
- 엑셀 작업 효율화
- 인증서 저장 실패
- Burp Suite
- 명령어 튜토리얼
- ##_revenue_list_lower_##
- 목록 광고
- 비밀번호 복구
- 엑셀 문자열 처리
- 버프스위트
- 375926784
- 엑셀 사용자 편의 기능
- sleep 명령어
- burpsuite
- pfx 파일 오류
- 리눅스 활용법
- 블로그 광고 설정
- 셀 값 변환
- ##_revenue_list_upper_##
- 엑셀 화면 크기 조정
- 코드 수정 가이드
- 버프슈트
- pam_tally2.so
Archives
- Yesterday
- Today
- Total
250x250
반응형
리눅스 CentOS7 httpd 설치 방법 본문
728x90
반응형
1. httpd 설치
- 명령어 : yum install httpd -y
[root@localhost ~]# yum install httpd -y
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.navercorp.com
* extras: mirror.navercorp.com
* updates: mirror.kakao.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
updates/7/x86_64/primary_db | 20 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-98.el7.centos.6 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-98.el7.centos.6 for package: httpd-2.4.6-98.el7.centos.6.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-98.el7.centos.6.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-98.el7.centos.6 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================
Installing:
httpd x86_64 2.4.6-98.el7.centos.6 updates 2.7 M
Installing for dependencies:
httpd-tools x86_64 2.4.6-98.el7.centos.6 updates 94 k
mailcap noarch 2.1.41-2.el7 base 31 k
Transaction Summary
==============================================================================================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 2.8 M
Installed size: 9.6 M
Downloading packages:
(1/3): httpd-tools-2.4.6-98.el7.centos.6.x86_64.rpm | 94 kB 00:00:00
(2/3): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00
(3/3): httpd-2.4.6-98.el7.centos.6.x86_64.rpm | 2.7 MB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 6.1 MB/s | 2.8 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mailcap-2.1.41-2.el7.noarch 1/3
Installing : httpd-tools-2.4.6-98.el7.centos.6.x86_64 2/3
Installing : httpd-2.4.6-98.el7.centos.6.x86_64 3/3
Verifying : httpd-tools-2.4.6-98.el7.centos.6.x86_64 1/3
Verifying : mailcap-2.1.41-2.el7.noarch 2/3
Verifying : httpd-2.4.6-98.el7.centos.6.x86_64 3/3
Installed:
httpd.x86_64 0:2.4.6-98.el7.centos.6
Dependency Installed:
httpd-tools.x86_64 0:2.4.6-98.el7.centos.6 mailcap.noarch 0:2.1.41-2.el7
Complete!
2. httpd 서비스 시작
- 명령어 : systemctl start httpd
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since 목 2023-03-09 23:59:36 KST; 1s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 1925 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─1925 /usr/sbin/httpd -DFOREGROUND
├─1926 /usr/sbin/httpd -DFOREGROUND
├─1927 /usr/sbin/httpd -DFOREGROUND
├─1928 /usr/sbin/httpd -DFOREGROUND
├─1929 /usr/sbin/httpd -DFOREGROUND
└─1930 /usr/sbin/httpd -DFOREGROUND
3월 09 23:59:36 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
3월 09 23:59:36 localhost.localdomain httpd[1925]: AH00558: httpd: Could not reliably determine the serv
3월 09 23:59:36 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#
3. httpd 서비스 자동 시작 설정하기
- 서버를 재시작하거나 다시 시작할 때마다
httpd 서비스를 수동으로 시작할 필요 없이 자동으로 시작하도록 설정할 수 있습니다.
- 명령어 : systemctl enable httpd
[root@localhost conf]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
4. httpd 구성파일 수정하기
- httpd 구성 파일을 수정하여 웹 서버를 자신의 요구에 맞게 설정할 수 있습니다.
- 예를 들어, 기본 웹 페이지의 경로를 변경하려면
아래 경로의 파일의 DocumentRoot 경로를 원하는 경로로 변경합니다.
- DocumentRoot "/var/www/html"
- 명령어 : vi /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf/httpd.conf
115 # DocumentRoot: The directory out of which you will serve your
116 # documents. By default, all requests are taken from this directory, but
117 # symbolic links and aliases may be used to point to other locations.
118 #
119 DocumentRoot "/var/www/html"
120
121 #
122 # Relax access to content within /var/www.
5. 방화벽에서 httpd 포트 열기
- CentOS 7에서는 방화벽이 기본적으로 활성화되어 있으므로,
httpd를 사용하려면 방화벽에서 httpd 포트를 열어야 합니다.
- 명령어 : firewall-cmd --permanent --add-service=http
- 명령어 : firewall-cmd --reload
[root@localhost conf]# firewall-cmd --permanent --add-service=http
success
[root@localhost conf]# firewall-cmd --reload
success
6. 웹브라우저에서 접속
- 명령어 : http://192.168.1.2(서버의 IP주소) or http://localhost
![]() |
728x90
반응형
'리눅스 > Linux 공부내용' 카테고리의 다른 글
리눅스 CentOS7 RPM 사용 방법 (0) | 2023.05.02 |
---|---|
리눅스 CentOS7 TELNET 설치 방법 (0) | 2023.05.01 |
리눅스 CentOS7 uptime 명령어 사용법 (0) | 2022.12.24 |
리눅스 CentOS7 history 명령어 사용법 (2) | 2022.12.23 |
리눅스 CentOS7 history 날짜/시간 적용 방법(HISTTIMEFORMAT) (0) | 2022.12.21 |
Comments