This tutorial exists for these OS versions. Debian 7 (Wheezy).
On this page. LAMP is short for Linux, Apache, MySQL, PHP.
This tutorial shows how you can install an Apache2 webserver on a Debian Wheezy server with PHP5 support (modphp) and MySQL support. I do not issue any guarantee that this will work for you! 1 Preliminary Note In this tutorial, I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. 2 Installing MySQL 5 First we install MySQL 5 like this: apt-get install mysql-server mysql-client You will be asked to provide a password for the MySQL root user - this password is valid for the user as well as, so we don't have to specify a MySQL root password manually later on: New password for the MySQL 'root' user: Now we call that file in a browser (e.g. As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5.
MySQL is not listed there which means we don't have MySQL support in PHP5 yet. 6 Getting MySQL Support In PHP5 To get MySQL support in PHP, we can install the php5-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this: apt-cache search php5 Pick the ones you need and install them like this: apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl Now restart Apache2: /etc/init.d/apache2 restart APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code.
It's similar to other PHP opcode cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these installed to speed up your PHP page. APC can be installed as follows: apt-get install php-apc Now restart Apache: /etc/init.d/apache2 restart Now reload in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module: 7 phpMyAdmin is a web interface through which you can manage your MySQL databases. It's a good idea to install it: apt-get install phpmyadmin You will see the following questions: Web server to reconfigure automatically.
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our guide.
Before You Begin. Make sure you’ve followed the guide. As part of the Getting Started guide, make sure you for your server. Issue the following commands to make sure your hostname is set properly: hostname hostname -f The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN). Update your system: sudo apt-get update && apt-get upgrade Install Apache.
Ubuntu Wheezy
Install the Apache 2 web server, its documentation, and a collection of utilities: sudo apt-get install apache2 apache2-doc apache2-utils. Edit the main Apache configuration file to adjust the resource use settings. The settings shown below are a good starting point for a Linode 2GB: /etc/apache2/apache2.conf. 1 2 3 4 5 6 7 8 9 10 11 KeepAlive Off.
StartServers 4 MinSpareServers 20 MaxSpareServers 40 MaxClients 200 MaxRequestsPerChild 4500 Configure Apache for Virtual Hosting Apache supports name-based virtual hosting, which allows you to host multiple domains on a single server with a single IP. Disable the default virtual host: sudo a2dissite default. Each virtual host needs its own configuration file in the /etc/apache2/sites-available/ directory.
Create the file for example.com, called /etc/apache2/sites-available/example.com.conf, with the following content. Be sure to replace example.com with your own domain name. 1 2 Options ExecCGI AddHandler cgi-script.pl.
Create the directories for example.com’s website files and logs: sudo mkdir -p /var/www/example.net/publichtml sudo mkdir /var/www/example.net/logs. Enable the sites by issuing these commands: sudo a2ensite example.com.conf. Restart the Apache server to initialize all the changes: sudo service apache2 restart Congratulations!
Install Mplayer On Linux
You have now installed Apache on your Debian Linode and configured it for virtual hosting. Apache Modules and Scripting Install Apache Modules One of Apache’s strengths is its ability to be customized with modules. The default installation directory for Apache modules is the /etc/apache2/mods-available/ directory.
List the available modules: sudo apt-cache search libapache2. Install a module: sudo apt-get install module-name Modules, after being installed, should be enabled and ready to use, although you may need to apply additional configuration options depending on the module. Consult the for more information regarding the configuration of specific modules. Install Support for Scripting The following commands install Apache support for server-side scripting in PHP, Ruby, Python, and Perl. Support for these languages is optional based on your server environment.
To install:. Ruby support: sudo apt-get install libapache2-mod-ruby. Perl support: sudo apt-get install libapache2-mod-perl2. Python support: sudo apt-get install libapache2-mod-python. MySQL in Python support: sudo apt-get install python-mysqldb More Information You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials. See Also.
Debian “wheezy” Release Information Debian 7.11 was released June 4th, 2016. Debian 7.0 was initially released on May 4th, 2013. The release included many major changes, described in our and the.
Debian Wheezy Download
Debian 7 has been superseded. Wheezy also benefits from Long Term Support (LTS) until the end of May 2018. The LTS is limited to i386, amd64, armel and armhf. For more information, please refer to the.
To obtain and install Debian, see the page and the. To upgrade from an older Debian release, see the instructions in the. The following computer architectures are supported in this release:. Contrary to our wishes, there may be some problems that exist in the release, even though it is declared stable. We've made, and you can always to us. Last but not least, we have a list of for making this release happen.
LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a Debian Wheezy server with PHP5 support (modphp) and MySQL support.
I do not issue any guarantee that this will work for you! 1 Preliminary Note In this tutorial, I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. 2 Installing MySQL 5 First we install MySQL 5 like this: apt-get install mysql-server mysql-client You will be asked to provide a password for the MySQL root user – this password is valid for the user root@localhost as well as [email protected], so we don’t have to specify a MySQL root password manually later on: New password for the MySQL “root” user: Now we call that file in a browser (e.g.
As you see, PHP5 is working, and it’s working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5.
MySQL is not listed there which means we don’t have MySQL support in PHP5 yet. 6 Getting MySQL Support In PHP5 To get MySQL support in PHP, we can install the php5-mysql package. It’s a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this: apt-cache search php5 Pick the ones you need and install them like this: apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl Now restart Apache2: /etc/init.d/apache2 restart APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code.
It’s similar to other PHP opcode cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these installed to speed up your PHP page.
APC can be installed as follows: apt-get install php-apc Now restart Apache: /etc/init.d/apache2 restart Now reload in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module: 7 phpMyAdmin phpMyAdmin is a web interface through which you can manage your MySQL databases. It’s a good idea to install it: apt-get install phpmyadmin You will see the following questions: Web server to reconfigure automatically.
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our guide. Before You Begin. Ensure that you have followed the and guides, and the Linode’s. Via della grammatica pdf.
To check your hostname run: hostname hostname -f The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN). Update your system: sudo apt-get update && sudo apt-get upgrade Apache Install and Configure. Install Apache 2.2: sudo apt-get install apache2. Edit the main Apache configuration file to adjust the resource use settings. The settings shown below are a good starting point for a Linode 2GB: /etc/apache2/apache2.conf.
1 2 3 4 5 6 7 8 9 KeepAlive Off StartServers 4 MinSpareServers 20 MaxSpareServers 40 MaxRequestWorkers 200 MaxConnectionsPerChild 4500 Configure Name-Based Virtual Hosts There are different ways to set up virtual hosts; however, the method below is recommended. Within the /etc/apache2/sites-available/ directory, create a configuration file for your website, example.com.conf, replacing example.com with your own domain information: /etc/apache2/sites-available/example.com.conf. If you need to disable your website later, run: sudo a2dissite example.com.conf. Restart Apache: sudo service apache2 restart Assuming that you have configured the DNS for your domain to point to your Linode’s IP address, virtual hosting for your domain should now work. MySQL Install and Configure. Install MySQL: sudo apt-get install mysql-server Choose a secure password when prompted.
Run mysqlsecureinstallation, a program that helps secure MySQL. You will be presented with the opportunity to change the MySQL root password, remove anonymous user accounts, disable root logins outside of localhost, and remove test databases: mysqlsecureinstallation Create a MySQL Database. Log into MySQL: mysql -u root -p Enter the root password.
The MySQL prompt will appear. Create a database and a user with permissions for it. In this example the database is called webdata, the user webuser and password password: create database webdata; grant all on webdata. to 'webuser' identified by 'password';. Exit MySQL: quit With Apache and MySQL installed, you are now ready to move on to installing PHP. PHP.
Install PHP, and the PHP Extension and Application Repository: sudo apt-get install php5 php-pear If you need MySQL support also install php5-mysql sudo apt-get install php5-mysql. Once PHP5 is installed, tune the configuration file located in /etc/php5/apache2/php.ini to enable more descriptive errors, logging, and better performance. The following modifications provide a good starting point: /etc/php5/apache2/php.ini. Ensure the lines above are uncommented. Commented lines begin with a semicolon (;).
Create the log directory for PHP and give the Apache user ownership: sudo mkdir /var/log/php sudo chown www-data /var/log/php. Restart Apache: sudo service apache2 restart Congratulations! You have now set up and configured a LAMP stack. More Information You may wish to consult the following resources for additional information on this topic.
While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials. See Also.