LAMP is short for Linux, Apache, MySQL, PHP
نفذ كل الاوامر تحت صلاحيات root
أولاً ::: Installing MySQL 5
yum install mysql mysql-server
chkconfig --levels 235 mysqld on /etc/init.d/mysqld start
mysqladmin -u root password root
ثانياً :::: Installing Apache2
yum install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start

أماكن وضع الملفات في السيرفر يكون على المسار التالي /var/www/html
ثالثاً :::: Installing PHP5
yum install php
/etc/init.d/httpd restart
vi /var/www/html/info.php
كود PHP:
.: أنقر هنا لتحديد الكل :.
<?php
phpinfo();
?>
ونتأكد من عمل الـ PHP

رابعاً :::: Getting MySQL Support In PHP5
yum search php
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy
/etc/init.d/httpd restart

خامساً :::: phpMyAdmin
yum install phpmyadmin
vi /etc/httpd/conf.d/phpMyAdmin.conf
كود PHP:
.: أنقر هنا لتحديد الكل :.
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
#<Directory /usr/share/phpMyAdmin/>
# order deny,allow
# deny from all
# allow from 127.0.0.1
# allow from ::1
#</Directory>
# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries>
Order Deny,Allow
Deny from All
Allow from None
</Directory>
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin>
# SecRuleInheritance Off
# </Directory>
#</IfModule>
نعيد تشغيل السيرفر
/etc/init.d/httpd restart
الان أكتب في المتصفح التالي http://localhost/phpmyadmin

الان لديك سيرفر يعمل PHP & MySQL
هل هذا كل شي طبعاً لا أكيد هناك أضافات كثيره سوف نقوم بها حتى يكون السيرفر كامل


Menu
Cat Widget