웹사이트 검색

Debian 9에 ERPNext를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. 시작하기\n
  3. 종속성 설치
  4. Node.js, Redis 및 Nginx 설치
  5. MariaDB 설치 및 구성
  6. PDF 변환기 설치\n
  7. 벤치 설치
  8. ERPNext 설치
  9. ERPNext 웹 인터페이스 액세스
  10. 결론

ERPNext는 Frappe 프레임워크 위에 Python으로 작성된 무료 오픈 소스 ERP 소프트웨어이며 회계, 재고, 제조, CRM, 판매, 구매, 프로젝트 관리, HRMS 등을 포함합니다. ERPNext는 간단하고 강력하며 사용하기 쉬운 ERP 시스템입니다. 중앙 위치에서 일상적인 작업을 관리하는 데 사용할 수 있는 아름다운 웹 인터페이스가 함께 제공됩니다.

이 튜토리얼에서는 Debian 9 서버에 ERPNext 소프트웨어를 설치하는 방법을 배웁니다.

전제 조건

  • Debian 9를 실행하는 서버.\n
  • sudo 권한이 있는 루트가 아닌 사용자.\n

시작하기

시작하기 전에 패키지 저장소를 최신 버전으로 업데이트하는 것이 좋습니다. 다음 명령을 실행하여 이를 수행할 수 있습니다.

sudo apt-get update -y
sudo apt-get upgrade -y

그런 다음 시스템을 다시 시작하여 모든 변경 사항을 적용하십시오.

종속성 설치

ERPNext가 제대로 작동하려면 Python 버전 2.7이 필요합니다. 다음 명령을 실행하여 Python 및 기타 필수 패키지를 설치할 수 있습니다.

sudo apt-get install python-minimal git build-essential python-setuptools python-dev libffi-dev libssl-dev curl -y

Python 종속성을 설치하려면 Pythons pip 도구도 설치해야 합니다. 다음 명령을 실행하여 이를 수행할 수 있습니다.

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

다음으로 pip 명령을 사용하여 ansible을 설치합니다.

sudo pip install ansible

Node.js, Redis 및 Nginx 설치

기본적으로 Node.js의 최신 버전은 Debian 9에서 사용할 수 없습니다. 따라서 Node.js 8.x용 Nodesource 리포지토리를 추가해야 합니다. 다음 명령을 실행하여 이를 수행할 수 있습니다.

sudo curl --silent --location https://deb.nodesource.com/setup_8.x | sudo bash -

다음으로 다음 명령을 실행하여 Node.js, Nginx 및 Redis를 설치합니다.

sudo apt-get install nodejs redis-server nginx -y

모든 패키지가 설치되면 Nginx 및 Redis 서비스를 시작하고 다음 명령을 사용하여 부팅 시 시작할 수 있도록 활성화합니다.

sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl start redis-server
sudo systemctl enable redis-server

MariaDB 설치 및 구성

기본적으로 최신 버전의 MariaDB는 데비안 9 리포지토리에서 사용할 수 없습니다. 따라서 이를 위해 MariaDB 리포지토리를 추가해야 합니다.

먼저 다음 명령을 사용하여 시스템에 서명 키를 다운로드하고 추가합니다.

sudo apt-get install software-properties-common dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8

다음으로 다음 명령을 사용하여 MariaDB 리포지토리를 추가합니다.

sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.2/debian stretch main'

마지막으로 다음 명령을 사용하여 MariaDB 서버를 설치합니다.

sudo apt-get update -y
sudo apt-get install mariadb-server libmysqlclient-dev -y

다음으로 ERPNext 데이터베이스 생성을 위해 Barracuda 스토리지 엔진을 MariaDB 구성 파일에 추가해야 합니다. my.cnf 파일을 편집하여 이 작업을 수행할 수 있습니다.

sudo nano /etc/mysql/my.cnf

다음 줄을 추가합니다.

[mysqld]

innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]

default-character-set = utf8mb4

완료되면 파일을 저장하고 닫은 다음 MariaDB 서비스를 시작하고 다음 명령을 사용하여 부팅 시 시작되도록 활성화합니다.

sudo systemctl restart mysql
sudo systemctl enable mysql

다음으로 mysql_secure_installation 스크립트를 실행하여 MariaDB를 보호합니다.

sudo mysql_secure_installation

이 스크립트는 아래와 같이 루트 암호를 설정하고, 익명 사용자를 제거하고, 원격 루트 로그인을 허용하지 않고, 테스트 데이터베이스와 보안 MariaDB에 대한 액세스를 제거합니다.

Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

PDF 변환기 설치

또한 QT Webkit 렌더링 엔진을 사용하여 HTML을 PDF로 변환하려면 wkhtmltopdf를 설치해야 합니다. 먼저 다음 명령을 사용하여 필수 종속 항목을 설치합니다.

sudo apt-get install libxext6 xfonts-75dpi xfonts-base libxrender1 -y

그런 다음 다음 명령을 사용하여 최신 버전의 wkhtmltopdf를 다운로드합니다.

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

다음으로 다운로드한 파일을 /opt 디렉터리에 추출합니다.

sudo tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /opt

다음으로 다음 명령을 사용하여 wkhtmltopdf에 대한 소프트링크를 만듭니다.

sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

벤치 설치

다음으로 시스템에 ERPNext 애플리케이션을 설치하고 관리하려면 Bench를 설치해야 합니다. Bench는 Nginx 및 감독자 구성을 만들고 관리하는 데에도 사용됩니다.

Bench를 설치하기 전에 Bench용 사용자를 추가해야 합니다.

먼저 다음 명령을 사용하여 Bench 사용자를 생성합니다.

sudo adduser bench

다음으로 벤치 사용자에게 sudo 권한을 제공합니다.

sudo usermod -aG sudo bench

그런 다음 Bench 사용자로 로그인하고 다음 명령을 사용하여 Bench 리포지토리를 복제합니다.

su - bench
git clone https://github.com/frappe/bench bench-repo

마지막으로 pip 명령을 사용하여 Bench를 설치합니다.

sudo pip install -e bench-repo

ERPNext 설치

다음으로 frappe 프레임워크가 설치된 벤치 디렉토리를 초기화합니다.

bench init erpnext

다음으로 디렉터리를 erpnext로 변경하고 다음 명령을 사용하여 새 Frappe 사이트를 만듭니다.

cd erpnext
bench new-site test.example.com

위의 명령은 MySQL 루트 암호를 제공하고 관리자 계정에 대한 새 암호를 설정하도록 요청합니다. 관리자 암호는 나중에 관리자 대시보드에 로그인해야 합니다.

다음으로 다음 명령을 사용하여 Git 리포지토리에서 ERPNext 설치 파일을 다운로드합니다.

bench get-app erpnext https://github.com/frappe/erpnext

다음으로 새로 만든 사이트에 ERPNext를 설치합니다.

bench --site test.example.com install-app erpnext

마지막으로 다음 명령을 사용하여 Bench 애플리케이션을 시작합니다.

bench start

애플리케이션이 성공적으로 시작되면 다음 출력이 표시되어야 합니다.

13:40:10 system           | redis_socketio.1 started (pid=2618)
13:40:10 system           | worker_long.1 started (pid=2625)
13:40:10 system           | watch.1 started (pid=2619)
13:40:10 system           | redis_queue.1 started (pid=2626)
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.939 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:10 system           | web.1 started (pid=2629)
13:40:11 system           | schedule.1 started (pid=2634)
13:40:10 redis_socketio.1 |                 _._                                                  
13:40:10 redis_socketio.1 |            _.-``__ ''-._                                             
13:40:10 redis_socketio.1 |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
13:40:10 redis_socketio.1 |   .-`` .-```.  ```\/    _.,_ ''-._                                   
13:40:10 redis_socketio.1 |  (    '      ,       .-`  | `,    )     Running in standalone mode
13:40:10 redis_socketio.1 |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 12000
13:40:10 redis_socketio.1 |  |    `-._   `._    /     _.-'    |     PID: 2630
13:40:10 redis_socketio.1 |   `-._    `-._  `-./  _.-'    _.-'                                   
13:40:10 redis_socketio.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:10 redis_socketio.1 |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
13:40:10 redis_socketio.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:10 redis_socketio.1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:10 redis_socketio.1 |  |    `-._`-._        _.-'_.-'    |                                  
13:40:10 redis_socketio.1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:10 redis_socketio.1 |       `-._    `-.__.-'    _.-'                                       
13:40:10 redis_socketio.1 |           `-._        _.-'                                           
13:40:10 redis_socketio.1 |               `-.__.-'                                               
13:40:10 redis_socketio.1 | 
13:40:11 system           | worker_default.1 started (pid=2639)
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.973 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.974 # Server started, Redis version 3.0.6
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.974 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.974 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
13:40:10 redis_queue.1    | 2635:M 24 Feb 13:40:10.976 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:10 redis_queue.1    |                 _._                                                  
13:40:10 redis_queue.1    |            _.-``__ ''-._                                             
13:40:10 redis_queue.1    |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
13:40:10 redis_queue.1    |   .-`` .-```.  ```\/    _.,_ ''-._                                   
13:40:10 redis_queue.1    |  (    '      ,       .-`  | `,    )     Running in standalone mode
13:40:10 redis_queue.1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 11000
13:40:10 redis_queue.1    |  |    `-._   `._    /     _.-'    |     PID: 2635
13:40:10 redis_queue.1    |   `-._    `-._  `-./  _.-'    _.-'                                   
13:40:10 redis_queue.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:10 redis_queue.1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
13:40:10 redis_queue.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:10 redis_queue.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:10 redis_queue.1    |  |    `-._`-._        _.-'_.-'    |                                  
13:40:10 redis_queue.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:10 redis_queue.1    |       `-._    `-.__.-'    _.-'                                       
13:40:10 redis_queue.1    |           `-._        _.-'                                           
13:40:10 redis_queue.1    |               `-.__.-'                                               
13:40:10 redis_queue.1    | 
13:40:10 redis_queue.1    | 2635:M 24 Feb 13:40:10.998 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:10 redis_queue.1    | 2635:M 24 Feb 13:40:10.999 # Server started, Redis version 3.0.6
13:40:11 redis_queue.1    | 2635:M 24 Feb 13:40:11.000 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
13:40:11 redis_socketio.1 | 2630:M 24 Feb 13:40:11.000 * The server is now ready to accept connections on port 12000
13:40:11 system           | socketio.1 started (pid=2637)
13:40:11 redis_queue.1    | 2635:M 24 Feb 13:40:11.029 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
13:40:11 redis_queue.1    | 2635:M 24 Feb 13:40:11.029 * The server is now ready to accept connections on port 11000
13:40:11 system           | redis_cache.1 started (pid=2652)
13:40:11 system           | worker_short.1 started (pid=2651)
13:40:11 redis_cache.1    | 2660:M 24 Feb 13:40:11.100 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:11 redis_cache.1    |                 _._                                                  
13:40:11 redis_cache.1    |            _.-``__ ''-._                                             
13:40:11 redis_cache.1    |       _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
13:40:11 redis_cache.1    |   .-`` .-```.  ```\/    _.,_ ''-._                                   
13:40:11 redis_cache.1    |  (    '      ,       .-`  | `,    )     Running in standalone mode
13:40:11 redis_cache.1    |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 13000
13:40:11 redis_cache.1    |  |    `-._   `._    /     _.-'    |     PID: 2660
13:40:11 redis_cache.1    |   `-._    `-._  `-./  _.-'    _.-'                                   
13:40:11 redis_cache.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:11 redis_cache.1    |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
13:40:11 redis_cache.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:11 redis_cache.1    |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
13:40:11 redis_cache.1    |  |    `-._`-._        _.-'_.-'    |                                  
13:40:11 redis_cache.1    |   `-._    `-._`-.__.-'_.-'    _.-'                                   
13:40:11 redis_cache.1    |       `-._    `-.__.-'    _.-'                                       
13:40:11 redis_cache.1    |           `-._        _.-'                                           
13:40:11 redis_cache.1    |               `-.__.-'                                               
13:40:11 redis_cache.1    | 
13:40:11 redis_cache.1    | 2660:M 24 Feb 13:40:11.115 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:11 redis_cache.1    | 2660:M 24 Feb 13:40:11.115 # Server started, Redis version 3.0.6
13:40:11 redis_cache.1    | 2660:M 24 Feb 13:40:11.115 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
13:40:11 redis_cache.1    | 2660:M 24 Feb 13:40:11.116 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
13:40:11 redis_cache.1    | 2660:M 24 Feb 13:40:11.116 * The server is now ready to accept connections on port 13000
13:40:16 socketio.1       | listening on *: 9000
13:40:34 worker_long.1    | 13:40:34 RQ worker u'rq:worker:Node1.2632.long' started, version 0.10.0
13:40:34 worker_long.1    | 13:40:34 *** Listening on long...
13:40:34 worker_long.1    | 13:40:34 Cleaning registries for queue: long
13:40:34 worker_default.1 | 13:40:34 RQ worker u'rq:worker:Node1.2646.default' started, version 0.10.0
13:40:34 worker_default.1 | 13:40:34 *** Listening on default...
13:40:34 worker_default.1 | 13:40:34 Cleaning registries for queue: default
13:40:34 worker_short.1   | 13:40:34 RQ worker u'rq:worker:Node1.2661.short' started, version 0.10.0
13:40:34 worker_short.1   | 13:40:34 *** Listening on short...
13:40:34 worker_short.1   | 13:40:34 Cleaning registries for queue: short
13:40:34 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)

ERPNext 웹 인터페이스에 액세스

이제 ERPNext가 설치되어 포트 8000에서 실행됩니다. ERPNext 웹 인터페이스에 액세스할 시간입니다.

웹 브라우저를 열고 URL http://test.exaple.com:8000을 입력하면 다음 페이지로 리디렉션됩니다.

여기에서 관리자 계정 자격 증명을 제공하고 로그인 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 영어를 선택하고 다음 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 국가, 시간대 및 통화를 선택한 후 다음 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 이름, 이메일 및 비밀번호를 입력하고 다음 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 원하는 대로 도메인을 선택한 후 다음 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에 회사 이름과 약어를 제공하고 다음 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 조직 세부 정보를 제공하고 설정 완료 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 회사에 대해 달성하고자 하는 목표를 설정한 다음 만들기 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 다음 버튼을 클릭하여 계속하면 다음 페이지가 표시됩니다.

여기에서 추가할 고객을 추가한 다음 만들기 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 다음 버튼을 클릭하여 계속하면 다음 페이지가 표시됩니다.

여기에서 추가하려는 공급업체를 추가한 다음 만들기 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 다음 버튼을 클릭하여 계속하면 다음 페이지가 표시됩니다.

여기에서 구매 또는 판매하려는 제품 및 서비스를 추가한 다음 만들기 버튼을 클릭하면 다음 페이지가 표시됩니다.

여기에서 다음 버튼을 클릭하여 계속하면 다음 페이지가 표시됩니다.

여기에서 조직에 사용자를 추가한 다음 만들기 버튼을 클릭하면 다음 페이지와 같은 ERPNext 대시보드가 표시됩니다.

결론

축하해요! Debian 9 서버에 ERPNext를 성공적으로 설치하고 구성했습니다. 이제 애플리케이션을 사용하여 회사를 쉽게 관리할 수 있습니다. 자세한 내용은 Doc의 공식 ERPNext 문서 페이지를 참조하세요.