Files
mkdocs/docs/Plesk/index.md
2020-10-22 20:12:27 +02:00

184 lines
3.7 KiB
Markdown

# Plesk
#### Commande plesk:
```bash
~# plesk
Usage: plesk [command]
Commands:
bin - Run the specified Plesk command-line utility (e.g., domain, client)
conf - Open the specified Plesk configuration file in the editor
daily - Run daily maintenance script
db - Database related commands. Open MySQL console by default.
ext - Call a command-line interface of the specified Plesk extension
help - Show help and exit
installer - Parallels Installer shortcuts and command completion
log - Open the specified Plesk configuration file in the editor
login - generate login link for specified user
php - Run a PHP script using the Plesk PHP interpreter
repair - Check and repair Plesk
sbin - Run the specified Plesk internal utility
version - Show product version information
plesk installer --select-release-current --install-component php7.2
```
#### Réparer Plesk:
```bash
$ plesk installer --select-release-current --reinstall-patch --upgrade-installed-components
$ plesk repair installation
```
#### Tester la zone DNS:
```bash
# plesk bin dns --info maboiteverte.fr
www.maboiteverte.fr. CNAME maboiteverte.fr.
_dmarc.maboiteverte.fr. TXT v=DMARC1; p=none
maboiteverte.fr. TXT v=spf1 +a +mx +a:localhost.localdomain -all
ftp.maboiteverte.fr. CNAME maboiteverte.fr.
ipv4.maboiteverte.fr. A 212.227.191.167
mail.maboiteverte.fr. A 212.227.191.167
maboiteverte.fr. MX 10 mail.maboiteverte.fr.
webmail.maboiteverte.fr. A 212.227.191.167
maboiteverte.fr. A 212.227.191.167
ns2.maboiteverte.fr. A 212.227.191.167
maboiteverte.fr. NS ns2.maboiteverte.fr.
ns1.maboiteverte.fr. A 212.227.191.167
maboiteverte.fr. NS ns1.maboiteverte.fr.
SUCCESS: Getting information for Domain 'maboiteverte.fr' complete.
```
#### Liste des extensions installées:
```bash
plesk bin extension --list
```
#### Réparer Plesk :
```bash
plesk repair installation
```
#### Réparer les permissions d'un site:
```bash
plesk repair fs example.com
```
#### Fichiers logs:
```bash
/var/www/vhosts/sur-le-sentier.fr/logs/
```
#### Ajouter l'`user` bruno au groupe `sudo`:
```bash
# ubuntu:
root@localhost:~# usermod -aG sudo bruno
```
#### Redémarrer MySQL / MariaDB:
```bash
# sous root:
service mysql restart || service mariadb restart || service mysqld restart
```
#### Liste des modules installés:
```bash
# apache2ctl -M
Loaded Modules:
core_module (static)
so_module (static)
```
Vérifier la syntaxe du fichier de configuration:
```bash
# apachectl -t
# apachectl configtest
Syntax OK
```
https://httpd.apache.org/docs/2.4/fr/programs/apachectl.html
#### Installer GeoIP:
```bash
apt-get install plesk-php74-dev build-essential
apt-get install libgeoip-dev geoip-bin geoip-database
/opt/plesk/php/7.4/bin/pecl install http://pecl.php.net/get/geoip-1.1.1.tgz
/opt/plesk/php/7.4/lib/php/modules/geoip.so
Add " extension=geoip.so" to php.ini file:
For PHP 7.0 modify file /opt/plesk/php/7.0/etc/php.ini
For PHP 7.1 modify file /opt/plesk/php/7.1/etc/php.ini
echo "extension=geoip.so" > /opt/plesk/php/7.4/etc/php.d/geoip.ini
/opt/plesk/php/7.4/etc/php.d# /opt/plesk/php/7.4/bin/php -m | grep geoip
<?php print_r(geoip_record_by_name('php.net')); ?>
Required database not available at /usr/share/GeoIP/GeoIPCity.dat"
Redémarrer Apache:
service apache2 restart
sinon redémarrer le serveur
```
#### Installer GeoIP 2:
```bash
wget https://github.com/maxmind/geoip-api-mod_geoip2/archive/1.2.10.tar.gz
tar -xzvf 1.2.10.tar.gz
cd geoip-api-mod_geoip2-1.2.10/
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
Installer dans
/usr/lib/apache2/modules/mod_geoip.so
Ne marche pas !!
```
[git](git.md)
[Gitea](Gitea.md)
[Ghost](Ghost.md)
[nextcloud](nextcloud.md)