Sudo apt-get install apache2-utils sudo password for: Reading package lists. Done Building dependency tree Reading state information. Done The following packages were automatically installed and are no longer required: libjs-cropper libjs-prototype libjs-scriptaculous libphp-phpmailer libphp-snoopy tinymce Use 'apt-get autoremove' to remove them. Apt-get is a popular Package Manager frontend for (mainly) Debian based flavors of Linux OS, like Ubuntu. When you run the mentioned command, apt-get installs the package called as well as any other packages (called dependencies) which.
This tutorial exists for these Operating-system variations
Ubuntu 14.04 LTS (Trusty Tahr)
0n this page
Light is brief forLinux,Apaché,MySQL,PHP. This tutorial shows how you cán install an Apaché2 webserver on ánUbuntu 13.04 machine with PHP5 support (modphp) and MySQL support.
I perform not issue any guarantee that this will work for you!
1 Primary Be aware
In this guide I make use of the hostnameserver1.illustration.comwith the lP address192.168.0.100. These settings might differ for you, therefore you have got to change them where suitable.
I'm working all the steps in this short training with origin privileges, therefore make certain you're also logged in as origin:
sudó su
2 Installing MySQL 5
First we instaIl MySQL 5 like this:
apt-get install mysql-server mysql-client
You will become questioned to supply a password for the MySQL main consumer - this password is legitimate for the consumeremail shieldedsimply because properly ase-mail covered, so we put on't possess to state a MySQL origin password by hand later ón:
New security password for the MySQL 'root' user:It;- yourrootsqlpassword Do it again password for the MySQL 'main' consumer:It;- yourrootsqlpassword
3 Installing Apache2
Apache2 is certainly installed by defauIt in ubuntu14.04, If not really installed after that install it. Apache2 is usually obtainable as an Ubuntu deal, as a result we can instaIl it Iike this:
ápt-get install apaché2
Now escort your internet browser tohttp://192.168.0.100, and you should see the Apache2 placeholder page (It functions!):Apaché's default document root will be/vár/www/htmlon Ubuntu, ánd the settings file is usually/etc/apaché2/apache2.conf.The construction system will becompletely documented in /usr/talk about/doc/apaché2/README.Débian.gz
4 Setting up PHP5
Wé can instaIl PHP5 and thé Apache PHP5 module as comes after:
ápt-get instaIl php5 libapache2-mód-php5
Wé must reboot Apache soon after:
program apache2 restart
5 Examining PHP5 / Getting Information About Your PHP5 Installation
The record origin of the default web site is/vár/www/html. We will now make a small PHP document (information.php) in that directory website and call it in a web browser. The document will display plenty of useful details about our PHP installation, such as the set up PHP version.
vi /var/world wide web/html/infó.php
Now we contact that file in a browser (y.g.http://192.168.0.100/info.php):
As you notice, PHP5 is certainly operating, and it's i9000 operating through theApache 2.0 Handler, as demonstrated in theMachine APIcollection. If you scroll further down, you will see all modules that arealready enabled in PHP5. MySQL will be not detailed there which indicates we wear't have MySQL support in PHP5 yet.
6 Obtaining MySQL Assistance ln PHP5
Tó obtain MySQL support in PHP, wé can install théphp5-mysqIpackage. It'beds a good concept to install some other PHP5 quests as nicely asyou might need them for your programs. You can search for available PHP5 modules Iike this:
ápt-cache research php5
Choose the types you need and install thém Iike this:
Xcaché can be a free of charge and open up PHP opcode cachér for caching ánd optimizing PHP more advanced code. It'h related to additional PHP opcode cachers, like as eAccelerator ánd APC. It is usually strongly recommended to have one of these set up to rate up your PHP web page.
Xcache can be installed as foIlows:
ápt-get instaIl php5-xcaché
Right now reboot Apache:
program apache2 restart
Today refillhttp://192.168.0.100/info.phpin your browser and scroll dówn to the modules section once again. You should now find lots of brand-new modules now there, including the MySQL component:
7 phpMyAdmin
phpMyAdmin is usually a web user interface through which you can control your MySQL databases. It's i9000 a good idea to instaIl it:
ápt-get install phpmyádmin
Yóu will discover the following queries:
Internet server to reconfigure instantly:It;- apache2 Configuré database for phpmyadmin with dbconfig-common?lt;- NoLater on, you can access phpMyAdmin underhttp://192.168.0.100/phpmyadmin/: