İçeriğe geç
KURUMSAL Kurumsal teknoloji · İşletmenize özel mühendislik Kurumsal Yazılım · Yönetilen Sunucular · Kurumsal E-posta · LiteSpeed + CloudLinux · Imunify360 Güvenlik · cPanel Yönetim · Uygun pakette 3 Gbps'ye kadar ağ profili
AIOR

DirectAdmin'de SSH ile CustomBuild Güncellemesi — Adım Adım Komutlar

Aior

Administrator

Yetkili üye
Katıldı
2 Nis 2023
Mesajlar
929
Tepki puanı
2
Puan
18
Yaş
41
Konum
Turkey
Web sitesi
aior.com
Konu sahibi

CustomBuild Nedir?​

CustomBuild, DirectAdmin'in temel paket yönetim aracıdır. PHP, MySQL/MariaDB, Apache/Nginx, ProFTPD, Exim, Dovecot, ImageMagick gibi tüm bağımlı bileşenleri kompile eder, yapılandırır ve günceller. cPanel'in EasyApache benzeri rolünü oynar. Sürüm güncellemesi, modül ekleme/çıkarma, performans ayarları hep CustomBuild üzerinden yapılır.

Bu rehber DirectAdmin sunucusunda SSH üzerinden CustomBuild güncellemesini güvenli şekilde nasıl yapacağınızı anlatır. Yanlış uygulanan update web servislerini saatlerce çökertebilir; doğru sırayı bilmek kritiktir.

Hazırlık​

SSH ile root kullanıcı olarak sunucunuza bağlanın:


Önce sistemin sağlıklı olduğunu doğrulayın:

Kod:
df -h               # Disk alanı kontrolü (en az %15 boş alan gerekir)
free -h             # RAM durumu
uptime              # Load average
systemctl status directadmin httpd php-fpm mysql

CustomBuild compilation 1-3 GB geçici alan kullanır; disk %80'den dolu ise önce temizlik yapın.

Yedekleme​

Update öncesi minimum şu öğeleri yedekleyin:

Kod:
mkdir -p /root/backup-$(date +%Y%m%d)
cp -a /etc/httpd/conf /root/backup-$(date +%Y%m%d)/httpd-conf
cp -a /etc/php-fpm.d /root/backup-$(date +%Y%m%d)/php-fpm.d
cp -a /usr/local/directadmin/custombuild/options.conf /root/backup-$(date +%Y%m%d)/

DirectAdmin'in kendi backup özelliği de var:

Kod:
da admin backup all

Bu komut tüm kullanıcı hesaplarını /home/admin/admin_backups/ altına yedekler.

CustomBuild Dizinine Geçiş​

Kod:
cd /usr/local/directadmin/custombuild

Mevcut yapılandırmayı inceleme:

Kod:
./build version
cat options.conf | head -50

options.conf hangi PHP sürümlerinin kurulu olduğunu, hangi modüllerin etkin olduğunu (gd, mbstring, imagick, redis) gösterir.

Update Adımları​

İki seviyeli update var. Önce CustomBuild'in kendisi güncellenir, sonra paketler:

Kod:
./build update

Bu komut options.conf içindeki versiyon numaralarını en son stabile günceller, versions.txt dosyasını yeniler. Yalnızca metadata değişimi, paket derleme yapmaz.

Sonra:

Kod:
./build update_versions

Bu, options.conf'ta tanımlı tüm paketleri (PHP, MySQL, ProFTPD, Dovecot, vb.) yeniden derler. İşlem sürecinde 30-90 dakika sürebilir; ekran çıktısını izleyin.

Belirli Bir Paketi Tek Tek Update​

Tüm yığını update etmek istemiyorsanız:

Kod:
./build php n            # Sadece PHP
./build apache           # Sadece Apache
./build mysql            # Sadece MySQL/MariaDB
./build exim             # Sadece Exim
./build dovecot          # Sadece Dovecot

Bu spesifik update'ler 5-15 dakika alır. PHP'yi update ettiğinizde mevcut .user.ini ayarları korunur ama php.ini ana dosyası yeniden oluşur — özel ayarlarınızı php-fpm.d/*.conf içinde saklayın.

Sorun Çözme​

Update sırasında oluşabilecek hatalar:

"failed: out of memory": sunucu RAM yetmiyor. Geçici olarak swap ekleyin:

Kod:
dd if=/dev/zero of=/swapfile bs=1G count=4
mkswap /swapfile && swapon /swapfile

"package conflict": eski paket kalıntıları var. ./build clean çalıştırın.

Servis başlatılamıyor: config syntax hatası olabilir. Apache için apachectl configtest, Nginx için nginx -t çalıştırın.

Update Sonrası Test​

Tüm servislerin sağlıklı olduğunu doğrulayın:

Kod:
systemctl status directadmin
systemctl status httpd
systemctl status php-fpm
systemctl status mysql
systemctl status exim

# Test web sayfaları
curl -I https://sunucu.aior.com
curl -I https://sunucu.aior.com:2222

DirectAdmin panel açılıp tüm kullanıcı hesapları test edilmelidir. Otomatik monitoring (Munin, New Relic, Datadog) varsa response time grafiklerini kontrol edin.

Rollback Stratejisi​

Bir şey ters giderse:

Kod:
# PHP sürüm geri al
./build set php1_release 8.2  # Eski sürüm
./build php n

# Backup'tan geri yükle
cp -a /root/backup-YYYYMMDD/httpd-conf/* /etc/httpd/conf/
systemctl restart httpd

DirectAdmin admin backup'tan kullanıcı geri yüklemek:

Kod:
da admin restore /home/admin/admin_backups/admin.backup.tar.gz

AIOR DirectAdmin Yönetilen Hizmetler​

AIOR DirectAdmin lisanslı VPS paketlerimizde CustomBuild update'lerini biz yönetiyoruz. Aylık otomatik patch döngüsü + acil güvenlik patch'leri + rollback hazırlığı paket içinde. Müşterimiz update yönetimine zaman harcamak yerine işine odaklanır.


What Is CustomBuild?​

CustomBuild is DirectAdmin's core package management tool. It compiles, configures and updates every dependent component — PHP, MySQL/MariaDB, Apache/Nginx, ProFTPD, Exim, Dovecot, ImageMagick. It plays the equivalent role to cPanel's EasyApache. Version updates, module additions/removals and performance tuning all flow through CustomBuild.

This guide explains how to safely run a CustomBuild update over SSH on a DirectAdmin server. A mishandled update can take web services down for hours; knowing the correct sequence is critical.

Preparation​

SSH into the server as root:


First confirm the system is healthy:

Kod:
df -h               # Disk space (need ≥15% free)
free -h             # RAM status
uptime              # Load average
systemctl status directadmin httpd php-fpm mysql

CustomBuild compilation uses 1-3 GB of temporary space; if the disk is over 80% full, clean up first.

Backups​

At minimum, back up:

Kod:
mkdir -p /root/backup-$(date +%Y%m%d)
cp -a /etc/httpd/conf /root/backup-$(date +%Y%m%d)/httpd-conf
cp -a /etc/php-fpm.d /root/backup-$(date +%Y%m%d)/php-fpm.d
cp -a /usr/local/directadmin/custombuild/options.conf /root/backup-$(date +%Y%m%d)/

DirectAdmin also has its own backup mechanism:

Kod:
da admin backup all

This dumps all user accounts to /home/admin/admin_backups/.

Switch to the CustomBuild Directory​

Kod:
cd /usr/local/directadmin/custombuild

Inspect current configuration:

Kod:
./build version
cat options.conf | head -50

options.conf shows which PHP versions are installed and which modules are enabled (gd, mbstring, imagick, redis).

Update Steps​

There are two update layers. CustomBuild itself first, then packages:

Kod:
./build update

This refreshes options.conf version numbers to current stable and updates versions.txt. Metadata only — no compilation.

Then:

Kod:
./build update_versions

This recompiles every package defined in options.conf (PHP, MySQL, ProFTPD, Dovecot…). It takes 30-90 minutes; watch the console output.

Updating a Single Package​

If you don't want a full-stack rebuild:

Kod:
./build php n            # PHP only
./build apache           # Apache only
./build mysql            # MySQL/MariaDB only
./build exim             # Exim only
./build dovecot          # Dovecot only

Targeted updates take 5-15 minutes. When you update PHP, existing .user.ini settings are preserved but the main php.ini is regenerated — keep your custom settings in php-fpm.d/*.conf.

Troubleshooting​

Common errors during update:

"failed: out of memory": the server is short on RAM. Add temporary swap:

Kod:
dd if=/dev/zero of=/swapfile bs=1G count=4
mkswap /swapfile && swapon /swapfile

"package conflict": stale package leftovers. Run ./build clean.

A service fails to start: config syntax error. For Apache, apachectl configtest; for Nginx, nginx -t.

Post-Update Verification​

Confirm services are healthy:

Kod:
systemctl status directadmin
systemctl status httpd
systemctl status php-fpm
systemctl status mysql
systemctl status exim

# Test web pages
curl -I https://server.aior.com
curl -I https://server.aior.com:2222

Open the DirectAdmin panel and test all user accounts. If you have monitoring (Munin, New Relic, Datadog), verify response-time graphs.

Rollback Strategy​

If something goes wrong:

Kod:
# Roll PHP version back
./build set php1_release 8.2  # Previous version
./build php n

# Restore from backup
cp -a /root/backup-YYYYMMDD/httpd-conf/* /etc/httpd/conf/
systemctl restart httpd

To restore users from a DirectAdmin admin backup:

Kod:
da admin restore /home/admin/admin_backups/admin.backup.tar.gz

AIOR Managed DirectAdmin Services​

At AIOR we manage CustomBuild updates for our DirectAdmin VPS customers: monthly patching cycle, emergency security patches and rollback readiness — included in the plan. Our customers focus on their business rather than update management.
 
Son düzenleyen:

Forum istatistikleri

Konular
925
Mesajlar
932
Üyeler
26
En son üye
Jessicawatson

Çevrimiçi üyeler

Şu anda çevrimiçi üye yok.

Öne çıkan içerik

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Geri
Üst