HomeFeaturesScreenshotsFaqInstallCodeDownloads

Installation with compiled software

This manual only if you have apache, php, pureftpd, awstats, and bind installed or compiled manually



Packages to install in DEBIAN

apt-get install lighttpd

Panel installation


Access PORT: 7777
Example: http://www.yourserver.com:7777/
default user: admin
default password: admin

cd /usr/local
tar xfz baifox.tar.gz
groupadd baifox
useradd -g baifox -s /bin/false -c "Panel control baifox" baifox
passwd baifox [PLAINT TEXT PASSWORD FOR BAIFOX USER]
chown -R baifox.baifox /usr/local/baifox

Configuring Lighttpd

cp -f /usr/local/baifox/etc/lighttpd.conf /etc/lighttpd/lighttpd.conf

Configuring Sudo

apt-get install sudo
echo "[PLAINT TEXT PASSWORD FROM BAIFOX USER]" > /usr/local/baifox/panel/admin_panel/config/.htpasswd
chown baifox.baifox /usr/local/baifox/panel/admin_panel/config/.htpasswd
chmod 600 /usr/local/baifox/panel/admin_panel/config/.htpasswd

modify the /etc/sudoers file to include the next line

echo "baifox ALL=PASSWD:ALL" >>/etc/sudoers

Configuring Modules

mod_apache

cd /usr/local/apache/conf/
mkdir vhosts
chgrp baifox vhosts
chmod 775 vhosts
httpd.conf

NameVirtualHost *:80

<Directory "/usr/local/apache/cgi-bin/awstats">
 deny from all
 Options ExecCGI
 AllowOverride AuthConfig
 Order deny,allow
</Directory>
<VirtualHost *:80>
    #For use only with mod_redirecciones module
    AliasMatch (.*) /usr/local/baifox/scripts/baifox_redireccion.php
    ServerName redirect.dominio.com
</VirtualHost>
<VirtualHost *:80>
 ServerName webmail.dominio.com
 DocumentRoot /usr/local/apache/htdocs/squirrelmail
</VirtualHost>
<VirtualHost *:80>
 ServerName mysql.dominio.com
 DocumentRoot /usr/local/apache/htdocs/phpmyadmin
</VirtualHost>
<VirtualHost *:80>
 ServerName estadisticas.dominio.com
 DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Include /usr/local/apache/conf/vhosts/
mod_awstats

mkdir /etc/awstats/
chgrp baifox /etc/awstats/
chmod 775 /etc/awstats/
touch /usr/local/bin/actualizar_estadisticas
chgrp baifox /usr/local/bin/actualizar_estadisticas
chmod 760 /usr/local/bin/actualizar_estadisticas
mkdir /usr/local/apache/cgi-bin/awstats/
chgrp baifox /usr/local/apache/cgi-bin/awstats/
touch /usr/local/apache/cgi-bin/awstats/.htpasswd
chgrp baifox /usr/local/apache/cgi-bin/awstats/.htpasswd
chmod 664 /usr/local/apache/cgi-bin/awstats/.htpasswd
touch /usr/local/apache/cgi-bin/awstats/.htaccess
chmod 644 /usr/local/apache/cgi-bin/awstats/.htaccess
echo "AuthType Basic" >/usr/local/apache/cgi-bin/awstats/.htaccess
echo "AuthUserFile /usr/local/apache/cgi-bin/awstats/.htpasswd" >>/usr/local/apache/cgi-bin/awstats/.htaccess
echo "AuthName Estadisticas" >>/usr/local/apache/cgi-bin/awstats/.htaccess
echo "require valid-user" >>/usr/local/apache/cgi-bin/awstats/.htaccess
echo "satisfy any" >>/usr/local/apache/cgi-bin/awstats/.htaccess
mod_bandwidth

mkdir /home/estadisticas
chgrp baifox /home/estadisticas
chmod 775 /home/estadisticas
mod_cron
cp /usr/local/baifox/etc/baifox-cron /etc/init.d/baifox-cron
chmod 700 /etc/init.d/baifox-cron
cd /etc/init.d
update-rc.d baifox-cron defaults 99
mod_logrotate

chgrp baifox /etc/logrotate.conf
chmod 664 /etc/logrotate.conf
mod_bind

chgrp baifox /etc/bind/named.conf
chmod 664 /etc/bind/named.conf
chgrp baifox /var/named
chmod 775 /var/named
mod_filesystem

mkdir /home/backup
chgrp baifox /home/backup
chmod 775 /home/backup
mod_pureftpd

./configure --with-mysql --with-cookie --with-throttling --with-ratios --with-language=spanish --with-diraliases 
--with-peruserlimits --with-welcomemsg --with-quotas --with-cookie --sysconfdir=/etc
 
groupadd virtual
useradd -g virtual -s /bin/false -c "Usuario PureFTPD" virtual
mkdir /home/virtual
chown virtual.virtual /home/virtual

CREATE DATABASE baifox_panel;
GRANT ALL ON baifox_panel.* TO baifox_panel@localhost IDENTIFIED BY '[PASSWORD HERE]';
FLUSH PRIVILEGES;

Use the pureftpd-mysql.conf file that is include in admin_panel/modulos/mod_pureftpd/ directory Check the UID y GID from the “virtual” user to comprobe it's the same in the pureftpd-mysql.conf file and in the main_config.php file from BAIFOX configuration directory.

And configure the socket mysqld.sock path in the pureftpd-mysql.conf file to the actual mysql socket path.

/usr/local/sbin/pure-ftpd -p 50000:50400 -B -A -C 8 -E -D -c 50 -s -w -z -b -l mysql:/etc/pureftpd-mysql.conf -l unix &

Configuring system Cron

add to the cron

30 2 * * * /usr/local/bin/actualizar_estadisticas
1 5 * * * /usr/local/baifox/panel/admin_panel/cron.php 1>/dev/null 2>&1
Back to top
install_manual.txt · Last modified: 2009/12/25 16:03 by fidojones