카이도스의 Tech Blog
바쿨라 웹 대시보드 설치 본문
# 설치
apt update
apt install -y nginx apache2-utils php-fpm php-pgsql php-gd
# 셋팅 (php 의 timezone 설정을 한다. ᅟdate.timezone 문구를 찾아 아래와 같이 수정한다.)
vi /etc/php/7.4/fpm/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
date.timezone = Asia/Seoul
# php-fpm 재시작
systemctl restart php7.4-fpm.service
systemctl status php7.4-fpm.service
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-01-25 01:01:51 UTC; 34s ago
Docs: man:php-fpm7.4(8)
Process: 2094926 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Main PID: 2094912 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 309009)
Memory: 10.7M
CGroup: /system.slice/php7.4-fpm.service
├─2094912 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
├─2094924 php-fpm: pool www
└─2094925 php-fpm: pool www
Jan 25 01:01:51 backup systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Jan 25 01:01:51 backup systemd[1]: Started The PHP 7.4 FastCGI Process Manager.
# 엔진엑스 설정값 셋팅
vi /etc/nginx/sites-available/default
server {
server_name 서버IP;
listen 80;
listen [::]:80;
root /var/www/html/bacula-web/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# bacula-web 설치 (composer 설치)
apt install -y composer
composer create-project --no-dev --prefer-dist bacula-web/bacula-web bacula-web
# 설치 후 테스트
cd bacula-web && composer check
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading "robloach/component-installer" which is a legacy composer-installer built for Composer 1.x, it is likely to cause issues as you are running Composer 2.x.
Checking platform requirements for packages in the vendor dir
composer-plugin-api 2.3.0 success
ext-gettext 7.4.3 success
ext-mbstring * success provided by symfony/polyfill-mbstring
ext-openssl 7.4.3 success
ext-pcre 7.4.3 success
ext-pdo 7.4.3 success
ext-posix 7.4.3 success
ext-sqlite3 7.4.3 success
php 7.4.3 success
# 파일/폴더 소유권 및 권한 수정
sudo mv -v bacula-web /var/www/
sudo chown -Rv www-data: /var/www/bacula-web
sudo chmod -Rv 755 /var/www/bacula-web
sudo chmod -v 775 /var/www/bacula-web/application/views/cache
sudo chmod -v 775 /var/www/bacula-web/application/assets/protected
# 구성 파일 만들기
cd /var/www/html/bacula-web/application/config/
cp -v config.php.sample config.php
chown -v www-data: config.php
vi config.php (보기 깔끔하게 기존내용 다 삭제 후 아래 설정값으로 진행)
<?php
// Show inactive clients (false by default)
$config['show_inactive_clients'] = true;
// Hide empty pools (displayed by default)
$config['hide_empty_pools'] = false;
// Custom datetime format (by default: Y-m-d H:i:s)
$config['datetime_format'] = 'd/m/Y H:i:s';
// Security
$config['enable_users_auth'] = true;
// Debug mode
$config['debug'] = true;
// Translations
$config['language'] = 'en_US';
// PostgreSQL bacula catalog
$config[0]['label'] = 'Prod Server';
$config[0]['host'] = 'localhost';
$config[0]['login'] = 'bacula';
$config[0]['password'] = 'password';
$config[0]['db_name'] = 'bacula';
$config[0]['db_type'] = 'pgsql';
$config[0]['db_port'] = '5432';
# bacula 테스트
cd /var/www/html/bacula-web
sudo -u www-data php bwc check
=====================
Checking requirements
=====================
PHP version Ok (using 7.4.3-4ubuntu2.17)
PHP timezone Warning
Protected assets folder is writable Ok
Smarty cache folder write permission Ok
Checking installed PHP database extensions
==========================================
pgsql installed
sqlite installed
Checking installed PHP extensions
=================================
SQLite support Ok
Gettext support Ok
Session support Ok
PHP PDO support Ok
PHP Posix support Ok
# 사용자 설정 (Bacula-Web에 로그인하려면 첫 번째 사용자를 생성해야 함!!!)
/var/www/html/bacula-web/application/assets/protected/application.db 에 저장됨
cd /var/www/html/bacula-web
sudo -u www-data php bwc setupauth
# 완료 후 웹페이지 접속하면 끝.
http://서버IP/
'서버작업' 카테고리의 다른 글
centos7 네트워크 본딩 설정 (0) | 2023.03.06 |
---|---|
rsync 백업 스크립트 만들기 (0) | 2023.02.23 |
mysqlcheck 사용 (db, mysql) 복구, 최적화 (0) | 2022.08.04 |
centos7 이슈 (xinetd)Can't open PID file /var/run/xinetd.pid (yet?) after start: No such file=>/var/log/messages|Connection closed by foreign host. (0) | 2022.08.04 |
Http2 Apache Module 설치 (0) | 2022.08.04 |