السبت، 13 يونيو 2015


هذه الخطوات تتطلب أن تكن في صلاحية root

خادم الاباتشي هو برنامج مفتوح المصدر تستخدمه حوالي 50% من الخوادم حول العالم
لتنصيب الاباتشي أكتب في سطر الأوامر
yum install httpd
عندما يتم الانتهاء من تنصيب الاباتشي قم بتشغيله من خلال الأمر التالي

sudo service httpd start
و حتى تتأكد من تنصيب الخادم أكتب ip السيرفر في متصفحك



تنصيب mysql
sudo yum install mysql-server
sudo service mysqld start

اثنا تنصيب المايسكول سيتم سؤالك عن الموافقة مرتين بعد الموافقة مرتين سيتم تنصيب mysql
بعد أنتها التنصيب يمكنك تحديد كلمة مرور الرووت mysql بواسطة الأمر التالي

sudo /usr/bin/mysql_secure_installation

سيتم سؤالك عن كلمة المرور الحالية root
بعد تنصيبك mysql أضغط Enter

Enter current password for root (enter for none):
OK, successfully used password, moving on...

سيتم سؤالك إذا كنت تريد تعييد كلمة مرورر root أختر موافق
بعد تعن كلمة المرور سيتم سؤالك عن الكثير من الإعدادات يفضل الموافقة عليها جميعا

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!



الخطوة الثالثة تنصيب php
كل ما عليك عمله هو كتابة الأمر التالي


sudo yum install php php-mysql

بعد تنصيب ال php  تبق بعض اللمسات الأخيرة حتى يتم تشغيل الاباتشي و mysql تلقائيا عن تشغيل السيرفر إكتب الامر التالي

sudo chkconfig httpd on
sudo chkconfig mysqld on

ملفات التصفح للسيرقر تكون موجوده في المسار التالي
/var/www/html/
او
/var/www/public_html/

الان إدخل الى المسار وأنشى صفحةphp
nano info.php
وكتب الكود التالي

<?php

phpinf();
?>


ثم أحفظ الملف

حتى نتأكد من جميع الإعدادات قم لإعادة تشغيل السيرفر

service httpd restart

والان إدخل على الرابط


ستجد تفاصيل php
تهانينا ألان تم تنصيب حزمة اللمي في سيرفرك بنجاح


0 التعليقات