Compare commits
2 Commits
75df7a2554
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27b237a3c7 | ||
|
|
5349d46d71 |
@@ -84,10 +84,10 @@ if [ "$LOCAL_PHP" == "yes" ]; then
|
||||
fi
|
||||
else
|
||||
# Packages in Remi repo have names with php$version-php- prefixes
|
||||
mph="php$version-php-fpm php$version-php-cgi php$version-php-mysqlnd php$version-php-pgsql
|
||||
php$version-php-pdo php$version-php-common php$version-php-pecl-imagick php$version-php-imap
|
||||
php$version-php-ldap php$version-php-pecl-apcu php$version-php-pecl-zip php$version-php-cli
|
||||
php$version-php-opcache php$version-php-xml php$version-php-gd php$version-php-intl
|
||||
mph="php$version-php-fpm php$version-php-cgi php$version-php-mysqlnd php$version-php-pgsql
|
||||
php$version-php-pdo php$version-php-common php$version-php-pecl-imagick php$version-php-imap
|
||||
php$version-php-ldap php$version-php-pecl-apcu php$version-php-pecl-zip php$version-php-cli
|
||||
php$version-php-opcache php$version-php-xml php$version-php-gd php$version-php-intl
|
||||
php$version-php-mbstring php$version-php-pspell php$version-php-readline"
|
||||
if [ "$version" = "56" ]; then
|
||||
mph=$(sed -e "s/php$version-php-pecl-apcu//")
|
||||
@@ -156,23 +156,15 @@ else
|
||||
fi
|
||||
|
||||
# Check if required modules for apache2 are enabled
|
||||
if [ "$WEB_SYSTEM" = "apache2" ]; then
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
if ! httpd -M | grep 'proxy_fcgi_module' ; then
|
||||
sed 's/#LoadModule proxy_fcgi_module/LoadModule proxy_fcgi_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf
|
||||
sed 's/#LoadModule proxy_module/LoadModule proxy_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf
|
||||
fi
|
||||
if ! httpd -M | grep 'setenvif_module' ; then
|
||||
sed 's/#LoadModule setenvif_module/LoadModule setenvif_module/' -i /etc/httpd/conf.modules.d/00-base.conf
|
||||
fi
|
||||
else
|
||||
if ! a2query -q -m proxy_fcgi; then
|
||||
a2enmod -q proxy_fcgi
|
||||
fi
|
||||
if ! a2query -q -m setenvif; then
|
||||
a2enmod -q setenvif
|
||||
fi
|
||||
if [ "$WEB_SYSTEM" = "httpd" ]; then
|
||||
if ! httpd -M | grep 'proxy_fcgi_module' ; then
|
||||
sed 's/#LoadModule proxy_fcgi_module/LoadModule proxy_fcgi_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf
|
||||
sed 's/#LoadModule proxy_module/LoadModule proxy_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf
|
||||
fi
|
||||
if ! httpd -M | grep 'setenvif_module' ; then
|
||||
sed 's/#LoadModule setenvif_module/LoadModule setenvif_module/' -i /etc/httpd/conf.modules.d/00-base.conf
|
||||
fi
|
||||
|
||||
$BIN/v-restart-web "yes"
|
||||
fi
|
||||
|
||||
|
||||
@@ -148,4 +148,4 @@ bundle install
|
||||
bundle install --path=vendor
|
||||
```
|
||||
|
||||
для установки пользователю необходимых гемов локально.
|
||||
для установки пользователю необходимых гемов локально.
|
||||
|
||||
@@ -20,15 +20,15 @@ class PassengerWorker < Kernel::ModuleCoreWorker
|
||||
ID: 2,
|
||||
NAME: MODULE_ID,
|
||||
DESCR: "Added passenger support for nginx",
|
||||
REQ: "puppet_installer",
|
||||
REQ: "",
|
||||
CONF: "yes",
|
||||
}
|
||||
end
|
||||
|
||||
def enable
|
||||
log_file = get_log
|
||||
f_inst_pp = get_module_paydata("passenger_installer.pp")
|
||||
f_uninst_pp = get_module_paydata("passenger_uninstaller.pp")
|
||||
f_inst_pp = get_module_paydata("passenger_installer.yml")
|
||||
f_uninst_pp = get_module_paydata("passenger_uninstaller.yml")
|
||||
if !check
|
||||
inf = info
|
||||
log("Req error, needed #{inf[:REQ]}")
|
||||
@@ -36,16 +36,16 @@ class PassengerWorker < Kernel::ModuleCoreWorker
|
||||
else
|
||||
begin
|
||||
prepare_default_ruby_conf
|
||||
log("install packages for passenger + nginx support: /usr/bin/puppet apply --detailed-exitcodes #{f_inst_pp}")
|
||||
result_action = `/usr/bin/puppet apply --detailed-exitcodes "#{f_inst_pp}" 2>&1`
|
||||
log("install packages for passenger + nginx support: /usr/bin/ansible-playbook -vv #{f_inst_pp}")
|
||||
result_action = `LC_ALL=C.UTF-8 /usr/bin/ansible-playbook -vv "#{f_inst_pp}" 2>&1`
|
||||
ex_status = $?.exitstatus
|
||||
if ex_status.to_i == 0 || ex_status.to_i == 2
|
||||
log(result_action)
|
||||
super
|
||||
else
|
||||
log(result_action)
|
||||
log("Try to disable action: /usr/bin/puppet apply --detailed-exitcodes #{f_uninst_pp}")
|
||||
result_action = `/usr/bin/puppet apply --detailed-exitcodes "#{f_uninst_pp}" 2>&1`
|
||||
log("Try to disable action: /usr/bin/ansible-playbook -vv #{f_uninst_pp}")
|
||||
result_action = `LC_ALL=C.UTF-8 /usr/bin/ansible-playbook -vv "#{f_uninst_pp}" 2>&1`
|
||||
"module installation error. See log #{log_file}"
|
||||
end
|
||||
rescue => e
|
||||
@@ -57,14 +57,14 @@ class PassengerWorker < Kernel::ModuleCoreWorker
|
||||
|
||||
def disable
|
||||
log_file = get_log
|
||||
f_uninst_pp = get_module_paydata("passenger_uninstaller.pp")
|
||||
f_uninst_pp = get_module_paydata("passenger_uninstaller.yml")
|
||||
if !check_domains_with_passenger
|
||||
return log_return("Presents domains with passenger support disable it first")
|
||||
end
|
||||
begin
|
||||
log("uninstall packages for passenger + nginx support")
|
||||
log("Try to disable action: /usr/bin/puppet apply --detailed-exitcodes #{f_uninst_pp}")
|
||||
result_action = `/usr/bin/puppet apply --detailed-exitcodes "#{f_uninst_pp}" 2>&1`
|
||||
log("Try to disable action: /usr/bin/ansible-playbook -vv #{f_uninst_pp}")
|
||||
result_action = `LC_ALL=C.UTF-8 /usr/bin/ansible-playbook -vv "#{f_uninst_pp}" 2>&1`
|
||||
ex_status = $?.exitstatus
|
||||
if ex_status.to_i == 0 || ex_status.to_i == 2
|
||||
log(result_action)
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
- name: Install Passenger and configure Nginx on localhost
|
||||
hosts: localhost
|
||||
connection: local
|
||||
become: true
|
||||
gather_facts: false
|
||||
environment:
|
||||
LANG: en_US.UTF-8
|
||||
LC_ALL: en_US.UTF-8
|
||||
tasks:
|
||||
# Устанавливаем Ruby и зависимости
|
||||
- name: Install rubygems-devel
|
||||
ansible.builtin.dnf:
|
||||
name: rubygems-devel
|
||||
state: present
|
||||
- name: Install rubygem-rake
|
||||
ansible.builtin.dnf:
|
||||
name: rubygem-rake
|
||||
state: present
|
||||
- name: Install ruby-devel
|
||||
ansible.builtin.dnf:
|
||||
name: ruby-devel
|
||||
state: present
|
||||
- name: Install rubygem-rack
|
||||
ansible.builtin.dnf:
|
||||
name: rubygem-rack
|
||||
state: present
|
||||
- name: Install alt-brepo-ruby33-devel
|
||||
ansible.builtin.dnf:
|
||||
name: alt-brepo-ruby33-devel
|
||||
state: present
|
||||
- name: Install alt-brepo-ruby33-rubygem-rake
|
||||
ansible.builtin.dnf:
|
||||
name: alt-brepo-ruby33-rubygem-rake
|
||||
state: present
|
||||
# Устанавливаем Passenger и модуль Nginx
|
||||
- name: Install passenger-devel
|
||||
ansible.builtin.dnf:
|
||||
name: passenger-devel
|
||||
state: present
|
||||
- name: Install passenger
|
||||
ansible.builtin.dnf:
|
||||
name: passenger
|
||||
state: present
|
||||
- name: Install nginx-mod-http-passenger
|
||||
ansible.builtin.dnf:
|
||||
name: nginx-mod-http-passenger
|
||||
state: present
|
||||
# Конфигурируем Nginx для Passenger
|
||||
- name: Create passenger.conf
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/nginx/conf.d/passenger.conf
|
||||
content: |
|
||||
passenger_root /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini;
|
||||
passenger_ruby /usr/bin/ruby;
|
||||
passenger_instance_registry_dir /var/run/passenger-instreg;
|
||||
passenger_user_switching on;
|
||||
passenger_env_var PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0;
|
||||
passenger_env_var PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0;
|
||||
- name: Create passenger_includer.conf
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/nginx/conf.d/main/passenger.conf
|
||||
content: |
|
||||
load_module modules/ngx_http_passenger_module.so;
|
||||
# Перезапускаем Nginx
|
||||
- name: Restart nginx service
|
||||
ansible.builtin.service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
- name: Uninstall Passenger and configure Nginx on localhost
|
||||
hosts: localhost
|
||||
connection: local
|
||||
become: true
|
||||
gather_facts: false
|
||||
environment:
|
||||
LANG: en_US.UTF-8
|
||||
LC_ALL: en_US.UTF-8
|
||||
tasks:
|
||||
# Удалаем модуль nginx-passenger
|
||||
- name: Remove nginx-mod-http-passenger package
|
||||
ansible.builtin.dnf:
|
||||
name: nginx-mod-http-passenger
|
||||
state: absent
|
||||
# Удалаем passenger и зависимости
|
||||
- name: Remove passenger-devel package
|
||||
ansible.builtin.dnf:
|
||||
name: passenger-devel
|
||||
state: absent
|
||||
- name: Remove passenger package
|
||||
ansible.builtin.dnf:
|
||||
name: passenger
|
||||
state: absent
|
||||
# Удаляем конфигурационные файлы Nginx
|
||||
- name: Remove passenger.conf
|
||||
ansible.builtin.file:
|
||||
path: /etc/nginx/conf.d/passenger.conf
|
||||
state: absent
|
||||
- name: Remove passenger_includer.conf
|
||||
ansible.builtin.file:
|
||||
path: /etc/nginx/conf.d/main/passenger.conf
|
||||
state: absent
|
||||
# Перезапускаем Nginx (необязательно, но полезно)
|
||||
- name: Restart nginx service
|
||||
ansible.builtin.service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Name: hestia
|
||||
Version: 1.9.6
|
||||
Release: 8%{dist}
|
||||
Release: 9%{dist}
|
||||
Summary: Hestia Control Panel
|
||||
Group: System Environment/Base
|
||||
License: GPLv3
|
||||
@@ -36,8 +36,7 @@ Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires: ruby
|
||||
Requires: puppet
|
||||
Requires: puppet-stdlib
|
||||
Requires: ansible-core
|
||||
|
||||
Provides: hestia = %{version}-%{release}
|
||||
Conflicts: redhat-release < 8
|
||||
@@ -184,6 +183,9 @@ fi
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
|
||||
%changelog
|
||||
* Sun Mar 29 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-9
|
||||
- Added support ansible instead of puppet
|
||||
|
||||
* Fri Mar 27 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-8
|
||||
- Fixed installation of panel without PHP-FPM
|
||||
- Fixed mod_php, fcgid, fcgi mode
|
||||
|
||||
Reference in New Issue
Block a user