How To Install LAMP
How To Install LAMP
How To Install LAMP
1. Apache web server is the most used web server on the internet. Its powering millions of websites and is one of the most reliable solutions you
can get for a web server. There are plenty of modules that can help you customize the functionality of Apache and also security modules such as
mod_security to protect your web sites.
To install Apache in Fedora 23, you can simply run the following command:
$ sudo dnf install httpd
2. Once the install is complete, there are few more things to be done. First we will setup Apache to automatically start upon system boot and then
we will start and verify the status of Apache.
For that purpose, run the following series of commands:
$ sudo systemctl enable httpd.service
$ sudo systemctl start httpd
$ sudo systemctl status httpd
3. To allow access to the web server over HTTP and HTTPS, you will need to allow access to it in the system firewall. For that purpose, add the
following rules in the fedora firewall:
$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --permanent --add-service=https
$ sudo systemctl reload firewalld
$ ip a | grep inet
If you need to have files accessible over web, you should place the files in that directory.
This action will start a series of questions that you will need to answer in order to improve the security of your MySQL server.
Here is what you will need to do.
1. When asked for MySQL root password, leave empty. There is no password by default.
2. After that you will be asked to enter the new root password for MariaDB. Make sure to select a strong one.
3. After that, you will be prompted if you wish to remove the MariaDB anonymous user. This user is not needed, so your should be y for
yes.
4. Next, you will need to disallow remote access to the databases from root. The reason behind that is that you can later create separate
users for each database that will be able to access the required databases.
5. Continuing further, you will be asked whether or not you wish to remove the test database that was created upon installation of
MariaDB. This database is not needed so you can safely remove it.
Finally reload the database privileges and you are done.
12. Now lets test our settings. Create a file called info.php in the following directory: /var/www/html. You can use command such as:
# cd /var/www/html/
# nano info.php
Now save the file. Go back to your browser and enter the following:
http://your-ip-address/info.php
You should now be able to see the PHP info page that you just created:
Conclusion
Your installation of the LAMP stack on Fedora 23 is now complete and you can start creating your awesome web projects. If you liked the
article or simply have a question, please do not hesitate to submit your comment in the section below.
Share
+
52
24
2
23 comments