sabato, maggio 14, 2022

aaPanel -- How to install aaPanel web hosting control panel on CentOS 7 or Ubuntu

 Install wget

sudo yum install wget

For CentOS or Redhat 7 0r 8 Linux

wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh 

For Debian or Ubuntu Linux

wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh

Run install.sh script of aaPanel Linux web control panel

bash install.sh 

 

mercoledì, aprile 13, 2022

VestaCP - Aggiornare PHP a 7.4 o 8.0

add-apt-repository ppa:ondrej/php

add-apt-repository ppa:ondrej/apache2

Installazione PHP 7.4

apt install php7.4

apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl

a2dismod php7.2

a2enmod php7.4

systemctl restart apache2

apt remove php7.2*

apt autoremove

apt install php7.4-bcmath php7.4-gmp

systemctl restart apache2

Installazione PHP 8.0

apt install php8.0

apt install php8.0-common php8.0-mysql php8.0-xml php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip php8.0-intl

a2dismod php7.4

a2enmod php8.0

systemctl restart apache2


venerdì, aprile 08, 2022

VestaCP - Come disabilitare accesso diretto IP pubblico

Modificare il file /etc/nginx/conf.d/your-ip.conf in questo modo:

# Per accesso in http
server {
   listen       [il tuo ip]:80 default;
   server_name  _;
   location / {
      access_log /dev/null;
      error_log /dev/null;
      return 444;
   }
   # per abilitare l'accesso in phpmyadmin
   location /phpmyadmin/ {
      proxy_pass  http://[il tuo ip]:8080;
   }
   # per abilitare l'accesso in webmail
   location /webmail/ {
      proxy_pass  http://[il tuo ip]:8080;
   }
}

# Per accesso in https
server {
   listen       [il tuo ip]:443 default;
   server_name  _;
   ssl on;
   ssl_certificate /home/user/conf/web/ssl.domain.ru.pem;
   ssl_certificate_key /home/admin/conf/web/ssl.domain.ru.key;

   location / {
      access_log /dev/null;
      error_log /dev/null;
      return 444;
   }
   # per abilitare l'accesso in phpmyadmin
   location /phpmyadmin/ {
      proxy_pass  http://[il tuo ip]:8080;
   }
   # per abilitare l'accesso in webmail
   location /webmail/ {
      proxy_pass  http://[il tuo ip]:8080;
   }
}


Riavviare NGINX


sabato, maggio 29, 2021

Uninstalling Preinstalled Android Apps without root

Uninstalling Preinstalled Android Apps without root

On my Moto G6 every Update seems to re-enable the Outlook and linked-in in apps I disabled on purpose. You can not uninstall apps that have been installed by the manufacturer via the play store or app settings, only disable them.

So far I have been disabling them after each update but I have gotten quite annoyed by it and did a little bit of research to find out how to fully uninstall them.

Prerequisites

What you need is the Android Developer Bridge (ADB) on your computer and you need to enable USB debugging on the phone.

I have used Windows in this guide but there is a great guide on how to set everything up in Windows, Mac & Linux over at XDA-Developers that walks you through the process.

USB Debugging on the Phone

If you haven’t enabled the Developer Mode on your phone yet, you have to navigate to Settings, then System -> About and scroll down to the buid number. Tap this 7 times to enable Developer mode.

Then You will find the Developer Settings in the Systems Settings menu. Go there and enable USB debugging.

ADB on Windows

Setting up ADB on Windows is straight forward. Download the latest ADB version, extract the files in the zip and navigate in Powershell to the extracted folder.

Tipp: You can hold down SHIFT when right-clicking in Explorer and use “Open Powershell here”

From here you can run the adb commands. Since we did not add the folder to the PATH we will have to preface the command with .\ to make it use the adb.exe in this folder.

If you follow this guide on a different OS or have ADB in your PATH you don’t have to use the .\

Connecting the Phone

Connect the phone via USB and double check that USB debugging is enabled.

Then you check for connected devices

.\adb devices             
                    

This starts up the ADB service and lists connected devices

* daemon not running; starting now at tcp:5037

* daemon started successfully

List of devices attached

ZY322XXXX      unauthorized

On your phone you should get a pop-up asking you to confirm the ADB connection to the computer. After accepting it

.\adb devices                                 

Should list your device now not as unauthorized anymore.

List of devices attached

ZY322XXXX      device

Listing the Apps

.\adb shell pm list packages

Prints out a long list of all installed apps. You can use this list to find the full name of the apps you want to uninstall.

...

package:com.google.android.apps.inputmethod.zhuyin

package:com.microsoft.office.outlook

package:com.google.zxing.client.android

package:com.qualcomm.qti.dynamicddsservice

package:com.google.android.setupwizard

package:eu.siacs.conversations.legacy

package:com.qualcomm.qcrilmsgtunnel

...

package:com.keylesspalace.tusky

package:com.motorola.msimsettings

package:com.android.bookmarkprovider

package:com.linkedin.android

package:com.android.settings

package:com.motorola.arselfie

package:com.qualcomm.qti.lpa

package:com.qualcomm.qti.uim

package:com.google.android.inputmethod.pinyin

...

While you can uninstall most apps like linkedin and outlook you should be more careful with system apps.

Uninstalling the App

.\adb shell pm uninstall --user 0 [Package Name]

Will uninstall the app. So in my case I just had to issue

.\adb shell pm uninstall --user 0 com.microsoft.office.outlook

and

.\adb shell pm uninstall --user 0 com.linkedin.android

Once ADB returns with Success you can unplug your device and are done.

Remember to disable USB Debugging again in your Developer Settings.

giovedì, novembre 07, 2019

Backup dei server Windows con rsync

Anche per gli utenti Windows, il tool rsync è un’alternativa interessante e conveniente rispetto ai costosi software di backup.
Per poter utilizzare questo protocollo, dovete però installare Cygwin.
Con l’aiuto di questa distribuzione simile a Linux si possono utilizzare anche sui sistemi operativi Windows diversi programmi Linux.

Procedete così per l’installazione:
Scaricate Cygwin al seguente link: cygwin.com/index.html.
Aprite il pacchetto, scegliete i moduli “rsync” e “openssh” e installateli.
Create un collegamento nello start menu o sul desktop.

Aprite il terminale di Cygwin tramite il collegamento creato e iniziate la configurazione SSH tramite il comando:

 ssh-host-config

(possibile solo se si esegue il programma come amministratore, cliccando con il tasto destro del mouse) Rispondete alle prime domande con “yes” e alla domanda “Do you want to use a different name?” (Volete scegliere un altro nome?) con “no”.

Infine, create un nuovo account, inserendo sempre “yes”, e scegliete la vostra password personale. Avviate il servizio SSH con l’immissione del comando:

 net start sshd

In questo modo, la configurazione della sincronizzazione crittografata con rsync è impostata su Windows e il servizio può essere utilizzato tramite il terminale di Cygwin, grazie ai comandi conosciuti di Linux. Qui bisogna però prestare attenzione ai tipici percorsi di Windows, oltre che agli utenti e ai gruppi.

Fonte: https://www.ionos.it/digitalguide/server/tools-o-strumenti/fare-il-backup-del-server-con-rsync

OpenVPN server - installazione su Windows 10

SERVER