prestashop enable SSL SQL


mysql> SELECT * FROM `ps_configuration` WHERE name like 'PS_SSL_ENABLED%' ;
+------------------+---------------+---------+---------------------------+-------+---------------------+---------------------+
| id_configuration | id_shop_group | id_shop | name | value | date_add | date_upd |
+------------------+---------------+---------+---------------------------+-------+---------------------+---------------------+
| 29 | NULL | NULL | PS_SSL_ENABLED | 0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 |
| 288 | NULL | NULL | PS_SSL_ENABLED_EVERYWHERE | 0 | 2021-01-24 00:52:10 | 2021-01-24 00:52:10 |
+------------------+---------------+---------+---------------------------+-------+---------------------+---------------------+

mysql> update ps_configuration set value=1 where id_configuration=29;
mysql> update ps_configuration set value=1 where id_configuration=288;

pure-ftpd ubuntu


apt update
apt install -y pure-ftpd

rm -rf /etc/pure-ftpd/conf/* \
&& echo "clf:/var/log/pure-ftpd/transfer.log" > /etc/pure-ftpd/conf/AltLog \
&& echo "UTF-8" > /etc/pure-ftpd/conf/FSCharset \
&& echo "1000" > /etc/pure-ftpd/conf/MinUID \
&& echo "yes" > /etc/pure-ftpd/conf/NoAnonymous \
&& echo "no" > /etc/pure-ftpd/conf/PAMAuthentication \
&& echo "no" > /etc/pure-ftpd/conf/UnixAuthentication \
&& echo "/etc/pure-ftpd/pureftpd.pdb" > /etc/pure-ftpd/conf/PureDB \
&& touch /etc/pure-ftpd/pureftpd.pdb \
&& echo "027 007" > /etc/pure-ftpd/conf/Umask \
&& echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone \
&& echo "yes" > /etc/pure-ftpd/conf/Daemonize \
&& echo "yes" > /etc/pure-ftpd/conf/DontResolve \
&& echo "no" > /etc/pure-ftpd/conf/BrokenClientsCompatibility \
&& echo "50" > /etc/pure-ftpd/conf/MaxClientsNumber \
&& echo "no" > /etc/pure-ftpd/conf/VerboseLog \
&& echo "yes" > /etc/pure-ftpd/conf/DisplayDotFiles \
&& echo "no" > /etc/pure-ftpd/conf/AnonymousOnly \
&& echo "ftp" > /etc/pure-ftpd/conf/SyslogFacility \
&& echo "no" > /etc/pure-ftpd/conf/AnonymousCanCreateDirs \
&& echo "30000 50000" > /etc/pure-ftpd/conf/PassivePortRange \
&& echo "no" > /etc/pure-ftpd/conf/AllowUserFXP \
&& echo "no" > /etc/pure-ftpd/conf/AllowAnonymousFXP \
&& echo "no" > /etc/pure-ftpd/conf/ProhibitDotFilesWrite \
&& echo "no" > /etc/pure-ftpd/conf/ProhibitDotFilesRead \
&& echo "no" > /etc/pure-ftpd/conf/AutoRename \
&& echo "yes" > /etc/pure-ftpd/conf/AnonymousCantUpload \
&& ln -sf /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50pure \
&& ln -sf /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/40PureDB \
&& systemctl stop pure-ftpd \
&& systemctl start pure-ftpd \
&& systemctl status pure-ftpd

# To enable both plain-text and TLS encryption
echo "1" > /etc/pure-ftpd/conf/TLS

# Or disable plain-text and use TLS encryption only
echo "2" > /etc/pure-ftpd/conf/TLS

apt install -y certbot
certbot certonly --standalone --agree-tos --cert-name ftp.yourdomain.tld -n -m ftp@yourdomain.tld -d ftp.yourdomain.tld -d ftp2.yourdomain.tld --pre-hook "service apache2 stop" --post-hook "service apache2 start"

echo $(certbot certonly --standalone --agree-tos --cert-name ftp.yourdomain.tld -n -m ftp@yourdomain.tld -d ftp.yourdomain.tld -d ftp2.yourdomain.tld --pre-hook "service apache2 stop" --post-hook "service apache2 start") \
cd /etc/letsencrypt/live/ftp.yourdomain.tld/ \
&& cat cert.pem privkey.pem > pure-ftpd.pem \
&& rm /etc/ssl/private/pure-ftpd.pem \
&& mv pure-ftpd.pem /etc/ssl/private/ \
&& chmod 600 /etc/ssl/private/pure-ftpd.pem \
&& service pure-ftpd restart

#Add new user
groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser -d /home/ftpuser
chown -R ftpuser:ftpgroup /home/ftpuser

pure-pw useradd ftpaccountname -u ftpuser -g ftpgroup -d /home/ftpuser
pure-pw mkdb
pure-pw show ftpaccountname

#Reset FTP User Password
pure-pw list
pure-pw passwd ftpaccountname
pure-pw mkdb

#Delete FTP User
pure-pw userdel ftpaccountname
pure-pw mkdb

ubuntu install rethinkdb

apt install gnupg2 -y
apt install -y ca-certificates

update-ca-certificates
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.

source /etc/lsb-release && echo "deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main" | tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | sudo apt-key add -
apt-get update
apt-get install rethinkdb

ERROR 1698 (28000): Access denied for user ‘root’@’localhost’

MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;
+------+-----------+-------------+
| User | Host | plugin |
+------+-----------+-------------+
| root | localhost | unix_socket |

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;
+------+-----------+-----------------------+
| User | Host | plugin |
+------+-----------+-----------------------+
| root | localhost | mysql_native_password |
+------+-----------+-----------------------+

service mysql restart

zabbix 5 on ubuntu 20

apt update
apt install apache2 libapache2-mod-php
apt install mysql-server
apt install php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql
mysql_secure_installation

vim /etc/php/7.4/apache2/php.ini
memory_limit 256M
upload_max_filesize 16M
post_max_size 16M
max_execution_time 300
max_input_time 300
max_input_vars 10000

wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
dpkg -i zabbix-release_5.0-1+focal_all.deb

apt update
apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent zabbix-apache-conf

mysql -u root -p

CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON zabbixdb.* TO 'zabbix'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

cd /usr/share/doc/zabbix-server-mysql
zcat create.sql.gz | mysql -u zabbix -p zabbixdb

vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbixdb
DBUser=zabbix
DBPassword=password

systemctl enable zabbix-server
systemctl restart zabbix-server
systemctl restart apache2