pages tagged apache http://meng6net.localhost/tag/apache/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 Installing and configuring Apache2 http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_Apache2/ http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_Apache2/ apache apache2 computing configuration documentation installation note software Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <h3>Uninstalling Apache server</h3> <p>If Apache server has been installed, you may want to remove it and re-install it.</p> <p>Update packages:</p> <pre><code>sudo apt-get update sudo apt-get autoremove </code></pre> <p>Uninstall Apache2 and its configuration files:</p> <pre><code>sudo apt-get purge apache2 sudo apt-get autoremove </code></pre> <h3>Installing</h3> <p>Reinstall Apache2 and PHP5 packages:</p> <pre><code>sudo apt-get install apache2 php5 </code></pre> <h3>Setting up <code>~/public_html/</code></h3> <p>Create <code>public_html</code> directory for storing Web site files:</p> <pre><code>mkdir $HOME/public_html </code></pre> <p>Configure Apache2 server to use <code>$HOME/public_html</code> as the Web site root path:</p> <pre><code>cd /etc/apache2/mods-enabled sudo ln -s ../mods-available/userdir.conf userdir.conf sudo ln -s ../mods-available/userdir.load userdir.load </code></pre> <h3>Restarting Apache2 server</h3> <pre><code>sudo /etc/init.d/apache2 restart </code></pre> <p>Or</p> <pre><code>sudo service apache2 restart </code></pre> <h3>Installing PHP</h3> <pre> <code>sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt </code></pre> <h3>Installing MySQL</h3> <p>See "<a href="http://meng6net.localhost/tag/apache/installing_and_configuring_mysql.html">Installing and configuring MySQL</a>."</p> <h2>References</h2> <ul> <li><a href= "https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04"> How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04</a></li> </ul>