ممكن شرح تركيب سكربت الاستضافه

L!NUX MAN

:: Linux Admin ::
طاقم الإدارة
28 مايو 2008
51
2
0
EgYpT
الشرح موجود فى ملف readme


Installation
------------------------------------------------------------------------------
To install, please follow the following steps:

download and install this module
http://search.cpan.org/~tjmather/Geo-IP-PurePerl-1.11/
wget http://search.cpan.org/CPAN/authors/id/T/TJ/TJMATHER/Geo-IP-PurePerl-1.11.tar.gz

for redhat linux also may install this:
ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/mc-4.6.0-4.i386.rpm

rpm -i mc-4.6.0-4.i386.rpm


3.1. Upload to server xpanel_116.tar.gz (e.g. /tmp/scripts/)
3.2. Unarchive the xpanel_116.tar.gz, by typing from shell:

tar -zxvf xpanel_116.tar.gz

3.3. Copy xpanel directory from /tmp/scripts/xpanel_116/ to /usr/local/xpanel
use:
cd /tmp/scripts/xpanel_116/
cp -R xpanel /usr/local/

3.4. Copy cgi-bin directory from /tmp/scripts/xpanel_116/ to your cgi-bin
e.g.
cp -R cgi-bin /var/www/
cp -R images /var/www/html/images

3.5. Create a MySQL database using XPanel.mysql file by typing from shell:

mysql -p <XPanel.mysql

3.6. Make directory "/home/vhosts" and set chmod 777 /home/vhosts
Edit file /usr/local/xpanel/Conf/Config.pm in ASCII mode!!!

3.7. Edit /etc/crontab file
You can set these up by typing from shell:

crontab -e

and adding the following lines:

#----------> Crontab Configuration for XPanel <--------------------------------#
# run every 5 min.
3,8,13,18,23,28,33,38,43,48,53,58 * * * * /usr/local/xpanel/create.sh 1> /dev/null 2> /dev/null
# run every 10 min.
0,10,20,30,40,50 * * * * /usr/local/xpanel/delete.sh 1> /dev/null 2> /dev/null
# run 2 minutes after midnight, every day
2 0 * * * /usr/local/xpanel/bandwidth_delete.sh 1> /dev/null 2> /dev/null
# run 5 minutes after midnight, every day
5 0 * * * /usr/local/xpanel/expiry.sh 1> /dev/null 2> /dev/null
# run 6 minutes after midnight, every day
6 0 * * * /usr/local/xpanel/named.pl 1> /dev/null 2> /dev/null
# run 7 minutes after midnight, every day
7 0 * * * /etc/init.d/named reload 1> /dev/null 2> /dev/null
# run 9 minutes after midnight, on the first day of every month
9 0 1 * * /usr/local/xpanel/reset_ht.pl 1> /dev/null 2> /dev/null
# run at the end of the day, every day
59 23 * * * /usr/local/xpanel/xpanel_db_backup.sh 1> /dev/null 2> /dev/null
#----------> End Crontab Configuration for XPanel <----------------------------#

and save it.
* FreeBSD require special configuration
exemple:
59 23 * * * root /usr/local/xpanel/xpanel_db_backup.sh 1> /dev/null 2> /dev/null


3.8. Edit Apache httpd.conf file
!!! The first VirtualHost section is used for requests without a known server name.
Must be first VirtualHost in your httpd.conf
You should have only one virtual host with this IP 123.45.67.89 in httpd.conf and in proftpd.conf
add to /etc/http/conf/httpd.conf this:

Include /usr/local/xpanel/Conf/xp_httpd.conf

and edit IP address from xp_httpd.conf

3.9. Edit ProFTPD 1.2.X proftpd.conf file
for RedHat you should have installed ProFTPD with this configuration:

./configure --prefix=/usr --sysconfdir=/etc --with-modules=mod_sql:mod_sql_mysql --with-includes=/usr/include/mysql --with-libraries=/usr/lib/mysql
make
make install

in your /etc/proftpd.conf add this:

Include /usr/local/xpanel/Conf/xp_proftpd.conf

and edit IP address from xp_proftpd.conf


3.10. Edit your DNS record, add wildcard *

yourdomain.com. IN A 123.45.67.88
www.yourdomain.com. IN CNAME yourdomain.com.
ftp.yourdomain.com. IN CNAME yourdomain.com.

xpanel.yourdomain.com. IN A 123.45.67.89
*.yourdomain.com. IN CNAME xpanel.yourdomain.com.

http://www.zoneedit.com offers DNS free of charge to anyone who asks.

3.11. Change Admin PassWord
set chmod 666 /usr/local/xpanel/.htpasswd
your default username/password are demo/demo

to change go to: www.yourdom.com/cgi-bin/xpanel_admin/xpanel_admin.cgi?passwd