Tuesday, December 31, 2013

rename window title in tmux

ctrl-b , // to rename a window title in tmux

Note: use ctrl-h to delete characters.

pfSenese - Multiple IP Addresses on one interface

Firewall > Virtual IPs > Add:

Type: IP alias
Address: 1.2.3.4
CIDR: /29

Saturday, December 21, 2013

Thursday, December 19, 2013

mysql error ./mysql/host.frm

Problem:
131219 22:51:39 [ERROR] /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
131219 22:51:39 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
131219 22:51:39 mysqld_safe mysqld from pid file /usr/local/mysql/myhostname.local.pid ended

Solution:
root@myhostname [/usr/local/mysql] # chown -R mysql:mysql /usr/local/mysql
root@myhostname [/usr/local/mysql] # find /usr/local/mysql -type d -exec chmod 700 {} \;
root@myhostname [/usr/local/mysql] # find /usr/local/mysql -type f -exec chmod 660 {} \;

Wednesday, December 18, 2013

get the svn unversioned filename

svn st | grep fr.php | awk -F ' ' '{print $2}' | xargs -I {} svn add {}

Note: use a space as the separator.

Saturday, December 7, 2013

enable open relay on sendmail on FreeBSD


# vim /etc/mail/access
Connect:192.168.0 RELAY

# cd /etc/mail ; make

This will allow all clients with an IP address of 192.168.0.xxx to relay.

Thursday, November 28, 2013

Changing Domain Name on your PrestaShop install

If you are moving PrestaShop to a different domain, or switching from server pathways to your domain name, then you must update PrestaShop with the new domain name. This article explains what changes need to carried out.

UPDATING YOUR DATABASE
Log into cPanel, then go to "PHPMyAdmin" and log into your PrestaShop database. Go to the table "ps_configuration" and locate the records for PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL. Change these to the new domain name. Check the configuration table for any other entries that contain the old domain name and change accordingly.

SELECT * FROM ps_configuration WHERE name LIKE '%domain%'

Go to Admin Page
Go to Admin page > Advanced Parameters > Multistore > Canada > Actions > Edit:

Domain: ca.webstore.local
Domain SSL: ca.webstore.local
Physical URL: /
Virtual URL: store/

Repeat the same steps with USA store.

UPDATING YOUR CONFIG SETTINGS
Via FTP or the file manager in cPanel, modify the PHP file /config/settings.inc.php. Look for the entry for PS_BASE_URI__ and modify as necessary. For a shop located in the root, it should read:

define('__PS_BASE_URI__', '/');

UPDATING SEO-FRIENDLY URLS
Delete (or rename) the .htaccess file on your site.

In our PrestaShop admin, you now need to re-generate the SEO URLs with the new domain name. Log into your PS admin, then go to "tools->generate->generate .htaccess".

ENABLING SSL
If your site has a full SSL Certificate, then you can also enable this via your PS admin under "Preferences page -> Enable SSL: Yes".

Please note that PrestaShop won't work with our Shared SSL as the SEO URLs rewrite rules don't work with the server paths. For PS shops, you either need to have a Dedicated IP & your own Full SSL Certificate or you need to disable SSL.

Reference:
https://support.terranetwork.net/web/knowledgebase/125/Changing-Domain-Name-on-your-PrestaShop-install.html