for ini in $(find /opt/ /etc/ /usr/local/ -type f -name "php.ini" 2>/dev/null); do
if grep -q "session.upload_progress.enabled" "$ini"; then
sed -i 's/^[# \t]*session\.upload_progress\.enabled\s*=.*/session.upload_progress.enabled = 0/' "$ini"
else
echo "session.upload_progress.enabled = 0" >> "$ini"
fi
echo "已更新: $ini"
done
for s in php54-php-fpm php56-php-fpm php70-php-fpm php72-php-fpm php73-php-fpm php74-php-fpm php81-php-fpm php83-php-fpm; do
systemctl restart $s 2>/dev/null
echo "已重啟: $s"
done
auto ens18
iface ens18 inet static
address 10.0.0.x
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8 8.8.4.4
up ip route add 10.y.0.0/24 via 10.0.0.z
down ip route del 10.y.0.0/24 via 10.0.0.z
確認無拼字錯誤。
4️⃣ Reboot
reboot
5️⃣ Set DNS
nano /etc/resolv.conf
內容:
nameserver 8.8.8.8
nameserver 8.8.4.4
6️⃣ Test Network
ping google.com
若可解析並 ping 通,表示 DNS 正常。
7️⃣ Edit Hosts
nano /etc/hosts
加入:
10.0.0.w master.ispconfig.domain
(確認 IP 與實際 master 相符)
8️⃣ Install ISPConfig
cd /tmp
wget -O - https://get.ispconfig.org | sh -s -- --interactive
Attention: Before using this script, you MUSTKNOW how to use ISPConfig API. If you are first time to learning ISPConfig API, Please go to see First time test ISPConfig API learning how to config, how to run it and how to debug with https.
After Install ISPConfig , the application would not saved any API Example or Document. So, we need to find out the example scripts at the source file and copy them to /usr/local/ispconfig.
cd /tmp
wget -O ispconfig.tar.gz https://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ispconfig.tar.gz
cd ispconfig3_install/
cp -R remoting_client/ /usr/local/ispconfig/
cd /usr/local/ispconfig/remoting_client
All API Document and example file was copied to /usr/local/ispconfig/remoting_client
ISPConfig add Remote Users
ISPConfig Web UI > system > Remote User > Add new user
Entry username & password, And click what do you want function. In first test, please click all Functions. Please remember username & password for modify API config file .
save
Modify API config file
cd /usr/local/ispconfig/remoting_client/examples/
nano soap_config.php
But some API have some BUG and not work. This is because the normally working API was disabled ‘ssl verify peer’ when using https connect. So, we need add ‘disabled ssl verify peer’ in not work API.
Test sites_web_domain_get.php, you will get a error message ‘SOAP Error: Could not connect to host‘
php sites_web_domain_get.php
SOAP Error: Could not connect to host[root@system]#
If you don’t want REDO the complete procedure, a good fix would be to use
STOP SLAVE;
SET GLOBAL sql_slave_skip_counter=1;
START SLAVE;
If there are too many such errors, a good idea would be to automate it using a bash script.
Reference : Ut xD(2017), https://serverfault.com/questions/336888/what-causes-the-mysql-error-1062-duplicate-entry-when-starting-slave, Last visit at Jan 2022