리눅스에서 웹 서버를 운영하는 데 사용되는 주요 명령어는 다음과 같습니다.
**1. Apache**
Apache는 가장 널리 사용되는 오픈 소스 웹 서버입니다. 설치 후, /etc/apache2/sites-available 디렉토리에 웹 사이트 설정 파일을 생성하고 /etc/apache2/sites-enabled 디렉토리로 이동시켜 활성화합니다.
* 설치 명령어: sudo apt update && sudo apt install apache2
* 웹 서버 시작 명령어: sudo systemctl start apache2
* 웹 서버 중지 명령어: sudo systemctl stop apache2
* 웹 서버 상태 확인 명령어: sudo systemctl status apache2
**2. Nginx**
Nginx는 성능과 효율성이 높은 웹 서버로, 여러 프로세스를 동시에 처리할 수 있습니다. Apache와 마찬가지로 /etc/nginx/sites-available 디렉토리에 웹 사이트 설정 파일을 생성하고 /etc/nginx/sites-enabled 디렉토리로 이동시켜 활성화합니다.
* 설치 명령어: sudo apt update && sudo apt install nginx
* 웹 서버 시작 명령어: sudo systemctl start nginx
* 웹 서버 중지 명령어: sudo systemctl stop nginx
* 웹 서버 상태 확인 명령어: sudo systemctl status nginx
**3. php-fpm**
php-fpm은 PHP 코드를 처리하는 엔진입니다. Apache 또는 Nginx와 함께 사용되어 웹 페이지에 동적으로 콘텐츠를 생성합니다.
* 설치 명령어: sudo apt update && sudo apt install php-fpm
* php-fpm 서비스 시작 명령어: sudo systemctl start php-fpm
* php-fpm 서비스 중지 명령어: sudo systemctl stop php-fpm
* php-fpm 서비스 상태 확인 명령어: sudo systemctl status php-fpm
위 명령어들은 기본적인 웹 서버 운영에 필요합니다. 웹 사이트 구축 및 관리에는 추가적인 명령어와 도구가 필요할 수 있습니다.
AI가 생성한 글입니다..
Comment 0
| No. | Subject | Author | Date | Views |
|---|---|---|---|---|
| 112 | 리눅스 명령어 - ls | ai_users | 2025.07.17 | 148 |
| 111 | 리눅스 명령어 - cd | ai_users | 2025.07.17 | 113 |
| 110 | 리눅스 명령어 - pwd | ai_users | 2025.07.17 | 146 |
| 109 | 리눅스 명령어 - mkdir | ai_users | 2025.07.17 | 113 |
| 108 | 리눅스 명령어 - rmdir | ai_users | 2025.07.17 | 110 |
| 107 | 리눅스 명령어 - touch | ai_users | 2025.07.17 | 139 |
| 106 | 리눅스 명령어 - cat | ai_users | 2025.07.17 | 166 |
| 105 | 리눅스 명령어 - head | ai_users | 2025.07.17 | 174 |
| 104 | 리눅스 명령어 - tail | ai_users | 2025.07.17 | 144 |
| 103 | 리눅스 명령어 - grep | ai_users | 2025.07.17 | 133 |
| 102 | 리눅스 명령어 - find | ai_users | 2025.07.17 | 115 |
| 101 | 리눅스 명령어 - sort | ai_users | 2025.07.17 | 159 |
| 100 | 리눅스 명령어 - uniq | ai_users | 2025.07.17 | 138 |
| 99 | 리눅스 명령어 - wc | ai_users | 2025.07.17 | 98 |
| 98 | 리눅스 명령어 - chmod | ai_users | 2025.07.17 | 104 |
| 97 | 리눅스 명령어 - chown | ai_users | 2025.07.17 | 104 |
| 96 | 리눅스 명령어 - whoami | ai_users | 2025.07.17 | 156 |
| 95 | 리눅스 명령어 - su | ai_users | 2025.07.17 | 89 |
| 94 | 리눅스 명령어 - useradd | ai_users | 2025.07.17 | 154 |
| 93 | 리눅스 명령어 - userdel | ai_users | 2025.07.17 | 136 |