How To Install Lamp Server In Debian Packages
How To Install Lamp Server In Debian Packages' title='How To Install Lamp Server In Debian Packages' />How To Install Linux, Apache, My. SQL, PHP LAMP Stack on Debian 9 Stretch nix. Craft. I am a new user of Debian 9 operating system. Can you tell me how to setup and install LAMP stack on a Debian 9 StretchIn this article we will explain how to install and test the LAMP stack on Debian 9 to. PHP as follows. Install. How To Install LAMP Stack On Debian. Apache web server using the following command. First you have to remove existing MySQL packages if any. LAMP is an acronym for four open source software frequently used to develop the web applications such as forums, blogs, and business sites Linux operating system. Apache web server. My. SQLMaria. DB relational database management system RDBMSPHP server side programming language. This tutorial shows you how to install LAMP Apache version 2, PHP version 7, Maria. DB version 1. 0. 2 stack on a Debian 9 Linux server along with firewall settings to open tcp port 8. Lamp-Install-1024x557.png' alt='How To Install Lamp Server In Debian Packages' title='How To Install Lamp Server In Debian Packages' />
Step 1 Apply patches if any. Type the following apt get commandapt command to update the system sudo apt update. Sample outputs Hit 1 http security. In. Release. Hit 2 http cdn fastly. In. Release. Reading package lists. Done. Building dependency tree. Reading state information. Done. 3. 8 packages can be upgraded. Run apt list upgradable to see them. To patch it with the latest updates, run sudo apt get upgrade. Sample outputs Reading package lists. Patch Of Flaky Skin On Face. Done. Building dependency tree. Reading state information. Done. Calculating upgrade. Done. The following packages will be upgraded. Need to get 2. 6. MB of archives. After this operation, 8. B of additional disk space will be used. Do you want to continueYn y. Get 1 http cdn fastly. B. Get 2 http cdn fastly. B. Setting up libmagic. Setting up libssl. Processing triggers for libc bin 2. Setting up libssl. Setting up libc l. Setting up locales 2. Generating locales this might take a while. US. UTF 8. done. Generation complete. Setting up init 1. Setting up libdns export. P4 1. 2. 3. Setting up file 1 5. Processing triggers for libc bin 2. Reading package lists. Done. Building dependency tree. Reading state information. Done. Calculating upgrade. Done. The following packages will be upgraded. Yn y. Get 1 http cdn fastly. B. Get 2 http cdn fastly. B. Setting up libmagic. Setting up libssl. Processing triggers for libc bin 2. Setting up libssl. Setting up libc l. Setting up locales 2. Generating locales this might take a while. US. UTF 8. done. Generation complete. Setting up init 1. Setting up libdns export. P4 1. 2. 3. Setting up file 1 5. Processing triggers for libc bin 2. Step 2 Install Apache http server. Type the following command sudo apt install apache. Sample outputs Reading package lists. Done. Building dependency tree. Reading state information. Done. The following additional packages will be installed. Suggested packages. The following NEW packages will be installed. Need to get 0 B2. B of archives. After this operation, 7. B of additional disk space will be used. Do you want to continue Yn y. Selecting previously unselected package mime support. Reading database. Preparing to unpack. Unpacking mime support 3. Selecting previously unselected package libapr. Enabling module filter. Enabling module deflate. Enabling module status. Enabling module reqtimeout. Enabling conf charset. Enabling conf localized error pages. Enabling conf other vhosts access log. Enabling conf security. Enabling conf serve cgi bin. Enabling site 0. 00 default. Created symlink etcsystemdsystemmulti user. Created symlink etcsystemdsystemmulti user. Processing triggers for libc bin 2. Processing triggers for systemd 2. Reading package lists. Done. Building dependency tree. Reading state information. Done. The following additional packages will be installed. Suggested packages. The following NEW packages will be installed. Need to get 0 B2. B of archives. After this operation, 7. B of additional disk space will be used. Do you want to continueYn y. Selecting previously unselected package mime support. Reading database. Preparing to unpack. Unpacking mime support 3. Selecting previously unselected package libapr. Enabling module filter. Enabling module deflate. Enabling module status. Enabling module reqtimeout. Enabling conf charset. Enabling conf localized error pages. Enabling conf other vhosts access log. Enabling conf security. Enabling conf serve cgi bin. Enabling site 0. 00 default. Created symlink etcsystemdsystemmulti user. Created symlink etcsystemdsystemmulti user. Processing triggers for libc bin 2. Processing triggers for systemd 2. You can view default page by typing the IP address of your server. To find the IP address of your server use the ip commandifconfig command as follows ifconfig eth. Sample outputs inet 1. Fire a web browser and type the following url http 1. Sample outputs Fig. Default Debian 9 Apache 2 page. The Apache HTTP server successfully installed on your server. You can change the default page by editing the index. How do I stopstartrestartreload Apache HTTP serverThe syntax is as follows sudo systemctl startstoprestartreloadstatusgraceful stopforce reload apache. To stop Apache 2 server, run sudo systemctl stop apache. To start Apache 2 server, run sudo systemctl start apache. To restart Apache 2 server, run sudo systemctl restart apache. To reload Apache 2 server, run sudo systemctl reload apache. To see status of Apache 2 server, run sudo systemctl status apache. Fig. 0. 2 Controlling Apache 2 server with systemctl command. How do I change configuration of Apache HTTP server You need to edit files located in etcapache. Sample outputs total 3. Jan 2. 5 2. 2 5. Jun 1. Jun 1. 3 1. 8 4. Jan 2. Jan 2. 5 2. 1 1. Jun 1. Jun 1. 3 1. 8 4. Jan 2. Jun 1. 3 1. 8 4. Jun 1. You need to edit or add a new config file in etcapache. Here is a default config file cat etcapache. Yoshi Wii Pal. Sample outputs lt Virtual. Host 8. 0. The Server. Name directive sets the request scheme, hostname and port that. This is used when creating. URLs. In the context of virtual hosts, the Server. Name. specifies what hostname must appear in the requests Host header to. For the default virtual host this file this. However, you must set it for any further virtual host explicitly. Server. Name www. Server. Admin email protected. Document. Root varwwwhtml. Available loglevels trace. It is also possible to configure the loglevel for particular. Log. Level info ssl warn. Error. Log APACHELOGDIRerror. Custom. Log APACHELOGDIRaccess. For most configuration files from conf available, which are. For example the. following line enables the CGI configuration for this host only. Include conf availableserve cgi bin. Virtual. Host. Virtual. Host 8. The Server. Name directive sets the request scheme, hostname and port that. This is used when creating. URLs. In the context of virtual hosts, the Server. Name. specifies what hostname must appear in the requests Host header to. For the default virtual host this file this. However, you must set it for any further virtual host explicitly. Server. Name www. Server. Admin email protected. Document. Root varwwwhtml. Available loglevels trace. It is also possible to configure the loglevel for particular. Log. Level info ssl warn. Error. Log APACHELOGDIRerror. Custom. Log APACHELOGDIRaccess. Installing LAMP On Ubuntu For Newbies. Installing LAMP On Ubuntu For Newbies. In this guide, I will show you how to install a LAMP system. LAMP stands for Linux, Apache, My. SQL, PHP. The guide is intended to help those who have very little knowledge of using Linux. UPDATE The tutorial below is for Ubuntu 1. If you are seeking for a LAMP tutorial for the current Ubuntu version, then please use this guide https www. Install Apache. To start off we will install Apache. Open up the Terminal Applications Accessories Terminal. CopyPaste the following line of code into Terminal and then press enter sudo apt get install apache. The Terminal will then ask you for youre password, type it and then press enter. Testing Apache. To make sure everything installed correctly we will now test Apache to ensure it is working properly. Open up any web browser and then enter the following into the web address http localhostYou should see a folder entitled apache. Open it and you will see a message saying It works, congrats to you Install PHPIn this part we will install PHP 5. Step 1. Again open up the Terminal Applications Accessories Terminal. Step 2. CopyPaste the following line into Terminal and press enter sudo apt get install php. Step 3. In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this sudo etcinit. Test PHPTo ensure there are no issues with PHP lets give it a quick test run. Step 1. In the terminal copypaste the following line sudo gedit varwwwtestphp. This will open up a file called phptest. Step 2. CopyPaste this line into the phptest file lt Step 3. Save and close the file. Step 4. Now open youre web browser and type the following into the web address http localhosttestphp. The page should look like this Congrats you have now installed both Apache and PHP Install My. SQLTo finish this guide up we will install My. SQL. Note Out of Apache and PHP, My. SQL is the most difficult to set up. I will provide some great resources for anyone having trouble at the end of this guide. Step 1. Once again open up the amazing Terminal and then copypaste this line sudo apt get install mysql server. Step 2 optional. In order for other computers on your network to view the server you have created, you must first edit the Bind Address. Begin by opening up Terminal to edit the my. Change the linebind address 1. And change the 1. IP address. Step 3. This is where things may start to get tricky. Begin by typing the following into Terminal mysql u root. Following that copypaste this line mysql SET PASSWORD FOR rootlocalhost PASSWORDyourpassword Make sure to change yourpassword to a password of your choice. Step 4. We are now going to install a program called php. My. Admin which is an easy tool to edit your databases. Copypaste the following line into Terminal sudo apt get install libapache. After that is installed our next task is to get PHP to work with My. SQL. To do this we will need to open a file entitled php. To open it type the following gksudo gedit etcphp. Now we are going to have to uncomment the following line by taking out the semicolon. Change this line extensionmysql. To look like this extensionmysql. Now just restart Apache and you are all set The End. Quick note to anyone who encountered problems with setting up the My. SQL password, please refer to this page Mysql. Password. Reset. I applaud everyone who has taken the time to read this guide. This guide is also my first ever so I would love to hear back from the public on what you guys think Just dont be too harsh. If you have questions about installing any part of LAMP just drop them in the comment box and I will do my best to help you out.