![]() Install LAMP (Linux, Apache, Maria. DB or My. SQL and PHP) Stack on Debian 9. Early this week (June 1. Debian project announced the availability of the new stable version (Debian 9) codenamed Stretch. With this release, the well- known and widely- used Debian 8 Jessie gained old- stable status, which designates the previous stable repository. As it always happens with the release of a new stable version, Stretch includes hundreds of new packages, and updates to thousands of others. Since Debian powers a large percentage of web servers all over the world, in this article we will explain how to install the LAMP stack in Debian 9 Stretch.
The Debian distribution was created in 1993 by Ian Murdock while a computer science student at Purdue University. He wanted a Linux distribution that was maintained. This will allow system administrators to set up brand new web servers on top of Stretch using the recent updates to the distribution’s official repositories. It is assumed that you have installed Debian 9 on a bare metal, virtual machine, or VPS, or have upgraded from Jessie. Installing LAMP in Debian 9 Stretch. The “M” in LAMP stands for Maria. ![]() DB or My. SQL, the database server for the stack. Depending on your choice, you can install the database server and the other components (the Apache web server and PHP) as follows. Install LAMP with Maria. DB on Debian 9# aptitude update & & aptitude install apache. Install LAMP with My. SQL on Debian 9# aptitude update & & aptitude install apache. As a personal preference, I will use Maria. DB in the rest of this article. Once the installation is complete, let us make sure all the services are running. If so, the following commands.# systemctl is- active apache. Otherwise, start both services manually: # systemctl start {apache. Finally, before proceeding let’s use mysql_secure_installation to set up the password for the database root account. If you don’t know how to do this, you can refer to step #4 in How to Install Maria. DB 1. 0 on Debian and Ubuntu. Testing LAMP on Debian 9 Stretch. To begin, we are going to create and populate a sample database. Next, we will use a basic PHP script to retrieve a set of records from the database in JSON format. Finally, we will use Firefox’s developer tools to verify the version of Apache being used. Although we could find out this same information with.# apache. Creating and Populating a Database. Let’s enter the Maria. DB prompt with the following command.# mysql - u root - p. Now we will create a database named Library. DB as follows: Maria. DB [(none)]> CREATE DATABASE Library. DB. and add two tables named Authors. TBL and Books. TBL: Maria. DB [(none)]> USE Library. DB. CREATE TABLE Authors. TBL (. Author. ID INT NOT NULL AUTO_INCREMENT. Full. Name VARCHAR(1. NOT NULL. PRIMARY KEY(Author. ID). Maria. DB [(none)]> CREATE TABLE Books. TBL (. Book. ID INT NOT NULL AUTO_INCREMENT. Author. ID INT NOT NULL. ISBN VARCHAR(1. 00) NOT NULL. Title VARCHAR(1. 00) NOT NULL. Year VARCHAR(4). PRIMARY KEY(Book. ID). FOREIGN KEY(Author. ID) REFERENCES Authors. TBL(Author. ID). For security reasons, we will create a special account to access our database: Maria. DB [(none)]> CREATE USER 'librarian'@'localhost' IDENTIFIED BY 'Today. Maria. DB [(none)]> GRANT ALL PRIVILEGES ON Library. DB.* TO 'librarian'@'localhost'. The last step now consists of populating the tables with Authors and Books: Maria. DB [(none)]> INSERT INTO Authors. TBL (Full. Name) VALUES ('Paulo Coelho'), ('Isabel Allende'), ('Jorge Luis Borges'). Maria. DB [(none)]> INSERT INTO Books. TBL (Author. ID, ISBN, Title, Year) VALUES. El alquimista', '1. El peregrino', '1. La casa de los espiritus', '1. El Aleph', '1. 94. Testing Database Connection with PHP Script. The following PHP script will first connect to the database and retrieve the records that match the query. If an error occurs, a descriptive message will be displayed so as to give us a hint on what’s wrong. Save the following script as booksandauthors. Show PHP version. Current PHP version: " . Connect to database. Today. 12. 3","Library. DB") or die("Error " . SELECT A. ISBN, A. Title. A. Year, B. Full. Name. FROM Books. TBL A JOIN Authors. TBL B. ON A. Author. ID = B. Author. ID; ". Error " . mysqli_error($connection)). Populate an array with the query results. Convert to JSON. echo json_encode($libraryarray). Change the ownership to www- data and add the appropriate permissions: # chown www- data: www- data /var/www/html/booksandauthors. Finally, open a web browser and point it to the URL where the script resides. Verify LAMP on Debian 9. That’s it! In this article we have explained how to install and test the LAMP stack on Debian 9. If you have questions or comments about this article, don’t hesitate to let us know by using the form below. The Free FTP Client for Mozilla Firefox. No answers matched your search. I'm having a hard time connecting! Do you have the latest versions of Fire. FTP and Firefox? The latest version can be found here: https: //addons. US/firefox/addon/fireftp. Make sure your username and password are typed in correctly. Passwords are usually c. As. E- s. En. Si. Ti. Ve! Are you behind a firewall? Try turning it off temporarily to see if it is the source of your problem. If so, you might have to configure your software to allow Fire. FTP to access the Internet. Does your server allow only active mode? Try turning off "Passive Mode" in Fire. FTP under your account's configuration options. This is found on the "Account Manager" dialog, under the Connection tab. Turning off Passive Mode is also known as Active Mode. Do you use a proxy? Try setting the proxy under Tools- > Options- > Connections. Have you been able to connect with other FTP clients? Please check to see if the problem is reproducible with other FTP clients. Have you tried connecting to other servers? Please check to see if the problem is only specific to a certain server. Have you tried using another computer? If possible, try another computer to see if the problem is the same. Are you using a router? Go into your router control panel and turn on port forwarding for ports 2. File. Zilla), then set them to forward to your IP address (usually something like 1. If all else fails, you just might have to use an alternative FTP client. I recommend using File. Zilla or Smart. FTP. Hopefully, I'll be able to resolve your particular issue in future versions. I can't add accounts - all of my accounts are a gone and I'm seeing an error saying g. Site. Manager is undefined. Sorry that you've run into this issue. The newer versions of Fire. FTP are doing migration of an old account format to a new one. Unfortunately, there are some illegal characters that make it difficult to upgrade to the new format that Mozilla now requires. The same applies for the files you're trying to import. Use this tool here to convert your old files into the new format: Step 1: find your profile folder, here are instructions: http: //support. US/kb/profiles- where- firefox- stores- user- data (if you're on a Mac it'll be under: ~/Library/Application Support/Firefox/Profiles)Step 2: find the file in your profile folder called fire. FTPsites. dat. Step 3: open the file with a text editor and copy/paste the content into here: Step 4: Click here to download the file! Step 5: Replace the original file with the one just downloaded. If you have further issues, email me mimecuvalo@gmail. I'll help further. I get a "Secure Connection Failed!" when trying to connect securely to my site! When setting up a secure connection to any site (FTP or any regular website), Firefox checks something called a certificate to verify the identity of the site being accessed. Any old site, including malicious ones, can easily set up a secure connection but it's not as easy to create a fake identity. So just because your connection to a site is encrypted that doesn't mean the data you're transferring is going to a good place. Checking a certificate is like checking the site's ID - it makes sure that they are who they say they are. That being said, sometimes a certificate identifying a site isn't configured correctly for a site. For example, a common way to get to a website is www. However, you can also get to the site usually by going to just mysite. A certificate might be configured to be valid for 'www. ID) for 'mysite. com' - even though really it's the same site, just by a slightly different name. Because getting a certificate is a bit pricey (usually around $1. This then creates a problem for Firefox in trying to figure out which sites are just misconfigured and which ones are out to get you.. So, when you get a "Secure Connection Failed!" warning you are given the option to "Add an exception.." to the rule. But you should only do this if you completely trust the site you are connecting to and/or have verified with the server administrators that this is normal behavior for their servers. If Firefox says "No Information Available", you can try adding the "https: //" prefix in front of URL - this seems to fix it usually. Hopefully in the future this will be more automatic. I'm having problems on my Mac with firewall enabled and using Passive mode! You can t to ry temporarily disabling the firewall to see if that's the issue in the first place. If it is the issue, you should turn off Passive Mode (Account Options- > Connection- > and uncheck Passive Mode). There are no horizontal scrollbars – I can't see my files! This is available in versions 0. I'm using a proxy and it's not working! Support for proxies is limited still. Hopefully, support for proxies will improve in future versions. Try using Analog. X's proxy - it seems to work well. If you're using Squid, see this note. Proxy with authentication does not currently work - it's a technical issue with Firefox that will be hopefully be resolved in a future version. When using SFTP, it's telling me the server key is unknown when I remember already caching the key. The newest version of Fire. FTP uses a different underlying engine to access SFTP servers. As such, it looks at a different known_hosts file which stores known keys to SSH servers that you trust. I apologize for the slight confusion and inconvenience. I don't have permission to view a parent directory of a directory I'm trying to access! If you are getting "Permission denied." errors when trying to login to your site you can try setting Account Manager- > Connection- > Initial Directories- > Remote to the initial directory that you wish to view. Why is uploading slower than downloading? Fire. FTP is usually on par with other FTP clients as far as speed goes. The reason uploading is slower is because your internet service provider (e. Comcast, Qwest) will usually give you a much higher download speed than upload speed for your internet connection. When transferring, my files end up corrupt! You probably accidently enabled ASCII mode. Go to Tools- > Options- > Downloads/Uploads and select either Binary Mode or Auto Mode. You can also set this on the status bar near the bottom right where it might say "ASCII". I can't see my . htaccess files! Files with a period in front of them are considered 'hidden' in the FTP world. To display these files go to Tools- > Options- > Show Hidden Files. Why can't I download files that have strange/special characters (multi- byte character languages like Chinese, Japanese, Russian, Unicode; e. No such file or directory or 5. The system cannot find the file specified). You might have to change the encoding you are working with to download the file. Go to Account Manager- > Advanced- > Server Encoding and perhaps try West European- > Western (ISO- 8. Chinese servers tend to use East Asian- > Chinese Simplified (GB1. Why can't I connect with VMS, IBM servers? Fire. FTP doesn't currently support these types of servers. It's on the todo list though. Why can't I access network folders? Fire. FTP cannot access network folders - it's a technical issue with Firefox that will be hopefully be resolved in a future version. For now the workaround is to map your network drive to a letter and that will make it work. Also, you can try dragging the file from Windows Explorer. Why can't my large files (over 2 GB or 4 GB) be transferred? Fire. FTP cannot download files over 4 GB, or upload files that are over 2 GB - it's a technical issue with Firefox that will be hopefully be resolved in a future version. I can't get it to work on Windows Vista/Windows 7! Support for Windows Vista/7 is currently experimental so there might be issues with it working. For now, you can try this tip sent in from Fire. FTP user Noel Briggs. Playing with my FF config, I came across the following setting: network. IPv. 6 . Setting this from its default of 'false' to 'true' allows Fire. FTP to work on Vista. For those who don't know how to change this, just type about: config into your browser. Find the network. IPv. 6 setting, double- click it and it should change the value from 'false' to 'true'. If it doesn't, you'll just need to type it in (depends on your FF version).". Another alternative from this thread. Copy and paste the following into an elevated CMD prompt: netsh int tcp set global autotuninglevel=disabled. I'm on a Mac - how do I do anything?!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
October 2017
Categories |