Install memcached on CentOS 7

To install memcached on CentOS 7, run Set memcached to start on boot Start memcached with Installing PHP Module You need remi repository installed, which provide a memcached module for all versions of php they support. For PHP 5.6, run Now phpinfo() will show See memcached

Prestashop

PrestaShop is a popular open-source e-commerce platform that allows users to create and manage their own online stores. PrestaShop Migration Prestashop Change URL Enable SSL in PrestaShop 1.7 Reset Prestashop admin password Reset Prestashop 1.6 admin password PrestaShop Tips PrestaShop 1.6 regenerate htaccess How to Clear Cache in PrestaShop PrestaShop Change Database Name PrestaShop add … Read more

Prestashop Change URL

To change the domain name of a Prestashop site, you need to edit the MYSQL database. Table ps_configuration Value for following should be changed to new domain. Table ps_shop_url Change the “domain” and “domain_ssl” value. Changing Installation Folder If you changing the Prestashop installation folder, then you need to change “physical_uri” to the new path. … Read more

Ubuntu 18.04 Remove Trash Icon from Desktop

First find the Trash related settings with gsettings command. boby@ok-pc-01:~$ gsettings list-recursively | grep -i trash org.gnome.gedit.plugins.filebrowser.nautilus confirm-trash true org.gnome.desktop.privacy remove-old-trash-files false org.gnome.eog.ui disable-trash-confirmation false org.gnome.nautilus.preferences confirm-trash true org.gnome.nautilus.preferences show-move-to-trash-shortcut-changed-dialog true org.gnome.DejaDup exclude-list [‘$TRASH’, ‘$DOWNLOAD’] org.gnome.nautilus.desktop trash-icon-name ‘Trash’ org.gnome.nautilus.desktop trash-icon-visible true boby@ok-pc-01:~$ To disable the Trash Icon on desktop, run gsettings set org.gnome.nautilus.desktop trash-icon-visible false … Read more

grub

CentOS 7 Grub 2 grubby OVH CentOS 7 server grub rescue prompt RHEL Based – AlmaLinux, CentOS, RockeyLinux, Oracle Linux Regenerate grub config grub2-mkconfig -o /boot/grub2/grub.cfg grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg grub config on RHEL /etc/default/grub To install Grub, run /sbin/grub2-install /dev/sda To see all available kernels awk -F\’ ‘$1==”menuentry ” {print i++ ” … Read more

Haproxy Site With SSL

To handle SSL/HTTPS traffic on haproxy, use following config in your /etc/haproxy/haproxy.cfg file. frontend https-frontend-new bind :::443 ssl crt domain.pem acl https ssl_fc http-request set-header X-Forwarded-Proto http if !https http-request set-header X-Forwarded-Proto https if https option forwardfor acl secured_cookie res.hdr(Set-Cookie),lower -m sub secure http-response replace-header Set-Cookie (.*) \1;\ secure if https !secured_cookie default_backend https-backend-new backend … Read more

Show X-Forwarded-For IP in Apache

When apache is running behind the proxy server it shows the IP of the proxy server as visitor IP. To fix this, you need to enable Apache module remoteip. https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html On Ubuntu/Debian, this can be enabled with the command a2enmod remoteip Now create file vi /etc/apache2/conf-available/remoteip.conf Add RemoteIPHeader X-Forwarded-For RemoteIPTrustedProxy IP_OF_YOUR_PROXY_SERVER_HERE IP_OF_YOUR_PROXY_SERVER_HERE = repace with … Read more

Auto Start pm2 on boot

To auto start pm2 on boot, run pm2 startup This will generate auto start script for your system. Once you started all applications, you can save it with pm2 save To uninstall, run pm2 unstartup systemd Running Application as Normal User First login as the user, then start the application using pm2. pm2 start app.js … Read more

sqlite

.database Show location of the database file. sqlite> .database main: /root/config.db sqlite> .tables List tables in a database sqlite> .tables tree sqlite> select To see data from table, use select statement like you do in MySQL. select * from TABLE_NAME; .schema To see how a table is created, use .schema TABLE_NAME This is equivalent to … Read more

lftp Fatal error: Certificate verification: Not trusted

When i connect to an FTP server, i get following error root@hestia-lnx:~# lftp -u sokftp 54.37.215.1 Password: lftp sokftp@54.37.215.1:~> dir ls: Fatal error: Certificate verification: Not trusted lftp sokftp@54.37.215.1:~> ls -la ls: ls -la: Fatal error: Certificate verification: Not trusted lftp sokftp@54.37.215.1:~> To fix this, run set ssl:verify-certificate no You can add this to /etc/lftp.conf … Read more