{"id":267,"date":"2017-03-20T14:10:13","date_gmt":"2017-03-20T14:10:13","guid":{"rendered":"http:\/\/kclik.ir\/?p=267"},"modified":"2019-08-09T14:21:53","modified_gmt":"2019-08-09T14:21:53","slug":"%d8%af%d8%a7%d9%85%db%95%d8%b2%d8%b1%d8%a7%d9%86%d8%af%d9%86%db%8c-apache-php-%db%b7-%db%b1-%d9%88-mysql-%d9%84%db%95-centos-%db%b7-%db%b3","status":"publish","type":"post","link":"https:\/\/linux.krd\/?p=267","title":{"rendered":"\u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc Apache, PHP \u06f7.\u06f1 \u0648 MySQL \u0644\u06d5 CentOS \u06f7.\u06f3"},"content":{"rendered":"<h5>\u067e\u06ce\u0634\u06d5\u06a9\u06cc<\/h5>\n<p>\u0644\u06d5\u0645 \u0648\u0627\u0646\u06d5 \u0641\u06ce\u0631 \u062f\u06d5\u0628\u06cc\u0646 \u06a9\u06d5 \u0686\u06c6\u0646 \u0695\u0627\u0698\u06d5\u06cc\u06ce\u06a9\u06cc Apache \u0644\u06d5 \u0633\u06d5\u0631 \u06af\u0646\u0648\/\u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc CentOS 7 (\u0631\u0627\u0698\u06d5) \u0628\u06d5 \u067e\u0627\u06b5\u067e\u0634\u062a\u06cc\u06a9\u0631\u062f\u0646\u06cc PHP \u0648 MySQL \u062f\u0627\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646.LAMP \u06a9\u0648\u0631\u062a\u06a9\u0631\u0627\u0648\u06d5\u06cc Linux, Apache, MySQL, PHP\u0640\u06d5. \u0626\u06d5\u0645 \u0648\u0627\u0646\u06d5 \u0628\u06d5\u0695\u06c6\u0698\u0628\u0648\u0648\u06d5 \u0644\u06d5 \u0633\u06d5\u0631 PHP \u0648\u0634\u0627\u0646\u06cc\u00a0 (7.0 \u0648\u06d5 7.1) \u0644\u06d5 \u06af\u0646\u0648\/\u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc CentOS 7.3\u0633\u06ce\u0631\u06a4\u06ce\u0631.\u062f\u06d5\u062a\u0648\u0627\u0646\u0646\u00a0<a href=\"http:\/\/kclik.ir\/%d8%af%d8%a7%d9%85%db%95%d8%b2%d8%b1%d8%a7%d9%86%d8%af%d9%86%db%8c-%da%95%d8%a7%da%98%db%95%db%8c%db%8e%da%a9%db%8c-%d8%a8%da%86%d9%88%d9%88%da%a9-%d8%a8%db%95-centos-7-3\/\">\u0626\u06d5\u0645 \u0628\u0627\u0628\u06d5\u062a\u06d5\u0634<\/a>\u00a0\u0628\u06c6 \u0641\u06ce\u0631\u0628\u0648\u0648\u0646\u06cc \u0632\u06cc\u0627\u062f\u062a\u0631 \u0628\u062e\u0648\u06ce\u0646\u0646<\/p>\n<h5>1- \u062e\u0627\u06b5\u06ce \u0633\u06d5\u0631\u06d5\u06a9\u06cc :<\/h5>\n<p>\u0644\u06d5\u0645 \u0641\u06ce\u0631\u06a9\u0627\u0631\u06cc\u06cc\u06d5 \u0645\u0646 \u0633\u0648\u0648\u062f\u0645 \u0628\u06cc\u0646\u06cc\u0648\u06d5 \u0644\u06d5 \u0646\u0627\u0648\u06cc \u0695\u0627\u0698\u06d5\u06cc\u00a0server1.example.com \u0628\u06d5\u0645\u00a0IP\u06cc\u06cc\u06d5\u00a0192.168.1.100. \u062f\u06d5\u062a\u0648\u0627\u0646\u06ce\u062a \u0626\u06d5\u0645 \u0646\u0627\u0648\u0627\u0646\u06d5 \u0628\u06c6 \u0626\u06ce\u0648\u06d5 \u062c\u06cc\u0627\u0648\u0627\u0632 \u0628\u06ce\u062a \u0648 \u0628\u06cc\u06af\u06c6\u0695\u0646 \u0628\u06d5 \u0633\u06d5\u0644\u06cc\u0642\u06d5\u0648 \u062d\u06d5\u0632\u06cc \u062e\u06c6\u062a\u0627\u0646. \u0645\u0646 \u06af\u06d5\u0631\u06d5\u06a9\u0645\u06d5 \u06a9\u06d5 \u067e\u0627\u06a9\u06d5\u062a\u06cc\u00a0EPEL \u0632\u06cc\u0627\u062f\u0628\u06a9\u06d5\u0645 \u0628\u06c6 \u062f\u0648\u0627\u06cc\u06cc\u0646 \u0648\u0634\u0627\u0646\u06cc\u00a0phpMyAdmin \u0644\u06d5\u0645 \u0648\u0627\u0646\u06d5 :<\/p>\n<pre>*rpm \u2013import \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY\r\nyum -y install epel-release<\/pre>\n<p>\u0647\u06d5\u0631\u0648\u0627 \u0628\u06c6 \u0626\u06d5\u0648\u06d5 \u06a9\u06d5 \u062f\u06d5\u0633\u062a\u06a9\u0627\u0631\u06cc \u0641\u0627\u06cc\u0644\u06d5\u06a9\u0627\u0646 \u0628\u06a9\u06d5\u0645 \u067e\u06ce\u0648\u06cc\u0633\u062a\u0645 \u0628\u06d5 \u0626\u06d5\u067e\u06ce\u06a9\u06cc \u062f\u06d5\u0633\u062a\u06a9\u0627\u0631\u06cc\u06a9\u06d5\u0631\u06cc \u062f\u06d5\u0642\u06d5 \u06a9\u06d5 \u0645\u0646 \u0644\u06ce\u0631\u06d5 \u0644\u06d5\u00a0nano \u0633\u0648\u0648\u062f \u062f\u06d5\u0628\u06cc\u0646\u0645\u060c\u0628\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062f\u0627\u06cc\u062f\u06d5\u0645\u06d5\u0632\u0631\u06ce\u0646\u0645:<\/p>\n<pre>yum -y install nano<\/pre>\n<h5>2- \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc\u00a0MySQL \/ MariaDB<\/h5>\n<p>MariaDB \u0634\u0627\u062e\u06d5\u06cc\u06ce\u06a9\u06d5 \u0644\u06d5 MySQL \u06a9\u06d5 \u06af\u06d5\u0634\u06d5\u06cc \u0633\u06d5\u0646\u062f\u0648\u0648\u06d5 \u0647\u06d5\u0631 \u0628\u06c6\u06cc\u06d5 \u0645\u0646 \u0644\u06ce\u0631\u06d5 \u0628\u06c6 \u067e\u0627\u0634\u06a9\u06d5\u0648\u062a\u06cc \u0632\u0627\u0646\u06cc\u0627\u0631\u06cc\u06d5\u06a9\u0627\u0646 \u0644\u06d5\u00a0MariaDB \u0633\u0648\u0648\u062f \u062f\u06d5\u06af\u0631\u0645:<\/p>\n<pre>yum -y install mariadb-server mariadb<\/pre>\n<p>\u0628\u06d5\u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u0627\u0646\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u0626\u06ce\u0645\u06d5 \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646 \u06a9\u06d5 \u0644\u06d5 \u06a9\u0627\u062a\u06cc \u062f\u06d5\u0633\u062a\u067e\u06ce\u06a9\u0631\u062f\u0646\u06cc \u0633\u06cc\u0633\u062a\u06d5\u0645\u00a0MySQL \u062f\u06d5\u0633\u062a\u0628\u06d5 \u0626\u06cc\u0634 \u0628\u06a9\u0627\u062a \u0648 \u0626\u0627\u0645\u0627\u062f\u06d5 \u0628\u06ce\u062a:<\/p>\n<pre>systemctl start mariadb.service\r\nsystemctl enable mariadb.service<\/pre>\n<p>\u0626\u06ce\u0633\u062a\u0627 \u062f\u06d5\u0628\u06ce\u062a \u0648\u0634\u06d5\u06cc \u0646\u0647\u06cc\u0646\u06cc \u0628\u06c6\u00a0MySQL \u0644\u06d5 \u0647\u06d5\u0698\u0645\u0627\u0631\u06d5\u06cc root \u0633\u0627\u0632\u0628\u06a9\u06d5\u06cc\u0646 :<\/p>\n<pre>mysql_secure_installation<\/pre>\n<pre>[root@server1 ~]# mysql_secure_installation\r\n\/usr\/bin\/mysql_secure_installation: line 379: find_mysql_client: command not found\r\n\r\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB\r\nSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!\r\n\r\nIn order to log into MariaDB to secure it, we'll need the current\r\npassword for the root user. If you've just installed MariaDB, and\r\nyou haven't set the root password yet, the password will be blank,\r\nso you should just press enter here.\r\n\r\nEnter current password for root (enter for none): &lt;--ENTER\r\nOK, successfully used password, moving on...\r\n\r\nSetting the root password ensures that nobody can log into the MariaDB\r\nroot user without the proper authorisation.\r\n\r\nSet root password? [Y\/n]\r\nNew password: &lt;--yourmariadbpassword\r\nRe-enter new password: &lt;--yourmariadbpassword\r\nPassword updated successfully!\r\nReloading privilege tables..\r\n... Success!\r\nBy default, a MariaDB installation has an anonymous user, allowing anyone\r\nto log into MariaDB without having to have a user account created for\r\nthem. This is intended only for testing, and to make the installation\r\ngo a bit smoother. You should remove them before moving into a\r\nproduction environment.\r\n\r\nRemove anonymous users? [Y\/n] &lt;--ENTER\r\n... Success!\r\n\r\nNormally, root should only be allowed to connect from 'localhost'. This\r\nensures that someone cannot guess at the root password from the network.\r\n\r\nDisallow root login remotely? [Y\/n] &lt;--ENTER\r\n... Success!\r\n\r\nBy default, MariaDB comes with a database named 'test' that anyone can\r\naccess. This is also intended only for testing, and should be removed\r\nbefore moving into a production environment.\r\n\r\nRemove test database and access to it? [Y\/n] &lt;--ENTER\r\n- Dropping test database...\r\n... Success!\r\n- Removing privileges on test database...\r\n... Success!\r\n\r\nReloading the privilege tables will ensure that all changes made so far\r\nwill take effect immediately.\r\n\r\nReload privilege tables now? [Y\/n] &lt;--ENTER\r\n... Success!\r\n\r\nCleaning up...\r\n\r\nAll done! If you've completed all of the above steps, your MariaDB\r\ninstallation should now be secure.\r\n\r\nThanks for using MariaDB!\r\n[root@server1 ~]#\r\n<\/pre>\n<h5>3- \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc Apache<\/h5>\n<p>:<br \/>\n\u0644\u06d5 \u06af\u0646\u0648\/\u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc CentOS 7 \u0695\u0627\u0698\u06d5\u06cc apache 2.4 \u0628\u0648\u0648\u0646\u06cc \u0647\u06d5\u06cc\u06d5 \u060c\u0628\u06d5\u06b5\u0627\u0645 \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646 \u0628\u06d5\u0645 \u0641\u06d5\u0631\u0627\u0646\u06d5 \u062f\u0627\u06cc\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646 :<\/p>\n<pre>yum -y install httpd<\/pre>\n<p>\u0647\u06d5\u06b5\u06af\u0631\u0633\u0627\u0646\u062f\u0646\u06cc Apache \u0644\u06d5 \u06a9\u0627\u062a\u06cc \u062f\u06d5\u0633\u062a\u067e\u06ce\u06a9\u06cc \u0633\u06cc\u0633\u062a\u06d5\u0645 \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646 \u0628\u06d5\u0645 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5 \u0628\u0627\u0646\u06af\u06cc \u0628\u06a9\u06d5\u06cc\u0646 :<\/p>\n<pre>systemctl start httpd.service\r\n\r\nsystemctl enable httpd.service<\/pre>\n<p>\u0628\u06c6 \u0626\u06d5\u0648\u06d5 \u06a9\u06d5 \u062f\u06d5\u0633\u062a\u067e\u06ce\u06af\u06d5\u06cc\u0634\u062a\u0646\u0645\u0627\u0646 \u0628\u06ce\u062a \u0644\u06d5 \u062f\u06d5\u0631\u06d5\u0648\u06d5\u06cc \u0695\u0627\u0698\u06d5 \u062f\u06d5\u0628\u06ce\u062a \u062f\u06d5\u0631\u06af\u0627 \u06cc\u0627\u0646 \u067e\u06c6\u0631\u062a\u06d5\u06a9\u0627\u0646\u06cc \u062f\u06cc\u0648\u0627\u0631\u06cc\u0626\u0627\u06af\u0631\u06cc\u0646\u06d5\u06a9\u06d5\u0645\u0627\u0646()\u0628\u06d5 (HTTP (80 \u0648\u06d5 (HTTPS (443 \u0631\u06ce\u06a9\u0628\u062e\u06d5\u06cc\u0646.\u06a9\u06d5 \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646 \u0628\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u0627\u0646\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u06a9\u0627\u0646\u0641\u06cc\u06af\u06cc \u0628\u06a9\u06d5\u06cc\u0646 :<\/p>\n<pre>firewall-cmd --permanent --zone=public --add-service=http\r\nfirewall-cmd --permanent --zone=public --add-service=https\r\nfirewall-cmd --reload\r\n<\/pre>\n<p>\u062f\u06d5\u062a\u0648\u0627\u0646\u0646 \u0628\u06d5 \u06a9\u0631\u062f\u0646\u06d5\u0648\u06d5\u06cc \u0648\u06ce\u0628\u06af\u06d5\u0631\u06d5\u06a9\u06d5\u062a\u0627\u0646 \u0648 \u0646\u0648\u0648\u0633\u06cc\u0646\u06cc \u0626\u06d5\u0645 IP \u0626\u0627\u062f\u0631\u06d5\u0633\u06d5 \u0648\u0627\u062a\u06d5 http:\/\/192.168.1.100 \u0695\u0627\u0698\u06d5\u06cc Apache \u0628\u0628\u06cc\u0646\u0646 :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-269\" src=\"http:\/\/kclik.ir\/wp-content\/uploads\/2019\/08\/centos-apache-default-page.png\" alt=\"\" width=\"550\" height=\"358\" srcset=\"https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/centos-apache-default-page.png 550w, https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/centos-apache-default-page-300x195.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<h5>4-\u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc PHP :<\/h5>\n<p>\u0644\u06d5 CentOS \u0648\u0634\u0627\u0646\u06cc \u06a9\u06c6\u0646\u06d5\u06cc PHP \u0628\u0648\u0648\u0646\u06cc \u0647\u06d5\u06cc\u06d5 \u0648\u0627\u062a\u06d5 (PHP 5.4)\u060c \u0628\u06d5\u06b5\u0627\u0645 \u0645\u0646 \u0644\u06ce\u0631\u06d5 \u0641\u06ce\u0631\u062a\u0627\u0646 \u062f\u06d5\u06a9\u06d5\u0645 \u06a9\u06d5 \u0648\u0634\u0627\u0646\u06cc \u0646\u0648\u06ce\u06cc PHP \u06a9\u06d5 \u0628\u0631\u06cc\u062a\u06cc\u06cc\u06d5 \u0644\u06d5 PHP 7.0 \u06cc\u0627 7.1 \u0644\u06d5 \u06a9\u0627\u0646\u06af\u0627\u06cc Remi \u062f\u0627\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646. \u0628\u06c6 \u0632\u06cc\u0627\u062f \u06a9\u0631\u062f\u0646\u06cc Remi \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646 \u0644\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u0633\u0648\u0648\u062f \u0628\u06af\u0631\u06cc\u0646 :<\/p>\n<blockquote><p>rpm -Uvh http:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<\/p><\/blockquote>\n<p>\u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc yum-utils \u0628\u06c6 \u067e\u06d5\u06cc\u06a9\u06d5\u0631\u0628\u06d5\u0633\u062a\u0646\u06cc yum-config-manager \u0628\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 :<\/p>\n<blockquote><p>yum -y install yum-utils<\/p><\/blockquote>\n<p>\u0633\u06d5\u0631\u06d5\u062a\u0627 yum \u0628\u06d5\u0631\u06c6\u0698 \u0628\u06a9\u06d5\u0646 :<\/p>\n<pre>yum update<\/pre>\n<p>\u0626\u06ce\u0633\u062a\u0627 \u0633\u06d5\u0631\u06d5\u062a\u0627 \u0648\u0634\u0627\u0646\u06cc \u06a9\u06c6\u0646\u06d5\u06cc\u00a0PHP \u062f\u0627\u062f\u06d5\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646 \u0648\u06d5 \u0644\u06d5 \u062f\u0648\u0648 \u0628\u06d5\u0634\u06cc \u062c\u06cc\u0627\u0648\u0627\u0632 \u0641\u06ce\u0631 \u062f\u06d5\u0628\u06cc\u0646 \u06a9\u06d5 \u0686\u06c6\u0646 \u0648\u0634\u0627\u0646\u06cc\u00a0 PHP 7.0 \u0648\u06d5\u00a0 PHP 7.1 \u062f\u0627\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646 :<\/p>\n<p>\u0633\u06d5\u0631\u06d5\u062a\u0627 \u0628\u06c6 \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc \u0648\u0634\u0627\u0646\u06cc \u06a9\u06c6\u0646\u06d5\u06cc\u00a0PHP 5.4 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062f\u06d5\u0646\u0648\u0648\u0633\u06cc\u0646 :<\/p>\n<pre>yum -y install php<\/pre>\n<h6>1-4- \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc \u0648\u0634\u0627\u0646\u06cc\u00a0 PHP 7.0 :<\/h6>\n<p>\u0628\u06c6 \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc \u0648\u0634\u0627\u0646\u06cc\u00a0PHP 7.0 \u0647\u06d5\u0631\u0648\u0627 \u00a0 Apache PHP 7.0 \u0628\u06d5\u0645 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5 \u06a9\u0631\u062f\u0627\u0631 \u062f\u06d5\u06a9\u06d5\u06cc\u0646 :<\/p>\n<pre>yum-config-manager \u2013enable remi-php70\r\n\r\nyum -y install php php-opcache<\/pre>\n<h6>2-4- \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc \u0648\u0634\u0627\u0646\u06cc\u00a0PHP 7.1 :<\/h6>\n<p>\u0628\u06c6 \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc \u0648\u0634\u0627\u0646\u06cc\u00a0PHP 7.1 \u0644\u06d5\u0645 \u062f\u0648\u0648 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5 \u0633\u0648\u0648\u062f \u062f\u06d5\u06af\u0631\u06cc\u0646 :<\/p>\n<pre>yum-config-manager \u2013enable remi-php71\r\n\r\nyum -y install php php-opcache<\/pre>\n<p>\u067e\u0627\u0634 \u06af\u06c6\u0695\u0627\u0646\u06a9\u0627\u0631\u06cc\u06d5\u06a9\u0627\u0646\u06cc \u0633\u06d5\u0631\u06d5\u0648\u06d5 \u0626\u06ce\u0645\u06d5 \u062f\u06d5\u0628\u06ce\u062a\u00a0Apache \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u0628\u06a9\u06d5\u06cc\u0646\u06d5\u0648\u06d5 . \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062f\u06d5\u0646\u0648\u0633\u06cc\u0646 :<\/p>\n<pre>systemctl restart httpd.service<\/pre>\n<h5>5- \u062a\u0627\u0642\u06cc\u06a9\u0631\u062f\u0646\u06ccPHP :<\/h5>\n<p>\u0644\u06d5 \u0645\u06d5\u0633\u06cc\u0631\u06cc var\/www\/html\/ \u0626\u06ce\u0645\u06d5 \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646\u00a0\u0641\u0627\u06cc\u0644\u06ce\u06a9\u06cc\u00a0PHP \u062f\u0631\u0648\u0648\u0633\u062a \u0628\u06a9\u06d5\u06cc\u0646 \u0628\u06d5 \u0646\u0627\u0648\u06ccinfo.php \u060c\u0626\u06d5\u0645 \u0641\u0627\u06cc\u0644\u06d5 \u0632\u0627\u0646\u06cc\u0627\u0631\u06cc\u06d5\u06a9\u0627\u0646\u0645\u0627\u0646 \u067e\u06ce \u067e\u06cc\u0634\u0627\u0646\u00a0\u062f\u06d5\u062f\u0627. \u0628\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062f\u06d5\u0686\u06cc\u0646\u06d5 \u0646\u0627\u0648 \u0626\u06d5\u0648 \u0641\u0627\u06cc\u0644\u06d5 :<\/p>\n<pre>nano \/var\/www\/html\/info.php<\/pre>\n<p>\u0626\u06ce\u0633\u062a\u0627 \u0644\u06d5 \u0646\u0627\u0648 \u0641\u0627\u06cc\u0644\u06d5\u06a9\u06d5 \u0648\u0627\u062a\u06d5\u00a0info.php \u0626\u06d5\u0645 \u0647\u06ce\u06b5\u06d5 \u062f\u06d5\u0646\u0648\u0648\u0633\u06cc\u0646 \u0648 \u067e\u0627\u0634\u06a9\u06d5\u0648\u062a\u06cc \u062f\u06d5\u06a9\u06cc\u0646 :<\/p>\n<pre><\/pre>\n<p>\u0626\u06cc\u0633\u062a\u0627 \u062f\u06d5\u0628\u06ce\u062a \u0644\u06d5 \u0634\u0631\u06cc\u062a\u06cc \u0646\u0627\u0648\u0646\u06cc\u0634\u0627\u0646\u06cc \u00a0\u0648\u06ce\u0628\u06af\u06d5\u0631\u06d5\u06a9\u06d5 \u0626\u06d5\u0645 \u0645\u06d5\u0633\u06cc\u0631\u06d5 \u0628\u0646\u0648\u0648\u0633\u06cc\u0646\u00a0http:\/\/192.168.1.100\/info.php<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-270\" src=\"http:\/\/kclik.ir\/wp-content\/uploads\/2019\/08\/php-7-on-centos1.png\" alt=\"\" width=\"550\" height=\"358\" srcset=\"https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/php-7-on-centos1.png 550w, https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/php-7-on-centos1-300x195.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>\u06ce\u0648\u06d5 \u062f\u06d5\u0628\u06cc\u0646\u0646 \u0632\u0627\u0646\u06cc\u0627\u0631\u06cc \u0695\u0627\u0698\u06d5 \u062f\u06d5\u0631\u062f\u06d5\u06a9\u06d5\u0648\u06ce\u062a \u0648 \u0648\u0634\u0627\u0646\u06cc\u00a0PHP 7.1 \u062e\u06d5\u0631\u06cc\u06a9\u06cc \u06a9\u0627\u0631\u06a9\u0631\u062f\u0646\u06d5 \u0648 \u0647\u06d5\u0631\u0648\u0627\u00a0Apache 2.0 .<\/p>\n<h5>6- \u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc MySQL \u0628\u06c6 \u067e\u0634\u062a\u06cc\u0648\u0627\u0646\u06ccPHP :<\/h5>\n<p>\u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc MySQL \u0648 \u067e\u0634\u062a\u06cc\u0648\u0627\u0646\u06cc \u0644\u06d5 PHP\u060c\u0626\u06ce\u0645\u06d5 \u0626\u06d5\u062a\u0648\u0627\u0646\u06cc\u0646 \u067e\u0627\u06a9\u06d5\u062a\u06cc php71w-mysql \u062f\u0627\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646.\u0633\u06d5\u0631\u06d5\u062a\u0627 \u0628\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062f\u06d5\u06af\u06d5\u0631\u06ce\u06cc\u0646 \u0628\u06c6 \u0645\u0627\u0698\u06c6\u06b5\u06ce php\u0640\u06d5\u06a9\u06d5\u0645\u0627\u0646<\/p>\n<pre>yum search php<\/pre>\n<p>\u0628\u06d5\u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062f\u0627\u06cc\u062f\u06d5\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646 :<\/p>\n<pre>yum -y install php-mysql<\/pre>\n<p>\u0644\u06d5 \u0647\u06d5\u0646\u06af\u0627\u0648\u06d5\u06a9\u06d5\u06cc \u062f\u06cc\u06a9\u06d5 \u0626\u06ce\u0645\u06d5 \u0686\u06d5\u0646\u062f\u06cc\u0646 \u0645\u0627\u0698\u06c6\u06b5\u06cc PHP \u062f\u0627\u062f\u06d5\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646 \u0628\u06c6 \u0626\u06d5\u0648\u06d5 \u06a9\u06d5 \u0628\u062a\u0648\u0627\u0646\u06cc\u0646 \u0633\u06cc\u0633\u062a\u06d5\u0645\u06d5\u06a9\u0627\u0646\u06cc \u0628\u06d5\u0631\u06ce\u0648\u06d5\u0628\u0631\u062f\u0646\u06cc \u0646\u0627\u0648\u06d5\u0631\u06c6\u06a9 \u0648\u06d5\u06a9 \u0648\u06c6\u0631\u062f\u067e\u0631\u06ce\u0633\u060c\u062f\u0631\u06c6\u067e\u0627\u06b5 \u0648 \u0698\u06c6\u0645\u06b5\u0627\u06cc\u0644\u06d5 \u0633\u06d5\u0631 \u062f\u0627\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646\u2026<\/p>\n<blockquote><p>yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel<\/p><\/blockquote>\n<p>\u0626\u06ce\u0633\u062a\u0627 \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u062f\u06d5\u06a9\u06d5\u06cc\u0646\u06d5\u0648\u06d5 :<\/p>\n<pre>systemctl restart httpd.service<\/pre>\n<p>\u0626\u06ce\u0633\u062a\u0627 \u0646\u0627\u0648\u0646\u06cc\u0634\u0627\u0646\u06cc\u00a0http:\/\/192.168.1.100\/info.php \u0644\u06d5 \u0648\u06ce\u0628\u06af\u06d5\u0631\u06d5\u06a9\u06d5\u0645\u0627\u0646 \u062f\u06d5\u0646\u0648\u0648\u0633\u06cc\u0646 \u0648 \u0633\u06a9\u0631\u06c6\u06b5 \u062f\u06cc\u0646\u06cc\u0646\u06d5 \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u062a\u0627 \u0686\u0627\u0648\u0645\u0627\u0646 \u0628\u06d5 \u0646\u0648\u06ce\u06a9\u0627\u0631\u06cc\u06d5\u06a9\u0627\u0646 \u0628\u06a9\u06d5\u0648\u06ce\u062a \u0648\u06d5\u06a9\u00a0curl \u0648 \u2026\u0647\u062a\u062f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-272\" src=\"http:\/\/kclik.ir\/wp-content\/uploads\/2019\/08\/php-7-on-centos1-1.png\" alt=\"\" width=\"550\" height=\"358\" srcset=\"https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/php-7-on-centos1-1.png 550w, https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/php-7-on-centos1-1-300x195.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>\u0626\u06cc\u062a\u0631 \u067e\u06ce\u0648\u06cc\u0633\u062a\u0627\u0646 \u0628\u06d5 \u0641\u0627\u06cc\u0644\u06cc\u00a0php info \u0646\u06cc\u06cc\u06d5\u0648 \u062f\u06d5\u062a\u0648\u0627\u0646\u0646 \u0628\u06d5 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5\u06a9\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 \u0644\u06d5 \u062a\u0631\u0645\u06cc\u0646\u0627\u06b5 \u0628\u06cc\u0633\u0695\u0646\u06d5\u0648\u06d5 :<\/p>\n<pre>rm \/var\/www\/html\/info.php<\/pre>\n<h5>7-\u062f\u0627\u0645\u06d5\u0632\u0631\u0627\u0646\u062f\u0646\u06cc\u00a0phpMyAdmin :<\/h5>\n<p>phpMyAdmin \u0695\u0648\u0648\u062e\u0633\u0627\u0631\u06ce\u06a9\u06d5 \u0628\u06c6 \u0628\u06d5\u0631\u06ce\u0648\u06d5\u0628\u0631\u062f\u0646\u06cc \u0628\u0646\u06a9\u06d5\u062f\u0631\u0627\u0648\u06d5\u06cc\u00a0MySQL \u0648\u0627\u062a\u06d5 \u0634\u06ce\u0648\u0627\u0632\u06ce\u06a9\u06cc \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc \u06a9\u0627\u0631\u06a9\u0631\u062f\u0646 \u0644\u06d5 \u0633\u06d5\u0631 \u0626\u06d5\u0645 \u062f\u0627\u062a\u0627 \u0628\u06d5\u06cc\u0633\u06d5\u06cc\u06d5.<\/p>\n<pre>\r\n<p class=\"command\">yum -y install phpMyAdmin<\/p>\r\n<\/pre>\n<p class=\"command\">\u0626\u06ce\u0633\u062a\u0627 \u062f\u06d5\u0628\u06ce\u062aphpMyAdmin \u06a9\u0627\u0646\u0641\u06cc\u06af \u0628\u06a9\u06d5\u06cc\u0646 \u06a9\u06d5 \u067e\u06ce\u0648\u06cc\u0633\u062a\u06cc \u0628\u06d5\u00a0 \u2018Require all granted\u2019 \u0647\u06ce\u06b5\u06d5\u06cc\u06d5 .\u0633\u06d5\u0631\u06d5\u062a\u0627 \u062f\u06d5\u0686\u06cc\u0646\u06d5 \u0646\u0627\u0648 \u0641\u0627\u06cc\u0644\u06cc \u06a9\u0627\u0646\u0641\u06cc\u06af\u06d5\u06a9\u06d5\u06cc :<\/p>\n<pre>\r\n<p class=\"command\">nano \/etc\/httpd\/conf.d\/phpMyAdmin.conf<\/p>\r\n<\/pre>\n<p class=\"command\">\u062f\u06d5\u0633\u062a\u06a9\u0627\u0631\u06cc \u062f\u06d5\u06a9\u06d5\u06cc\u0646 \u0648\u06d5\u06a9 \u0646\u0645\u0648\u0648\u0646\u06d5\u06cc \u062e\u0648\u0627\u0631\u06d5\u0648\u06d5 :<\/p>\n<pre>[...]\r\nAlias \/phpMyAdmin \/usr\/share\/phpMyAdmin\r\nAlias \/phpmyadmin \/usr\/share\/phpMyAdmin\r\n\r\n\r\n AddDefaultCharset UTF-8\r\n\r\n \r\n # Apache 2.4\r\n# \r\n# Require ip 127.0.0.1\r\n# Require ip ::1\r\n# \r\n Require all granted\r\n \r\n \r\n # Apache 2.2\r\n Order Deny,Allow\r\n Deny from All\r\n Allow from 127.0.0.1\r\n Allow from ::1\r\n \r\n\r\n\r\n\r\n\r\n\r\n        Options none\r\n        AllowOverride Limit\r\n        Require all granted\r\n\r\n\r\n[...] \r\n<\/pre>\n<p>\u0626\u06ce\u0633\u062a\u0627 \u062f\u06d5\u0628\u06ce\u062a \u0628\u0648\u0648\u0646\u06cc phpMyAdmin \u0644\u06d5 cookie to http \u0628\u06af\u06c6\u0695\u06cc\u0646 :<\/p>\n<blockquote><p>nano \/etc\/phpMyAdmin\/config.inc.php<\/p><\/blockquote>\n<pre>[...]\r\n$cfg['Servers'][$i]['auth_type']     = 'http';    \/\/ Authentication method (config, http or cookie based)?\r\n[...]\r\n<\/pre>\n<p>Apache \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u062f\u06d5\u06a9\u06d5\u06cc\u0646\u06d5\u0648\u06d5 \u0628\u06d5\u0645 \u0641\u06d5\u0631\u0645\u0627\u0646\u06d5 :<\/p>\n<blockquote><p>systemctl restart httpd.service<\/p><\/blockquote>\n<p>\u0628\u06c6 \u062f\u06d5\u0633\u062a\u067e\u06ce\u06af\u06d5\u06cc\u0634\u062a\u0646 \u0628\u06d5 \u0631\u0648\u0648\u062e\u0633\u0627\u0631\u06cc \u0628\u0646\u06a9\u06d5\u06cc \u062f\u0631\u0627\u0648\u06d5 \u0648\u0627\u062a\u06d5 \u062f\u06d5\u062a\u0648\u0627\u0646\u06cc \u0626\u0627\u062f\u0631\u06d5\u0633\u06cc http:\/\/192.168.1.100\/phpmyadmin \u0644\u06d5 \u0648\u06ce\u0628\u06af\u06d5\u0695\u06d5\u06a9\u06d5\u062a \u0628\u0646\u0648\u0648\u0633\u06cc\u062a .<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-273\" src=\"http:\/\/kclik.ir\/wp-content\/uploads\/2019\/08\/phpmyadmin-on-centos-7.png\" alt=\"\" width=\"550\" height=\"358\" srcset=\"https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/phpmyadmin-on-centos-7.png 550w, https:\/\/linux.krd\/wp-content\/uploads\/2019\/08\/phpmyadmin-on-centos-7-300x195.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<h5>\u0628\u06d5\u0633\u062a\u06d5\u0631\u06d5\u06a9\u0627\u0646 :<\/h5>\n<p style=\"text-align: left;\">Apache: http:\/\/httpd.apache.org<br \/>\nPHP: http:\/\/www.php.net<br \/>\nMySQL: http:\/\/www.mysql.com<br \/>\nCentOS: http:\/\/www.centos.org<br \/>\nphpMyAdmin: http:\/\/www.phpmyadmin.net<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u067e\u06ce\u0634\u06d5\u06a9\u06cc \u0644\u06d5\u0645 \u0648\u0627\u0646\u06d5 \u0641\u06ce\u0631 \u062f\u06d5\u0628\u06cc\u0646 \u06a9\u06d5 \u0686\u06c6\u0646 \u0695\u0627\u0698\u06d5\u06cc\u06ce\u06a9\u06cc Apache \u0644\u06d5 \u0633\u06d5\u0631 \u06af\u0646\u0648\/\u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc CentOS 7 (\u0631\u0627\u0698\u06d5) \u0628\u06d5 \u067e\u0627\u06b5\u067e\u0634\u062a\u06cc\u06a9\u0631\u062f\u0646\u06cc PHP \u0648 MySQL \u062f\u0627\u0645\u06d5\u0632\u0631\u06ce\u0646\u06cc\u0646.LAMP \u06a9\u0648\u0631\u062a\u06a9\u0631\u0627\u0648\u06d5\u06cc Linux, Apache, MySQL, PHP\u0640\u06d5. \u0626\u06d5\u0645 \u0648\u0627\u0646\u06d5 \u0628\u06d5\u0695\u06c6\u0698\u0628\u0648\u0648\u06d5 \u0644\u06d5 \u0633\u06d5\u0631 PHP \u0648\u0634\u0627\u0646\u06cc\u00a0 (7.0 \u0648\u06d5 7.1) \u0644\u06d5 \u06af\u0646\u0648\/\u0644\u06cc\u0646\u0648\u06a9\u0633\u06cc CentOS 7.3\u0633\u06ce\u0631\u06a4\u06ce\u0631.\u062f\u06d5\u062a\u0648\u0627\u0646\u0646\u00a0\u0626\u06d5\u0645 \u0628\u0627\u0628\u06d5\u062a\u06d5\u0634\u00a0\u0628\u06c6 \u0641\u06ce\u0631\u0628\u0648\u0648\u0646\u06cc \u0632\u06cc\u0627\u062f\u062a\u0631 \u0628\u062e\u0648\u06ce\u0646\u0646 1- \u062e\u0627\u06b5\u06ce \u0633\u06d5\u0631\u06d5\u06a9\u06cc : \u0644\u06d5\u0645 \u0641\u06ce\u0631\u06a9\u0627\u0631\u06cc\u06cc\u06d5 \u0645\u0646 \u0633\u0648\u0648\u062f\u0645 \u0628\u06cc\u0646\u06cc\u0648\u06d5 \u0644\u06d5 \u0646\u0627\u0648\u06cc<\/p>\n","protected":false},"author":1,"featured_media":268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[112,116,113,114,71],"class_list":["post-267","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-serverlinux","tag-apache","tag-centos","tag-mysql","tag-php","tag-71"],"_links":{"self":[{"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux.krd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267"}],"version-history":[{"count":3,"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions\/276"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux.krd\/index.php?rest_route=\/wp\/v2\/media\/268"}],"wp:attachment":[{"href":"https:\/\/linux.krd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.krd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.krd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}