Yüklü Hizmetler
- Nginx Web Sunucusu →
/var/www/html - MySQL Sunucusu (güvenli) → Kök kimlik bilgileri burada saklanır:
/root/.cloudzy-creds - PHP ve Eklentiler → Şunları içerir:
php-fpm,php-mysql,php-cli,php-curl,php-mbstring,php-xml,php-zip,php-gd
Önemli Dosyalar ve Dizinler
- Kayıtlı MySQL root parolası:
/root/.cloudzy-creds - Nginx web kök dizini:
/var/www/html - Nginx yapılandırma dosyaları:
/etc/nginx - MySQL yapılandırma dosyaları:
/etc/mysql - MySQL veritabanı dosyaları:
/var/lib/mysql - Nginx günlükleri:
/var/log/nginx - MySQL günlükleri:
/var/log/mysql - PHP-FPM soketi:
/run/php/php-fpm.sock
MySQL'e Erişim
Root olarak giriş yapın:
mysql -u root -p
Parola şurada depolanır /root/.cloudzy-creds.
Yaygın komutlar:
SHOW DATABASES; -- List all databases
USE <database>; -- Switch to a specific database
CREATE DATABASE mydb; -- Create a new database
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'password'; -- Create a new user
GRANT ALL PRIVILEGES ON mydb.* TO 'appuser'@'localhost'; -- Grant privileges
EXIT; -- Quit MySQL shell
Nginx'e Erişim
Web kökü: /var/www/html
Konfigürasyon testi:
sudo nginx -t
Tarayıcıda erişim: http://<SERVER_IP>
PHP Kullanın
Sürümü kontrol et:
php -v
Hizmet Yönetimi
Nginx:
sudo systemctl status nginx # Check status
sudo systemctl restart nginx # Restart service
MySQL:
sudo systemctl status mysql # Check status
sudo systemctl restart mysql # Restart service
PHP-FPM:
PHP_FPM_VERSION=$(ls /etc/php | grep -E '^[0-9]+.[0-9]+$')
PHP_FPM_SERVICE="php${PHP_FPM_VERSION}-fpm"
systemctl status ${PHP_FPM_SERVICE}
systemctl restart ${PHP_FPM_SERVICE}