vcpkg로 설치한 Qt 라이브러리와 Qt Maintenance Tool(공식 Qt 설치 도구)로 설치한 Qt 라이브러리는 기술적으로 동시에 시스템에 존재할 수 있지만, 일반적인 프로젝트에서 동시에 함께 사용하는 것은 권장되지 않으며, 여러 문제가 발생할 수 있습니다.

주요 이유와 주의점은 다음과 같습니다:

  • 경로 충돌 및 우선순위 문제
    • CMake 프로젝트의 경우, vcpkg가 설치한 Qt가 CMAKE_PREFIX_PATH 등에서 우선적으로 인식되어, QtCreator에서 선택한 공식 Qt 버전 대신 vcpkg의 Qt가 자동으로 사용될 수 있습니다
    • QtCreator의 Kit 설정이나 Maintenance Tool로 설치한 Qt가 무시될 수 있습니다
  • Visual Studio 및 Qt VS Tools와의 호환성
    • Qt VS Tools(Visual Studio용 Qt 확장)는 vcpkg로 설치한 Qt의 폴더 구조와 공식 Qt 설치의 구조가 다르기 때문에, vcpkg로 설치한 Qt와 완벽하게 호환되지 않을 수 있습니다
    • 특히 디버그/릴리즈 라이브러리 경로, qmake.exe 위치, mkspecs 등에서 문제가 발생할 수 있습니다.
  • 라이브러리 버전 충돌
    • 두 설치 방식으로 서로 다른 Qt 버전이 설치되어 있다면, 프로젝트에서 예기치 않은 라이브러리 버전이 링크되어 런타임 오류가 발생할 수 있습니다.
    • 특히 Qt의 바이너리 호환성 정책에 따라, 일부 버전 간에는 혼용이 불가능할 수 있습니다.
  • 폴더 구조 및 경로 문제
    vcpkg로 설치한 Qt는 공식 Qt 설치와 폴더 구조와 경로가 다릅니다. 예를 들어, qmake.exe가 위치한 경로가 다르고, 라이브러리와 플러그인, mkspecs 등도 분리되어 있습니다
  • 디버그/릴리즈 라이브러리 분리
    vcpkg는 디버그와 릴리즈 라이브러리를 각각 다른 폴더에 저장하는 반면, 공식 Qt 설치에서는 동일 폴더에 저장하는 경우가 많아 빌드 환경에서 혼란이 생길 수 있습니다
  • 실제 사용 방법
    • 동시에 사용하는 것은 피하고, 하나의 방식(공식 설치 또는 vcpkg 설치)만 사용하는 것이 안정적입니다.
    • 특정 프로젝트에서는 vcpkg의 Qt를, 다른 프로젝트에서는 공식 설치 Qt를 사용하는 방식으로 분리할 수 있지만, 환경 변수 및 빌드 설정에 주의해야 합니다

결론:
vcpkg로 설치한 Qt와 Qt Maintenance Tool로 설치한 Qt는 동시에 시스템에 존재할 수 있지만, 동일한 프로젝트에서 함께 사용하는 것은 권장되지 않으며, 빌드 및 실행 환경에서 예기치 않은 문제가 발생할 수 있습니다. 프로젝트별로 한 가지 설치 방식만 사용하는 것이 가장 안전합니다.

 

참고

https://forum.qt.io/topic/157554/vs-tools-in-vs2022-do-not-work-with-vcpkg-installed-qt6

https://github.com/microsoft/vcpkg/issues/2643

https://forum.qt.io/topic/96818/integrate-qt-vs-tools-with-vcpkg-installed-qt

https://www.qtcentre.org/threads/71952-CMake-vcpkg-qt-takes-precedence-over-onlineinstaller-qt

vcpkg는 마이크로소프트(Microsoft)와 C++ 커뮤니티가 유지·관리하는 오픈소스 C/C++ 패키지 관리자로, Windows, macOS, Linux 등 다양한 플랫폼에서 사용할 수 있습니다
Python의 pip, Node.js의 npm, Rust의 cargo와 비슷한 역할을 하며, C/C++ 개발 환경에서 라이브러리 의존성 관리를 크게 단순화합니다

 

vcpkg는 2016년에 처음 공개되었습니다. 공식적으로는 Microsoft가 CppCon 2016에서 처음 발표하였으며, 그 이후로 Windows, macOS, Linux 등 다양한 플랫폼에서 사용할 수 있는 C/C++ 패키지 관리자로 발전해왔습니다

 

vcpkg는 다음과 같은 특징이 있습니다:

  • 플랫폼 간 호환성: Windows, macOS, Linux에서 동일한 방식으로 라이브러리를 설치할 수 있습니다
  • 오픈소스 라이브러리 지원: 수천 개의 고품질 오픈소스 라이브러리를 쉽게 설치하고 관리할 수 있습니다
  • 직접 빌드: 라이브러리의 소스 코드를 직접 다운로드해 컴파일하는 방식을 사용하므로, 다양한 환경에서 동작하는 라이브러리를 얻을 수 있습니다
  • 빌드 시스템 통합: CMake, MSBuild 등 다양한 빌드 시스템과 자동으로 연동되어, 프로젝트에 라이브러리를 쉽게 추가할 수 있습니다
  • 버전 관리 및 의존성 관리: 라이브러리 버전 충돌이나 의존성 문제를 효과적으로 관리할 수 있습니다.
  • 프라이빗 레지스트리 지원: 내부적으로 사용하는 라이브러리도 별도의 레지스트리로 관리할 수 있습니다

vcpkg를 사용하면, 예를 들어 명령 프롬프트에서 아래와 같이 라이브러리를 설치할 수 있습니다:

 
bash
vcpkg install vcpkg install qt6-base

이렇게 하면 qt6-base 라이브러리를 64비트 Windows 환경에 설치할 수 있습니다

 

정리하자면, vcpkg는 C/C++ 개발자가 다양한 라이브러리를 쉽게 설치·관리할 수 있도록 도와주는 플랫폼 간 패키지 관리 도구입니다.

 

참고

vcpkg 설명서

 

vcpkg 설명서

vcpkg는 선도적인 플랫폼 간 C/C++ 패키지 관리자입니다. 수천 개의 고품질 오픈 소스 라이브러리에 액세스하여 애플리케이션을 강화하고 내부적으로 프라이빗 구성 요소 컬렉션을 공유합니다.

learn.microsoft.com

https://jungwoong.tistory.com/77

 

[Tool] vcpkg 설치 및 사용법

vcpkg란 vcpkg는 Windows linux와 MacOs 에서 C와 C++ 라이브러리 관리를 도와줍니다. 자세한 설명은 아래의 링크를 통해서 알 수 있습니다. https://docs.microsoft.com/ko-kr/cpp/build/vcpkg?view=vs-2019 vcpkg: Windows, Linux

jungwoong.tistory.com

https://velog.io/@seongcheoljeon/Vcpkg

 

Vcpkg (Visual C++ Package Manager)

vcpkg는 Microsoft에서 배포하고 C++ 커뮤니티에서 유지 및 관리하는 오픈 소스 C/C++ 패리지 관리자이다. C/C++ 개발자 환경의 고유한 문제를 해결하기 위해 처음부터 설계되었다.2016녕에 시작된 이 기

velog.io

 

'개발 > C,C++' 카테고리의 다른 글

[Visual Studio] 단축키  (0) 2023.02.28
.dll과 .lib의 차이  (0) 2023.02.23
[C++] invalid new-expression of abstract class type 에러  (0) 2022.04.10

사용자 계정 확인

전체 사용자 계정 확인

cat /etc/passwd

 

useradd를 이용해 등록된 사용자만 보기

grep /bin/bash /etc/passwd

 

사용자 계정 설명

adm

시스템 관리자를 위한 별도의 계정

 

lp

로컬 프린터 서버 계정

 

sync

원격지 서버 동기화 계정

 

shutdown

시스템 종료 계정

 

halt

강제 시스템 종료 계정

 

news

뉴스그룹 서버용 계정

 

uucp

유닉스 시스템과 파일 복사를 위한 프로토콜 계정

 

operator

특수목적용 계정으로, 시스템 백업 등 여러 사용자가 시스템을 공통 관리하기 위해 사용되는 계정

 

games

X11(X윈도우) 화면에서 게임을 할 때 사용하는 계정

 

avahi-autoipd

DNS 관련된 계정

avahi-autoipd is a service provided by the Avahi daemon on Linux, which implements network services discovery using the mDNS/DNS-SD (Multicast DNS / DNS Service Discovery) protocol. Specifically, avahi-autoipd is responsible for assigning an Automatic Private IP Addressing (APIPA) address to a network interface when it cannot obtain an IP address from a DHCP server.

 

avahi-autoipd is part of the Avahi service on Linux systems and is responsible for assigning link-local IP addresses (APIPA addresses) when a DHCP server is unavailable. It helps maintain basic network connectivity on local networks and is part of the broader Zero Configuration Networking (zeroconf) system.

 

tss

암호화 키 생성, 플랫폼 무결성 검증과 관련된 TPM 소프트웨어 스택 관리용 계정

The tss user on a Linux system is a system user created to manage the Trusted Platform Module (TPM) software stack. TPM is a hardware component that provides secure generation and storage of cryptographic keys, as well as platform integrity verification.

The tss user is associated with the TrouSerS software (or other TPM-related software), which is the open-source implementation of the TPM Software Stack (TSS). This user is created to run the TPM-related services with minimal privileges for security purposes.

 

The tss user in Linux is a system account created to manage the TPM Software Stack (TSS) and run TPM-related services, ensuring secure interactions with the Trusted Platform Module (TPM). It provides essential security features for cryptography, encryption, and platform integrity in systems with TPM hardware.

 

postfix

메일 전송 관련 계정

The postfix user on a Linux system is a system account created for the Postfix mail transfer agent (MTA). Postfix is a widely used open-source software for routing and delivering email. It’s designed to be secure, fast, and easy to configure, often serving as a replacement for the older Sendmail MTA.

The postfix user is used to run Postfix services and processes with minimal privileges, adhering to the principle of least privilege to enhance security.

 

The postfix user on Linux is a system account created to run the Postfix mail transfer agent (MTA). It ensures that Postfix's email processing tasks are handled securely by limiting privileges, as most Postfix processes run under the postfix user instead of root. This helps enhance the security of the mail server and minimizes the risk of exploitation.

 

saslauth

인증 관련 계정

The saslauth user on a Linux system is a system account associated with the Cyrus SASL (Simple Authentication and Security Layer) authentication library. SASL is a framework that provides authentication and data security services for network protocols such as SMTP, IMAP, and LDAP.

The saslauth user is created to run the SASL authentication daemon (saslauthd), which handles authentication requests from various services and applications. This system account ensures that the saslauthd service runs with minimal privileges, adhering to security best practices.

 

The saslauth user on Linux is a system account used to run the SASL authentication daemon (saslauthd), which provides secure user authentication for various services like email, LDAP, and others. The saslauth user ensures that the saslauthd process runs with minimal privileges, enhancing the overall security of the system by reducing potential attack surfaces.

 

polkitd

시스템 전체 권한 관리용 계정

The polkitd user on a Linux system is a system account used by Polkit (formerly known as PolicyKit), which is a framework for managing system-wide privileges. Polkit is commonly used to handle authorization for actions that require elevated privileges (such as running administrative tasks) in a controlled and secure manner.

 

The polkitd user in Linux is a system account used to run the Polkit daemon (polkitd), which is responsible for managing and making authorization decisions on privileged system actions. By running Polkit with minimal privileges under the polkitd user, the system enhances security while allowing non-root users to perform administrative tasks based on defined policies.

 

nobody

최소 권한이 필요한 프로세스용 계정

The nobody user on a Linux system is a system account used for processes that do not require ownership by a specific user or for which minimal privileges are necessary. This account is commonly used to run services and processes that don’t need access to any critical system resources or files. By running these services under the nobody user, the system limits their access, improving security.

 

The nobody user on Linux is a non-privileged system account used to run processes with minimal system access. It provides an extra layer of security by ensuring that services that don’t need high privileges can only interact with limited parts of the system. This user is commonly used for network-facing services, daemons, or temporary file ownership, and it operates with the least possible permissions to reduce security risks.

 

named

DNS 서버용 계정

The named user on a Linux system is a system account created for running the BIND (Berkeley Internet Name Domain) service, which is one of the most common DNS (Domain Name System) server software packages. The BIND DNS server (often called named, short for name daemon) translates domain names into IP addresses and vice versa.

The named user ensures that the DNS server runs with limited privileges, adhering to the principle of least privilege, which enhances security by minimizing the potential damage that could occur if the DNS service were compromised.

 

The named user on Linux is a system account created to run the BIND DNS server daemon (named) with limited privileges. This enhances the security of the system by ensuring that the DNS service, which is often exposed to the internet, cannot access or modify sensitive files. BIND is one of the most widely used DNS server software packages, and running it under the named user follows the principle of least privilege to reduce security risks.:

DB 포트 변경

기본 DB 포트가 아닌, 다른 포트로 변경하는게 보안상 더 안전하다.

(포트 변경 후, 외부에서 포트로 접속 하려면 해당 포트 방화벽에서 열어주어야 함)

 

1. 서버 접속 후 db 설정파일 열기

vi /etc/my.cnf.d/server.cnf

 

2. 다음 설정 파일에서 [mysql] 섹션 바로 아래에 port 변경

[mysqld]

port=바꿀 포트 번호

 

3. 포트번호 변경 후 저장하고 mariadb 재기동

systemctl restart mariadb

 

4. mariadb 실행중 포트 확인

netstat -tnlp

 

DB 루트 패스워드 변경

기본 루트 패스워드 쓰지 말고, 복잡한 패스워드로 바꾼다.

 

1. DB 접속

mysql -u root -p

 

2. 패스워드 업데이트

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_secure_password');

 

3. 권한 flush

FLUSH PRIVILEGES;

 

4. 패스워드 포맷 확인

USE mysql; SELECT Host, User, Password FROM user WHERE User = 'root';

 

사용자 계정 생성 & 권한 설정

root계정은 외부 접속 못하게 한다. 사용자 계정도 가급적 내부 접속만 허용하게 한다.

 

1. 사용자 생성

# create user '계정'@'접속위치' identified by '패스워드';

ex) create user 'test'@'127.0.0.1' identified by 'Password'; -- 내부접속만 허용

ex) create user 'test2'@'%' identified by 'Password'; -- 외부접속 허용

 

2. 권한 주기

전체 권한 부여 (접속 위치에 %는 쓰지 말도록 하자. 가급적 localhost만 쓰거나, ip를 특정하는 것이 좋다.)

grant all privileges on DB이름.테이블 to '계정'@'접속위치';

ex) grant all privileges on testDB.* to 'test2'@'%';

ex) grant all privileges on testDB.* to 'test2'@'localhost';

 

usage (삭제하면 로그인조차 안됨) 권한 부여, 삭제

usage 권한 부여

mysql> GRANT USAGE ON *.* TO USER_NAME@HOST IDENTIFIED BY 'USER_NAME';

 

usage 권한 삭제

mysql> REVOKE USAGE ON *.* FROM USER_NAME@HOST;

 

3. 권한 적용

flush privileges;

 

4. 권한 확인

show grants for '계정'@'접속위치';

 

외부접속 허용제거

가급적 모든 아이디의 외부 접속을 막고, 꼭 필요하다면 아이피를 특정하여 외부 접속을 허용한다.

 

% 모든아이피 허용제거
mysql> DELETE FROM mysql.user WHERE Host=’%’ AND User=’아이디’;

 

특정ip허용 제거
mysql> DELETE FROM mysql.user WHERE Host=’111.111.111.111′ AND User=’아이디’;

 

설정적용
mysql> FLUSH privileges;

 

사용자 확인

select host, user, password from mysql.user;

 

DB 백업/복구, 자동백업(crontab)

해킹을 대비하여, 매일 DB 백업을 하도록 설정한다.

- crontab에 db 백업 스크립트 등록하여, 자동으로 백업하도록 설정

- 백업 파일이 쌓이면 디스크 full 날 수 있으므로, 특정 주기로 예전 백업은 삭제하도록 설정

https://foxydog.tistory.com/94

 

 

 

 

참고

https://tipland.tistory.com/47 

https://da-new.tistory.com/237

https://blog.servis.co.kr/index.php/2019/06/28/mysql-not-allowed-to-connect/

https://grmn.tistory.com/7

 

 

1. OPcache 정보 보기

<?php
$status = opcache_get_status();
echo json_encode($status, JSON_PRETTY_PRINT);
?>

 

 

2. 항목 설명

The opcache_get_status function in PHP returns an associative array containing information about the current status of the OPcache (Opcode Cache). Each key in the array represents a different aspect of the OPcache status. Here are some common items that you might find in the opcache_get_status results:

  1. opcache_enabled:
    • Description: Indicates whether OPcache is enabled or not.
    • Possible Values: true if enabled, false if disabled.
  2. cache_full:
    • Description: Indicates whether the OPcache shared memory is full.
    • Possible Values: true if the shared memory is full, false otherwise.
  3. restart_pending:
    • Description: Indicates whether a restart of the OPcache is pending.
    • Possible Values: true if a restart is pending, false otherwise.
  4. restart_in_progress:
    • Description: Indicates whether a restart of the OPcache is currently in progress.
    • Possible Values: true if a restart is in progress, false otherwise.
  5. memory_usage:
    • Description: Provides information about memory usage in the OPcache (unit : bytes).
    • Items:
      • used_memory: Amount of memory used by the OPcache.
      • free_memory: Amount of free memory in the OPcache.
      • wasted_memory: Amount of memory wasted by fragmentation.
  6. interned_strings_usage:
    • Description: Information about interned strings, which are unique string values stored in a single memory location to reduce duplication.
    • Items:
      • buffer_size: Size of the interned strings buffer.
      • used_memory: Amount of memory used by interned strings.
      • free_memory: Amount of free memory in the interned strings buffer.
      • number_of_strings: Number of interned strings.
  7. opcache_statistics:
    • Description: Provides statistical information about the OPcache.
    • Items:
      • num_cached_scripts: Number of scripts cached by OPcache.
      • num_cached_keys: Number of cache keys (unique script identifiers).
      • max_cached_keys: Maximum number of cache keys allowed.
      • hits: Number of cache hits.
      • misses: Number of cache misses.
      • blacklist_misses: Number of blacklist misses (scripts excluded from caching).
      • blacklist_miss_ratio: Ratio of blacklist misses to total cache misses.
      • opcache_hit_rate: Ratio of cache hits to total access attempts.

These are some of the common items you might find in the opcache_get_status results. The exact list may vary depending on your PHP version and configuration. Always refer to the PHP documentation for the specific version you are using for the most accurate and up-to-date information.

'개발 > PHP' 카테고리의 다른 글

[PHP] PHP의 철학  (0) 2024.02.22
[PHP] Composer 사용법  (0) 2023.08.08
PHP opcache 적용  (0) 2023.02.20
[PHP] PHP-FPM 적용하기 (Centos7)  (0) 2023.02.17
[PHP] 윈도우에서 php 7.4로 업그레이드 및 VScode 디버깅 설정  (0) 2023.02.07

by ChatGPT

1. 실용성

PHP는 실용적이고 접근 가능한 스크립팅 언어로 설계되었습니다. 사용 편의성과 빠른 개발을 우선시하므로 웹 개발에 널리 사용됩니다. 구문은 상대적으로 간단하고 관대하므로 개발자는 복잡성을 최소화하면서 작업을 수행할 수 있습니다.


2. 웹 중심

PHP는 원래 웹 개발용으로 설계되었으며 동적 웹 페이지를 만드는 데 탁월합니다. 주요 사용 사례는 HTML 콘텐츠를 동적으로 생성하는 서버 측 스크립팅이며 웹 서버와 원활하게 통합됩니다.


3. 아무것도 공유하지 않는 아키텍처

앞서 언급했듯이 PHP는 각 요청이 독립적이고 요청 간에 공유 상태가 없는 비공유 아키텍처를 따릅니다. 이 접근 방식은 개발 모델을 단순화하고 더 나은 확장성을 지원합니다.

 

4. 오픈 소스 및 커뮤니티 중심

PHP는 오픈 소스이며 개발은 커뮤니티 기여에 크게 의존합니다. PHP 커뮤니티는 개발자들이 토론, 버그 보고, 확장 기능 및 프레임워크 생성을 통해 언어 성장에 적극적으로 기여하는 협업 정신으로 잘 알려져 있습니다.

 

5. 유연성

PHP는 유연성으로 유명합니다. 절차적 프로그래밍 패러다임과 객체 지향 프로그래밍 패러다임을 모두 지원하므로 개발자는 자신의 요구에 가장 적합한 스타일을 선택할 수 있습니다. 이러한 유연성 덕분에 PHP는 다양한 프로젝트에서 널리 채택되고 사용됩니다.

 

6. 상호 운용성

PHP는 다양한 데이터베이스, 웹 서버 및 외부 라이브러리와 쉽게 통합될 수 있습니다. 데이터베이스와의 상호 작용을 광범위하게 지원하므로 데이터베이스 기반 웹 애플리케이션에 대한 일반적인 선택입니다.

 

7. 진화와 적응성

PHP는 초기부터 정기적인 릴리스를 통해 새로운 기능, 개선 사항 및 성능 향상이 도입되면서 크게 발전해 왔습니다. 언어는 변화하는 웹 개발 동향과 표준에 적응해 왔습니다.

 

8. 순수함보다 실용주의

PHP는 프로그래밍 원칙을 엄격히 준수하는 것보다 실용적인 솔루션을 우선시하는 경우가 많습니다. 이러한 실용주의는 신속한 개발과 배포가 중요한 웹 개발 분야에서 인기를 얻는 데 기여했습니다.

'개발 > PHP' 카테고리의 다른 글

[PHP] OPcache 정보 보기  (0) 2024.02.24
[PHP] Composer 사용법  (0) 2023.08.08
PHP opcache 적용  (0) 2023.02.20
[PHP] PHP-FPM 적용하기 (Centos7)  (0) 2023.02.17
[PHP] 윈도우에서 php 7.4로 업그레이드 및 VScode 디버깅 설정  (0) 2023.02.07

프로세스(Process)란

컴퓨팅에서 프로세스는 하나 이상의 스레드에 의해 실행되는 컴퓨터 프로그램의 인스턴스입니다. (운영체제로부터 메모리/CPU 등의 자원을 할당받는 작업의 단위입니다.)

프로세스는 프로그램 코드, 할당된 시스템 리소스, 물리적 및 논리적 액세스 권한, 실행 활동을 시작, 제어 및 조정하는 데이터 구조를 포함합니다. 프로세스는 최소한 하나의 스레드를 포함하며, OS에 따라 명령을 동시에 실행하는 여러 실행 스레드로 구성될 수 있습니다.

프로그램과의 차이

컴퓨터 프로그램은 일반적으로 디스크의 파일에 저장된 명령의 수동적 모음인 반면, 프로세스는 디스크에서 메모리로 로드된 후 해당 명령을 실행하는 것입니다. 여러 프로세스가 동일한 프로그램과 연관될 수 있습니다. 예를 들어, 동일한 프로그램의 여러 인스턴스를 열면 둘 이상의 프로세스가 실행되는 경우가 많습니다.

프로세스 끼리는 자원을 공유하지 않습니다.

각 프로세스는 자신만의 고유한 메모리와 자원을 할당받아 사용하기에, 타 프로세스와는 자원을 공유하지 않습니다.

이에 한 프로세스가 다른 프로세스의 자원에 접근하려면 프로세스 간의 통신(IPC, inter-process communication)을 사용해야 합니다.

프로세스의 문제점은?

- 프로세스 생성에 큰 오버헤드가 있음 ( 프로세스를 생성할때 많은 시간이 소요됨)

- 프로세스 컨텍스트 스위칭의 비효율성, 오버헤드가 큼

- 프로세스 사이에 통신이 어렵다는점 (IPC사용해야함)

 

Process (computing) - Wikipedia

From Wikipedia, the free encyclopedia Particular execution of a computer program Program vs. Process vs. Thread Scheduling, Preemption, Context Switching In computing, a process is the instance of a computer program that is being executed by one or many th

en.wikipedia.org

 

 

스레드(Thread)란

컴퓨터 과학에서 실행 스레드는 일반적으로 운영 체제의 일부인 스케줄러에 의해 독립적으로 관리될 수 있는 프로그래밍된 명령의 가장 작은 시퀀스입니다. (운영체제로부터 할당 받은 자원을 이용하는 실행 단위입니다.)

스레드는 부모 프로세스의 자원을 공유합니다.

스레드는 스택만 따로 할당받고 / 코드, 데이터, 힙 메모리는 공유합니다. 이에 스레드간 자원 공유가 쉽고, 메모리 사용이 훨씬 효율적이게 됩니다.

단, 이로 인해 공유 자원의 동기화 문제가 발생합니다. (한 스레드가 공유 자원을 변경하면, 다른 모든 스레드도 변경된 값을 사용하게 됨)

스레드의 출현 목적은?

- 프로세스보다 크기가 작은 실행 단위 필요

- 프로세스의 생성 및 소멸에 따른 오버헤드 감소

- 빠른 컨텍스트 스위칭

- 프로세스들의 통신 시간, 방법 어려움 해소

 

 

Thread (computing) - Wikipedia

From Wikipedia, the free encyclopedia Smallest sequence of programmed instructions that can be managed independently by a scheduler A process with two threads of execution, running on one processor Program vs. Process vs. Thread Scheduling, Preemption, Con

en.wikipedia.org

 

 

참고

https://zeroco.tistory.com/75

https://gmlwjd9405.github.io/2018/09/14/process-vs-thread.html

JMeter란

성능 테스트와 측정을 위한 오픈소스 소프트웨어로, 100% 자바로 개발됨

The Apache JMeter™ application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

 

1. 사전 준비

Java Runtime 먼저 설치하기. Java가 없다면? jar 파일 실행 못함.

https://www.java.com/en/download/manual.jsp

 

2.  JMeter 설치하기

아래 링크 접속 후, Binaries에서 zip 파일 다운받아 압축 풀기

https://jmeter.apache.org/download_jmeter.cgi

 

3. JMeter 실행하기

압축 푼 폴더의 bin 폴더 안에 들어가서, 콘솔 창에 아래 명령어 입력하여 ApacheJMeter.jar 실행하기

: 콘솔 프로그램은 java.exe -jar [파일명.jar] 로 실행하고, GUI 프로그램은 javaw.exe -jar [파일명.jar]로 실행함

javaw.exe -jar ApacheJMeter.jar

 

 

 

 

 

 

 

 

+ Recent posts