<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>install php &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/install-php/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Fri, 26 Aug 2011 05:36:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>How To Setup A LAMP Server On Centos 6.0</title>
		<link>https://lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/</link>
					<comments>https://lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 26 Aug 2011 00:50:25 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[Apache Hardening]]></category>
		<category><![CDATA[enterprise linux]]></category>
		<category><![CDATA[install httpd]]></category>
		<category><![CDATA[install LAMP]]></category>
		<category><![CDATA[install php]]></category>
		<category><![CDATA[install php 5]]></category>
		<category><![CDATA[install php5]]></category>
		<category><![CDATA[LAMP Hardening]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux security]]></category>
		<category><![CDATA[linux security modules]]></category>
		<category><![CDATA[optimize apache]]></category>
		<category><![CDATA[optmizing apache]]></category>
		<category><![CDATA[php 5]]></category>
		<category><![CDATA[php version]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[red hat enterprise]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhel 5]]></category>
		<category><![CDATA[rpm command]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[setup LAMP]]></category>
		<category><![CDATA[yum command]]></category>
		<category><![CDATA[yum install httpd]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1081</guid>

					<description><![CDATA[<p>LAMP is essentially a server that runs Linux, Apache, MySQL and Php/Perl and is more commonly known as a LAMP server. This guide provides step-by-step instructions for installing a full-featured LAMP server on a CentOS 6 .0 1. Update system Before proceeding to install, update the system with the following command # yum update 2. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/">How To Setup A LAMP Server On Centos 6.0</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><strong>LAMP</strong> is essentially a server that runs <strong>L</strong>inux, <strong>A</strong>pache, <strong>My</strong>SQL and <strong>P</strong>hp/<strong>P</strong>erl and is more commonly known as a LAMP server. This guide provides step-by-step instructions for installing a full-featured LAMP server on a CentOS 6 .0<br />
<span id="more-1081"></span></p>
<h2>1. Update system</h2>
<p>Before proceeding to install, update the system with the following command</p>
<pre># yum update</pre>
<h2>2. Install and Configure the Apache Web Server</h2>
<p>The Apache web server is the most popular server online, used on more than 70% of all servers connected to the World Wide Web. And there are good reasons for it: it’s free, it’s very stable, it delivers a great performance, it’s very customizable. To install the current version of the Apache web server use the following command</p>
<pre># yum install httpd</pre>
<p>If you want to run Apache by default when the system boots, type the following command</p>
<pre># chkconfig httpd --level 2345 on</pre>
<p>To start Apache for the first time, type the following command</p>
<pre># /etc/init.d/httpd start</pre>
<h3>3. Apache Web Server Security and Optimization</h3>
<p><strong>1. Disable any unnecessary apache modules, type the following command</strong></p>
<pre># vi /etc/httpd/conf/httpd.conf</pre>
<p>My example configuration is here</p>
<pre>LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so</pre>
<p><strong>2. Optimize Timeout &amp; KeepAlive</strong><br />
You need to control Timeouts &amp; KeepAlive to improve server performance. Type the following command</p>
<pre># vi /etc/httpd/conf/httpd.conf</pre>
<p>Find &amp; Edit it as follows</p>
<pre>Timeout 10
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 5</pre>
<p><strong>3. Optimize MPM (Multi-Processing Module)</strong><br />
Apache&#8217;s default installation of MPM Prefork. To optimize MPM Prefork, type the following command</p>
<pre># vi /etc/httpd/conf/httpd.conf</pre>
<p>Find</p>
<pre>&lt;IfModule prefork.c&gt;</pre>
<p>Edit it as follows</p>
<pre>&lt;IfModule prefork.c&gt;
    StartServers          5
    MinSpareServers      10
    MaxSpareServers      15
    ServerLimit         450
    MaxClients          450
    MaxRequestsPerChild   0
&lt;/IfModule&gt;</pre>
<p>Which,</p>
<p># StartServers: number of server processes to start<br />
# MinSpareServers: minimum number of server processes which are kept spare<br />
# MaxSpareServers: maximum number of server processes which are kept spare<br />
# ServerLimit: maximum value for MaxClients for the lifetime of the server<br />
# MaxClients: maximum number of server processes allowed to start<br />
# MaxRequestsPerChild: maximum number of requests a server process serves</p>
<p><strong>4. Enable Mod_rewite</strong><br />
To enable mod_rewirte, type the following command</p>
<pre># vi /etc/httpd/conf/httpd.conf</pre>
<p>Find</p>
<pre>&lt;Directory "/var/www/html"&gt;</pre>
<p>Edit it as follows</p>
<pre>&lt;Directory "/var/www/html"&gt;
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
&lt;Limit GET POST OPTIONS PROPFIND&gt;
    Order allow,deny
    Allow from all
&lt;/Limit&gt;
&lt;LimitExcept GET POST OPTIONS PROPFIND&gt;
    Order deny,allow
    Deny from all
&lt;/LimitExcept&gt;
&lt;/Directory&gt;</pre>
<p><strong>5. Enable File Caching</strong><br />
Enabling file caching can greatly improve your site’s performance and speed. If you want to enable file caching, type the following command</p>
<pre># vi /etc/httpd/conf/httpd.conf</pre>
<p>Find</p>
<pre>&lt;Directory "/var/www/html"&gt;</pre>
<p>Edit it as follows</p>
<pre>&lt;Directory "/var/www/html"&gt;
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
&lt;Limit GET POST OPTIONS PROPFIND&gt;
    Order allow,deny
    Allow from all
&lt;/Limit&gt;
&lt;LimitExcept GET POST OPTIONS PROPFIND&gt;
    Order deny,allow
    Deny from all
&lt;/LimitExcept&gt;
&lt;FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|html|css)$"&gt;  
	Header set Cache-Control "max-age=604800, public"  
&lt;/FilesMatch&gt;
&lt;/Directory&gt;</pre>
<h2>4. Install and Configure MySQL Database Server</h2>
<p>MySQL Server is one of the most popular database servers in the world, especially for use with dynamic, content rich websites. To install MySQL database server use the following command</p>
<pre># yum install mysql mysql-server</pre>
<p>After installing MySQL, I highly recommend to run mysql_secure_installation, a program that helps secure MySQL. Important points to note are:<br />
1. Be sure that the root account has a secure password set.<br />
2. Do not create an anonymous account, and if it exists, say &#8220;yes&#8221; to remove it.<br />
3. If your web server and MySQL server are on the same machine, you should disable the network access.</p>
<p>If you want to run MySQL by default when the system boots, type the following command</p>
<pre># chkconfig mysqld--level 2345 on</pre>
<p>To start MySQL for the first time, type the following command</p>
<pre># /etc/init.d/mysqld start</pre>
<h2>5. Installing and Configuring PHP</h2>
<p>PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages. Many popular web applications like WordPress, Joomla, Drupal, OScommerce, Magento are written in PHP. To install PHP on CentOS use the following command</p>
<pre># yum install php53 php53-mysql</pre>
<p>To create secure PHP configuration settings, type the following command</p>
<pre>
# vi /etc/php.ini
</pre>
<p>Find &#038; Edit it as follows</p>
<pre>
allow_url_fopen = Off 
display_errors = Off 
display_startup_errors = Off 
log_errors = On 
error_reporting = E_ALL 
expose_php = Off 
magic_quotes_gpc = On 
magic_quotes_sybase = Off 
register_globals = Off
max_execution_time = 60
memory_limit = 64M
</pre>
<p>To prevent run PHP scripts with a different file extension, type the following command</p>
<pre># vi /etc/httpd/conf.d/php.conf</pre>
<p>Find</p>
<pre>
AddHandler php5-script .php
AddType text/html .php
</pre>
<p>Replace it as follows</p>
<pre>&lt;FilesMatch \.php$&gt;
	AddHandler php5-script .php
	AddType text/html .php
&lt;/FilesMatch&gt;</pre>
<p>Restart Apache to reload new configurations. Type the following command</p>
<pre># /etc/init.d/httpd restart</pre>
<g:plusone href="https://lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/">How To Setup A LAMP Server On Centos 6.0</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-setup-a-lamp-server-on-centos-6-0/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install PHP on Centos</title>
		<link>https://lifelinux.com/how-to-install-php-on-centos/</link>
					<comments>https://lifelinux.com/how-to-install-php-on-centos/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Thu, 25 Nov 2010 16:59:19 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[install php]]></category>
		<category><![CDATA[install php latest version]]></category>
		<category><![CDATA[install php on centos]]></category>
		<category><![CDATA[install php on linux]]></category>
		<category><![CDATA[install php with yum]]></category>
		<category><![CDATA[setup php on linux]]></category>
		<category><![CDATA[yum command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=207</guid>

					<description><![CDATA[<p>PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-php-on-centos/">How To Install PHP on Centos</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><blockquote><p><strong>PHP:</strong> Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as a standalone interpreter on most operating systems and computing platforms. (<a href="http://en.wikipedia.org/wiki/PHP">wikipedia.org</a>)</p></blockquote>
<p><span id="more-207"></span><br />
<strong>PHP</strong> works with apache, lighttpd, nignx and other webservers and PHP is very easy to install.</p>
<h2>Installing PHP on CentOS</h2>
<p>if you would like to install PHP on CentOS use yum command</p>
<pre>yum install php
</pre>
<h2>Updating PHP on CentOS</h2>
<p>if you would like to update PHP on CentOS use yum command</p>
<pre>yum update php
</pre>
<h2>Install &amp; Update PHP latest version</h2>
<p>Default the system will be installed php with stable version, but if you wanted to install or update PHP with latest version then you need to create <strong>/etc/yum.repos.d/centos-test.repo</strong> and enter following lines in it:</p>
<pre>[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/5/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
</pre>
<g:plusone href="https://lifelinux.com/how-to-install-php-on-centos/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-php-on-centos/">How To Install PHP on Centos</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-install-php-on-centos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
