منتدى الحب والرومانسيه
أهلا ومرحبا بك عزيزى الزائر معنا نتمنى لك قضاء اسعد الأوقات معنا : إداره منتدى الحب والرومانسيه
منتدى الحب والرومانسيه
أهلا ومرحبا بك عزيزى الزائر معنا نتمنى لك قضاء اسعد الأوقات معنا : إداره منتدى الحب والرومانسيه
منتدى الحب والرومانسيه
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.



 
الرئيسيةالــبــوابـهأحدث الصورالتسجيلدخول

 

 تركيب Apache و PHP و MySQL على Linux

اذهب الى الأسفل 
كاتب الموضوعرسالة
A.D.M.I.N
ـآدـآره ـالمنتدي
ـآدـآره ـالمنتدي
A.D.M.I.N


المشاركات : 3045
نقاط عضويتك : 6552
الوظيفة : طالب
الجنس : ذكر
وطنى : تركيب Apache و PHP و MySQL على Linux 1egypt10
مزاجي : تركيب Apache و PHP و MySQL على Linux Pi-ca-24
الاوسمه : الادارة

تركيب Apache و PHP و MySQL على Linux Empty
مُساهمةموضوع: تركيب Apache و PHP و MySQL على Linux   تركيب Apache و PHP و MySQL على Linux I_icon_minitimeالجمعة سبتمبر 18, 2009 6:54 am

[size=9]1.1 ما هو الـ Apache ؟

هو برنامج خادم الويب الأكثر شعبيه في العالم طبقاً لدراسة NetCraft Web Server Survey ويمكنك الأطلاع عليها على العنوان التالي :
http://www.netcraft.com/survey/

أي برنامج خادم ويب هو عباره عن برنامج يخدم الوثائق والصور و أي ماده أخرى في موقعك الى العالم الخارجي . هو في الاساس برنامج أرسال الملفات . يقبل الطلبات و وينجزها أذا يستطيع .
( الخادم لا يستطيع أرسال صفحة ويب غير موجوده في الموقع )

1.2 لماذا نحتاج إلى Apache ؟

في الأساس يستعمل الـ Apache من قبل شركات الأستضافه لتقديم خدمة إستضافة مواقع الويب .

أيضاً عندما يتعلق الامر بتطوير صفحات الويب المتقدمه مع جانب الخادم والذي يكتب بواسطة PHP مثلاً , أنت سوف تحتاج الى خادم ويب على جهازك الشخصي لكي تقوم بتطوير صفحات موقعك أو مشروعك , بدون الخام أنت لا تستطيع تنفيذ كود الـ PHP , من ناحيه أخر أنت يمكن أن تكتب تطبيقاتك وتقوم بتنفذها من خلال خادم الشركه المستضيف مواقع ويبك لديهم بأستعمال Telnet أو SSH على أي حال هذه الطريقه غير عمليه لسببين :

1 - هو الوقت المستغرق في نقل الملفات والبطئ الناتج من خلال مقدم خدمة الانترنت لديك أو بطى الخادم للمستضيف بالاضافه الى التكلفه الماديه من خلال إتصالك بالانترنت .

2 - هو أسهل كثيراً من خلال وجود نسخه مماثله لموقعك في جهازك . وتستعملها كخادم إنتاج لمشاريعك , وتقوم بنسخها الى موقعك من خلال الـ FTP بعد التأكد من أن الموقع يعمل بشكل صحيح في جهازك .

1.3 حسناً .. أنا مقتنع بما تقول لكن ! كيف أحصل عليه ؟

طبعاً بما أن الـ Apache يمكن تركيبه على أي نظام مثل Windows أو Linux فسوف يكون هذا الدرس مقتصر على نظام Linux لاننا قمنا سابقاً بشرح تركيبه كامل على نظام Windows وتجد الدرس على شكل ملف في المنتدى .

يمكن الحصول عليه من خلال هذا العنوان :
http://www.mysql.com/Downloads/

قم بتحميل أخر نسخه يفضل ذالك .

من خلال الرابط أعلاه يمكنك تحميل النسخ binaries (already compiled, executable versions) أي قابله لتنفيذ بشكل مختصر , يمكنك تحميل هذه النسخه apache_1.3.xx.tar.gz هي ليست الاحدث ولكن الجديد هو الاصدار رقم 2 , لا تقلق فطريقة التركيب واحده لا يوجد أختلاف , بمناسبه xx هو يدل على أخر أصدار منه وهو الافضل لك في تحميله , الان سوف أوضح لكم عملية التركيب خطوه خطوه .

1.4 كيف يمكن تركيبه ؟

أولاً يمكن الحصول عليه من خلال وضع هذا في المتصفح
<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">wget http://httpd.apache.org/dist/apache_1.3.xx.tar.gz
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

طبعاً xx أخر أطلاق تم أصداره , أو من خلال تحميله من الموقع مباشره بذهاب الى الموقع .

الأن بعد الحصول على الملف يجب علينا فك ضغطه طبعاً سوف نستخدم هذه الامر , لكن قبل هذا يفضل نقل هذا الملف الى المسار التالي : (/usr/local ) .


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> gunzip -c apache_1.3.xx.tar.gz | tar -xvf -
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

طبعاً هذا الامر سوف يقوم بأنشاء دليل بهذا الاسم apache_1.3.xx توجد به الملفات يمكنك تغيير أسمه أذا أحببت الى apache في هذا الدرس سوف نقوم بتغيير أسمه الى apache , الان سوف ننتقل الى هذا الدليل من خلال هذا الامر طبعاً الذين يتعاملون مع نظام Linux معروف لديهم هذا الامر البسيط وهو للانتقال الى داخل الدليل الخاص بالـ apache


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">cd apache
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

بعد الانتقال داخل الدليل قم بتنفيذ هذا الامر وهو الخاص بأعداد apache


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> ./configure --enable-module=most --enable-shared=max
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

هذا الجزء

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> --enable-module=most
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>
هو أختياري سوف يقوم بتركيب كل الوحدات الديناميكيه بإستثناء الوحدات الصعبه .

وهذا الجزء

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> --enable-shared=max
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>
لتحميل الوحدات الى الذاكره فقط عندما يحتاج

الان سوف نقوم بتجميع الـ apache من خلال تنفيذ هذا الامر

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">make
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

لان بعد التجميع سوف نقوم بتنصيبه من خلال هذا الامر

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">make install
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

الان نستطيع أن نقول لك مبروك على تركيب الـ Apache على نظام Linux

1.5 كيف نقوم بتشغيل Apache ؟

الان لتشغيل الخادم كل ما عليك هو أن تقوم بتنفيذ هذا الامر وهو لتشغيل الـ Apache


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> ./bin/apachectl start
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

ملاحظه : لتنفيذ الامر السابق يجب أن تكون داخل الدليل التالي apache أذا لم تكن داخل هذا الدليل لديك أختيارين أما أن تكتب المسار كامل


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">/usr/local/apache/bin/apachectl start
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

او الانتقال الى الديل من خلال الامر التالي


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">cd /usr/local/apache
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

الان بعد تشغيل الخادم سوف نفتح المتصفح ونكتب التالي :

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> localhost أو 127.0.0.1
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

1.6 كيف نقوم بإعداد Apache ؟

أن ملف الاعداد لـ Apache يسمى httpd.conf ويمكن الوصول إليه من خلال المسار التالي

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap">/usr/local/apache/conf
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

في نظام Linux يوجد أكثر من محرر سهل الاستخدام من أشهرها هو VI طبعاً لن أقوم بشرحه لان أغلب مستخدمين Liunx يعرفون طريقة إستخدامه

الان بعد فتح هذا الملف أبحث عن هذا ServerName وقم بإزالة هذه العلامه من أمامها (#) أذا كان لديك أسم خادم خاص بك أنت يمكن أن تضعه لنفرض أن قريتنا الحبيبه لديها خادم خاص بها نكتب الاتي :

<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> ServerName www.phpvillage.com
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

أما أذا لم يكن لديك أسم خادم أنت يمكن أن تضع التالي وهو الافتراضي أعتقد أذا كنت تريد تركيبه على خادم إنتاجك أي جهازك الشخصي .


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> ServerName localhost
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

أيضاً قم بالبحث عن هذا DocumentRoot سوف تجده بعد ServerName مباشرتاً , هذا الجزء يجب أن يشير الى الدليل الذي سوف تضع به ملفات HTML لإستخدامها هذا الدليل سوف يكون الدليل الرئيسي لخادم ويبك . وهذا مثال


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> DocumentRoot "/home/phpvillage/my_web_site"
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

ملاحظه مهمه : الشرطه يجب أن تكون أماميه مثل هذا ( / )

مثال : لو وضعنا ملف html في هذا المسار /home/phpvillage/my_web_site أسمه example.html سوف نقوم بتصفحه كتالي localhost/example.html

لان بعد عمل التعديلات الازمه مهم جداً جداً أن تقوم بإعادة تشغيل Apache مرى أخر من خلال هذا الامر


<table dir="ltr" align="center" cellpadding="0" cellspacing="0" width="82%"> <tbody><tr> <td><small>Code ..</small></td> </tr> <tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> <tr class="code"> <td style="white-space: nowrap;" nowrap="nowrap"> ./bin/apachectl restart
</td> </tr></tbody><caption>
</caption> <tbody><tr bgcolor="#aca998" height="1"> <td height="1"> تركيب Apache و PHP و MySQL على Linux Pixel</td> </tr> </tbody></table>

1.7 مصادر Apache على الإنترنت ؟

Apache Web Server Documentation
http://httpd.apache.org/docs/

Apache Today
http://apachetoday.com

Apache Week
http://www.apacheweek.com

[/size]
الرجوع الى أعلى الصفحة اذهب الى الأسفل
https://romansy4ever.7olm.org
 
تركيب Apache و PHP و MySQL على Linux
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» الآن :: شرح تركيب برنامج السويش ماكس مـع الكــراك
» كيفية تركيب واجهة لموقع من الألف للياء
» شرح تركيب ايقونة vb لجعل صورة خاصة برابط موقعك شرح مصور
»  التوزيعات الأساسية في Linux إختار ما يناسبك
» تشغيل برامج windows على Linux لن تندم عليه

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
منتدى الحب والرومانسيه :: منتدى الدروس التعليميه :: الأنترنت و برمجة المواقع-
انتقل الى: