|
Debian Squeeze Hylafax+Avantfax |
|
|
|
|
Scritto da Alessandro Pensato
|
|
Sabato 13 Agosto 2011 08:00 |
nano /etc/hostname
fax.home.local
nano /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.69 fax.home.local fax
nano /etc/apt/sources.list
deb http://192.168.1.62:9999/debian/ squeeze main contrib non-free
deb-src http://192.168.1.62:9999/debian/ squeeze main contrib non-free
deb http://192.168.1.62:9999/security/ squeeze/updates main contrib non-free
deb-src http://192.168.1.62:9999/security/ squeeze/updates main contrib non-free
apt-get update
apt-get upgrade
apt-get install ntpdate -y
ntpdate server it.pool.ntp.org
apt-get install hylafax-server xfig libfreetype6-dev gv gsfonts-x11 libppl-c2 libppl7 libtool flex make autoconf libtiff-opengl libjasper-runtime samba –y
Nome del Workgroup/Dominio: HOME
nano /etc/samba/smb.conf
[global]
workgroup = HOME
server string = fax
wins server = 192.168.1.103
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
load printers = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[fax]
comment = Fax ricevuti
read only = yes
locking = no
path = /var/spool/hylafax/recvq
guest ok = yes
browsable = yes
faxsetup
Country code [1]? 39
Area code [415]? 091
Phone number of fax modem [+1.999.555.1212]? +39.091.123456
Local identification string (for TSI/CIG) ["NothingSetup"]? HOME-LOCAL Palermo
Long distance dialing prefix [1]? 0
International dialing prefix [011]? 00
Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]?
Protection mode for received facsimile [0600]? 0644
Protection mode for session logs [0600]? 0644
Protection mode for ttyS0 [0600]? 0666
Rings to wait before answering [1]?
Modem speaker volume [off]? quiet
Command line arguments to getty program ["-h %l dx_%s"]?
Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?
Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]?
Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
Tag line format string ["From %%l|%c|Page %%P of %%T"]?
Time before purging a stale UUCP lock file (secs) [30]?
Hold UUCP lockfile during inbound data calls [Yes]?
Hold UUCP lockfile during inbound voice calls [Yes]?
Percent good lines to accept during copy quality checking [95]?
Max consecutive bad lines to accept during copy quality checking [5]?
Max number of pages to accept in a received facsimile [25]? 40
Syslog facility name for ServerTracing messages [daemon]?
Set UID to 0 to manipulate CLOCAL [""]?
Use available priority job scheduling mechanism [""]?
Do you want to run faxaddmodem to configure another modem [yes]? No
nano /etc/hylafax/hosts.hfaxd
192.168.1.:::
reboot
faxadduser -u 100 user
faxadduser -a pwdads31 -p pwdads31 -u 100 admin
apt-get install libpam-ldap libnss-ldap
nano /etc/nsswitch.conf
passwd: compat ldap
group: compat ldap
shadow: compat ldap
nano /etc/ldap/ldap.conf
BASE dc=home,dc=local
URI ldap://ldap.home.local
ln -s /etc/ldap/ldap.conf /etc/ldap.conf
nano /etc/pam.d/hylafax
auth required pam_ldap.so
account required pam_ldap.so
session required pam_ldap.so
reboot
apt-get install apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libsqlite3-0 php5-cli php5-common mysql-server imagemagick libtiff4-dev netpbm libnetpbm10-dev libungif-bin libungif4-dev sudo postfix php-mail php-mail-mime php-file php-db php5-mysql psutils wdiff psfontmgr curl gnuplot html2ps libwmf-bin libgd-tools ttf-baekmuk ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp librsvg2-bin libterm-readkey-perl tinyca php5-dev openssl-blacklist ufraw php5 php-pear php5-mysql php5-cli php5-cgi mysql-server netpbm php5-imagick dh-make-php libmagic-dev libungif4g libpng3 sudo libtiff4-dev gs-gpl gsfonts expect php5-dev make php-pear psutils libnetpbm10-dev libungif-bin libungif4-dev php-db php-file php-http php-mail php-mail-mime php-net-smtp php-net-socket php-xml-parser php5-mcrypt phpmyadmin -y
mysql passowrd: pwdads31
postfix as Internet site with smarthost
Nome del sistema per la posta: fax.home.local
Relay server: smtp.home.local
cd /usr/src
wget http://garr.dl.sourceforge.net/sourceforge/avantfax/avantfax-3.3.3.tgz
tar zvxf avantfax-3.3.3.tgz
cd avantfax-3.3.3
cp avantfax/includes/local_config-example.php avantfax/includes/local_config.php
nano avantfax/includes/local_config.php
$FAXRMPWD = "pwd";
define ('ADMIN_EMAIL', 'root@home.local');
$NOTIFY_INCLUDE_PDF = true;
$AVANTFAX_SERVERNAME = 'fax.home.local'; //
$WWWUSER = 'www-data';
mv avantfax /var/www/
chown -R www-data. www-data /var/www/avantfax
chmod -R 0770 /var/www/avantfax/tmp /var/www/avantfax/faxes
chown -R www-data.uucp /var/www/avantfax/tmp /var/www/avantfax/faxes
mv /var/spool/hylafax/bin/faxrcvd /var/spool/hylafax/bin/faxrcvd.ORI
mv /var/spool/hylafax/bin/notify /var/spool/hylafax/bin/notify.ORI
ln -s /var/www/avantfax/includes/faxrcvd.php /var/spool/hylafax/bin/faxrcvd.php
ln -s /var/www/avantfax/includes/dynconf.php /var/spool/hylafax/bin/dynconf.php
ln -s /var/www/avantfax/includes/notify.php /var/spool/hylafax/bin/notify.php
nano /var/spool/hylafax/etc/config.ttyS0
#
## AvantFAX configuration
#
FaxrcvdCmd: bin/faxrcvd.php
DynamicConfig: bin/dynconf.php
UseJobTSI: true
nano /var/spool/hylafax/etc/config
#
## AvantFAX configuration
#
NotifyCmd: bin/notify.php
pear channel-update pear.php.net
pear upgrade-all
pear install Mail Net_SMTP Mail_mime MDB2_driver_mysql
mysql -uroot -ppwdads31 < create_user.sql
mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
echo 'JobFmt: "%-3j %3i %1a %15o %40M %-12.12e %5P %5D %7z %.25s"' >> /etc/hylafax/hyla.conf
nano /etc/apache2/sites-enabled/000-default
NameVirtualHost *:80
ServerAdmin sysadmin@home.local
DocumentRoot /var/www/avantfax
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from 192.168.1.0/255.255.255.0
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
/etc/init.d/mysql restart
/etc/init.d/apache2 restart
/etc/init.d/hylafax restart
cd /var/spool/hylafax; for i in `ls recvq/*`; do bin/faxrcvd.php $i ttyS0; done
cd /var/spool/hylafax; for i in `ls doneq/q*`; do bin/notify.php $i done :30; done
|