شرح تركيب لوحت سيرفر ISPConfig 3 على debian 6

G.M.K Team

G.M.K Team
مرحبا اعضاء وزوار كوباني سات اليوم سوف اقدم لكم شرح تركيب لوحة تحكم موقع على نطام

ديبيان debian6 نظام جميل جدا ومستقر وسهل وسريع

تطبيق يكون على vps او root server

ديمو خاص بالوحة انقر هنا يوزر admin بسورد demo

برتنامج المطلوب لتطبيق هو حمل من الموقع ما يناسب نظام التشغيل لديكPuTTY


نبداء انت استلمت في بي اس او روت سيرفر اكيد انت بحاجة لتركيب لوحة من هنا سوف اقدم لكم دعم وحل مشاكل خاص بلوحة والنظام

تابع شرح التركيب

غالبا يكون مثبت ولكن سوف ابداء من اول بعض تغيل برنامج الشيل

ملاحظة لا تترك اي فراغ بين الامر في اول السطر

نفذ امر






PHP:
 apt-get install ssh openssh-server



ثم نفظ امر برنامج تحرير الملفات اخترت لكم نانو

PHP:
                                            apt-get 
install nano


غالبا في بي اس او روت سيرفر لا يحتاج الى التعديل network ولكن ان احتاج الامر يجب تعديل

تحرير يكون هذا الامر

PHP:
nano /etc/network/interfaces


ثم عدل حسب ايبي الخاص في السيرفر

PHP:
                                            # 
This file describes the network interfaces available on your system

 
 

 
 

 
# 

 
 

 
 

 
and how to activate them. For more information, see interfaces(5).

 
 

 
 

 
 

 
 

 
 

 
# The 

 
 

 
 

 
loopback network interface

 
 

 
 

 
auto lo

 
 

 
 

 
iface lo inet loopback

 
 

 
 

 
 

 
 

 
 

 
# The 

 
 

 
 

 
primary network interface

 
 

 
 

 
#allow-hotplug eth0

 
 

 
 

 
#iface eth0 inet 

 
 

 
 

 
dhcp

 
 

 
 

 
auto eth0

 
 

 
 

 
iface eth0 inet 

 
 

 
 

 
static

 
 

 
 

 
        address 

 
 

 
 

 
192.168.0.100

 
 

 
 

 
        netmask 

 
 

 
 

 
255.255.255.0

 
 

 
 

 
        network 

 
 

 
 

 
192.168.0.0

 
 

 
 

 
        broadcast 

 
 

 
 

 
192.168.0.255

 
 

 
 

 
        gateway 

 
 

 
 

 
192.168.0.1



عند الانتهاء للحفظ يجب الضغط على strg + x

ثم حرب y ثم انتر

اعمل ريستارت لنيت ورك


PHP:
/etc/init.d/networking restart



تعديل hosts



PHP:
nano /etc/hosts







يجب اضافة اسم سيرفر الخاص بك


PHP:
127.0.0.1       

 
 

 
 

 
localhost.localdomain   localhost

 
 

 
 

 
192.168.0.100   

 
 

 
 

 
server1.example.com     server1

 
 

 
 

 
 

 
 

 
 

 
# The following lines 

 
 

 
 

 
are desirable for IPv6 capable hosts

 
 

 
 

 
::1     

 
 

 
 

 
ip6-localhost ip6-loopback

 
 

 
 

 
fe00::0 ip6-localnet

 
 

 
 

 
ff00::0 

 
 

 
 

 
ip6-mcastprefix

 
 

 
 

 
ff02::1 ip6-allnodes

 
 

 
 

 
ff02::2 ip6-allrouters







كتابة الاسم السيرفر خاص بك في hostname




PHP:
echo server1.example.com > 

/etc/hostname


PHP:
/etc/init.d/hostname.sh start







ريستارت مع اظهار الاسم








PHP:
hostname
hostname -f



اضف السطر في مسار /etc/apt/sources.list



PHP:
deb http://ftp.de.debian.org/debian/ squeeze-updates main


الان نعمل تحديث لنظام من خلال الامر





PHP:
apt-get update







ثم




PHP:
apt-get upgrade








نفذ الامر التالي


PHP:
dpkg-reconfigure dash







اختار لا no

نفظ امر تالي


PHP:
apt-get install ntp ntpdate



الان تحميل اضافات المطلوبة لسيرفر من خلال الامر التالي



PHP:
apt-get install postfix postfix-mysql postfix-doc 

 
 

 
 

 
mysql-client  mysql-server courier-authdaemon courier-authlib-mysql 

 
courier-pop 

 
 

 
 

 
 courier-pop-ssl courier-imap courier-imap-ssl libsasl2-2 libsasl2-modules 


 
 

 
 

 
 

 
 libsasl2-modules-sql sasl2-bin libpam-mysql openssl courier-maildrop 

 
getmail4 

 
 

 
 

 
 rkhunter binutils sudo gamin








General type of mail configuration: <-- Internet Site
اختار هذا الاسم
System mail name: <-- server1.example.com
اسم سيرفك سيرفر الخاص بك
New password for the MySQL "root" user: <-- yourrootsqlpassword

مهم جدا بسورد الرئيسي لقاعدة البيانات sql

Repeat password for the MySQL "root" user: <-- yourrootsqlpassword

اعادة كتابة البسورد اي كلمة المرور ولا تنسها سوف نحتاجه في مرحلة القادمة

Create directories for web-based administration? <-- No

SSL certificate required <-- Ok

تعديل على etc/mysql/my.cnf



PHP:
nano /etc/mysql/my.cnf







فقط اضف # في بدايات السطر الخاص ب 127.0.0.1 اي بي القاعدة البيانات





PHP:
                                            # 

 
Instead of skip-networking the default is now to listen only on

 
 

 
 

 
# localhost 

 
 

 
 

 
which is more compatible and is not less 

 
 

 
 

 
secure.

 
 

 
 

 
#bind-address           

 
 

 
 

 
= 127.0.0.1





نعمل ريستارت






اقتباس:


/etc/init.d/mysql restart








وضع تمام شغال نفظ الامر





اقتباس:


netstat -tap | grep mysql







يكون النتيجة على هذا الشكل






اقتباس:





root@server1:~# netstat -tap | grep mysql


tcp 0 0 *:mysql


*:* LISTEN 10457/mysqld


root@server1:~#










تثبيت الاس اس ال تشفير ssl






اقتباس:





cd /etc/courier


rm -f /etc/courier/imapd.pem


rm -f /etc/courier/pop3d.pem











عدل في سطر غالبا يكون localhost الى سيرفرك




اقتباس:





nano /etc/courier/imapd.cnf













اقتباس:


CN=server1.example.com








عدل هنا ايضا





اقتباس:


nano /etc/courier/pop3d.cnf












اقتباس:


CN=server1.example.com








تنفيظ الامر التالي






اقتباس:





mkimapdcert


mkpop3dcert









تشغيل او ريستارات طبعا ssl هو للايميل






اقتباس:





/etc/init.d/courier-imap-ssl restart


/etc/init.d/courier-pop-ssl


restart












اضافات مثل حماية فايروز وسبام وماشابه







اقتباس:


apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2



arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl


libauthen-sasl-perl clamav-docs daemon libio-string-perl
libio-socket-ssl-perl


libnet-ident-perl zip libnet-dns-perl






نفظ امر التالي بعض الانتهاء






اقتباس:





/etc/init.d/spamassassin stop


update-rc.d -f spamassassin remove









اضافات php وما شابه نفظ الامر التالي


اقتباس:


apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork


apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common
php5-gd


php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid


apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick



libapache2-mod-suphp libruby libapache2-mod-ruby









Web server to reconfigure automatically: <-- apache2

اختار apache2

Configure database for phpmyadmin with dbconfig-
اختار لا
common? <-- No

نفظ الامر التالي

a2enmod suexec rewrite ssl actions include
a2enmod dav_fs dav auth_digest




نعمل ريستارت




/etc/init.d/apache2 restart




تثبيت اف تي بي


اقتباس:


apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool




امر مهم لتعديل الى true



اقتباس:


nano /etc/default/pure-ftpd-common





عدل السطر الى

اقتباس:


STANDALONE_OR_INETD=standalone
[...]
VIRTUALCHROOT=true







اقتباس:


/etc/init.d/openbsd-inetd restart





اقتباس:


echo 1 > /etc/pure-ftpd/conf/TLS






اقتباس:


mkdir -p /etc/ssl/private/




اقتباس:





openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout
/etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem





هنا يكون مثل تسجيل باي موقع ولكن انت اختار معلوات الخاص بسيرفرك مثلا اللغة

اسم شركة وما شابه

بعضها نفظ الامر التالي


اقتباس:


chmod 600 /etc/ssl/private/pure-ftpd.pem





اقتباس:


/etc/init.d/pure-ftpd-mysql restart





لا انصح بعديل على الهارد ديسك


الان دي ان اس


اقتباس:


apt-get install bind9 dnsutils




اقتباس:

apt-get install vlogger webalizer awstats geoip-database





اقتباس:





apt-get install build-essential autoconf automake1.9 libtool flex bison
debhelper





اضافة يدوي هنا

اقتباس:

cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.13.tar.gz
tar
xvfz jailkit-2.13.tar.gz
cd jailkit-2.13
./debian/rules binary
cd
..
dpkg -i jailkit_2.13-1_*.deb
rm -rf jailkit-2.13*




تثبيت اخر


اقتباس:


apt-get install fail2ban





يجب عمل ملفات المطلوبة بدون خربطة يكون فارغ


اقتباس:


nano /etc/fail2ban/jail.local





اضف

اقتباس:





[pureftpd]

enabled =
true
port = ftp
filter =
pureftpd
logpath = /var/log/syslog
maxretry =
3


[sasl]

enabled = true
port
= smtp
filter = sasl
logpath =
/var/log/mail.log
maxretry = 5


[courierpop3]

enabled
= true
port = pop3
filter =
courierpop3
logpath = /var/log/mail.log
maxretry =
5


[courierpop3s]

enabled =
true
port = pop3s
filter =
courierpop3s
logpath = /var/log/mail.log
maxretry =
5


[courierimap]

enabled =
true
port = imap2
filter =
courierimap
logpath = /var/log/mail.log
maxretry =
5


[courierimaps]

enabled =
true
port = imaps
filter =
courierimaps
logpath = /var/log/mail.log
maxretry = 5






اقتباس:


nano /etc/fail2ban/filter.d/pureftpd.conf




اضف

اقتباس:


[Definition]
failregex = .*pure-ftpd: \(.*@<HOST>\)
\[WARNING\] Authentication failed for user.*
ignoreregex =






اقتباس:


nano /etc/fail2ban/filter.d/courierpop3.conf





اضف

اقتباس:





# Fail2Ban configuration file
#
# $Revision: 100
$
#

[Definition]

# Option: failregex
# Notes.:
regex to match the password failures messages in the logfile.
The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for
standard IP/hostname matching and is only an alias
for
#
(?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
failregex =
pop3d: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:
ignoreregex
# Notes.: regex to ignore. If this regex matches, the line
is ignored.
# Values: TEXT
#
ignoreregex =






اقتباس:


nano /etc/fail2ban/filter.d/courierpop3s.conf




اضف

اقتباس:





# Fail2Ban configuration file
#
# $Revision: 100
$
#

[Definition]

# Option: failregex
# Notes.:
regex to match the password failures messages in the logfile.
The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for
standard IP/hostname matching and is only an alias
for
#
(?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
failregex =
pop3d-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:
ignoreregex
# Notes.: regex to ignore. If this regex matches, the line
is ignored.
# Values: TEXT
#
ignoreregex =






اقتباس:


nano /etc/fail2ban/filter.d/courierimap.conf




اقتباس:





# Fail2Ban configuration file
#
# $Revision: 100
$
#

[Definition]

# Option: failregex
# Notes.:
regex to match the password failures messages in the logfile.
The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for
standard IP/hostname matching and is only an alias
for
#
(?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
failregex =
imapd: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:
ignoreregex
# Notes.: regex to ignore. If this regex matches, the line
is ignored.
# Values: TEXT
#
ignoreregex =






اقتباس:


nano /etc/fail2ban/filter.d/courierimaps.conf




اقتباس:





# Fail2Ban configuration file
#
# $Revision: 100
$
#

[Definition]

# Option: failregex
# Notes.:
regex to match the password failures messages in the logfile.
The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for
standard IP/hostname matching and is only an alias
for
#
(?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
failregex =
imapd-ssl: LOGIN FAILED.*ip=\[.*:<HOST>\]

# Option:
ignoreregex
# Notes.: regex to ignore. If this regex matches, the line
is ignored.
# Values: TEXT
#
ignoreregex =




الان نعمل ريستارت


اقتباس:


/etc/init.d/fail2ban restart




تثبيت الاميل


اقتباس:


apt-get install squirrelmail




نفظ الامر التالي

اقتباس:


ln -s /usr/share/squirrelmail/ /var/www/webmail




ركز هنا نفظ امر


اقتباس:


squirrelmail-configure




اول شي اختار حرف d
ثم اكتب courier

ثم انتر


ثم حرف اس s

ثم انتر

ثم حرب q للخروج

اكتب محل الاي بي اي بي موقعك او دومين



اقتباس:


http://192.168.0.100/webmail





الان انتهينا من اعدادت السريرفر

تابع معي لتركيب الوحة



اقتباس:


cd /tmp
wget
http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz
ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/





ثم نفظ الامر


اقتباس:


php -q install.php




ركز معي كل طلب اضغط انتر فقط عند وصول الى بسورد sql


اقتباس:


MySQL root password []:



يجب كتابة البسور د الذي شرحنا في اول الدرس

يطلب الاعادة كرر الامر

والباقي كل شي انتر لا تعمل شي اخر ثم ينهي

اكتب بعض النطاق او دومين


اقتباس:


http://server1.example.com:8080





ادخل الى الوحة الاسم هو admin والبسورد هو admin


هذا هو كل شي مبروك عليك ولا تتردد باسالة او اي مشكلة خظاء توجهك

بامكان حل جميع المشاكل تخص الوحة والنظام


لكم فائق التقدير ارجو ان ينال اعجابكم


خاص بكوباني سات
 
أعلى