четверг, 28 августа 2014 г.

How can I distribute Catalyst Apps?

How can I distribute Catalyst Apps?

The default (and recommended) packaging method is to use Module::Install.

To pack up an application, use 'make manifest' and then 'make dist' to create a redistributable tar of the application directory.

In your application base directory:

    edit prereqs in Makefile.PL
    perl Makefile.PL
    make manifest (edit MANIFEST.SKIP and run make manifest again if you'd like to exclude certain file patterns)
    make dist
    copy YourApp?-version.tar.gz to the destination system, unpack and run it..

пятница, 22 августа 2014 г.

iptables сохранение и автовосстановление правил

Сохранение текущих правил в файл:
$ sudo iptables-save > /etc/firewall.conf

Примерное содержимое /etc/firewall.conf:
*filter
:INPUT ACCEPT [8765:8446525]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [7694:474292]
-A INPUT -s 5.101.101.64/32 -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -s 188.226.202.7/32 -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j REJECT --reject-with icmp-port-unreachable
COMMIT

Редактируем /etc/network/if-up.d/00-iptables:
#!/bin/sh
iptables-restore < /etc/firewall.conf

Всё. Теперь при перезагрузке мы не потеряем настройки файрволла