Organizational Research By

Surprising Reserch Topic

Installing LAMP (Linux, Apache, MariaDB and PHP) on Fedora 22



asked Aug 31, 2015 in LINUX by rajesh
0 votes
41 views



Related Hot Questions

5 Answers

0 votes

10. Once the install is complete you can test PHP by creating a simple PHP file info.php under Apache root directory i.e. /var/www/html/ and then restart Apache service to verify the PHP info by navigating your browser to the address http://server_IP/info.php.

# echo "" > /var/www/html/info.php
# systemctl restart httpd

Restart Apache Service

Restart Apache Service

Check PHP Info

Check PHP Info

Your LAMP stack setup is now complete and you have all the tools to start building your projects.

answered Aug 31, 2015 by rajesh
0 votes

Step 3: Install PHP with Modules

9. PHP is a powerful programming language can be used for generating dynamic content on websites. It is one of the most frequently used programming languages for web.

The installation of PHP and its modules in Fedora 22 is simple and can be completed with these commands:

# dnf install php php-mysql php-gd php-mcrypt php-mbstring

Install PHP with Modules

answered Aug 31, 2015 by rajesh
0 votes

8. By default the root user will not have a root password set, you need to run mysql_secure_installationcommand to set new root password and secure mysql installation as shown below.

# mysql_secure_installation 

Once executed, you will be asked to enter the¬†MySQL¬†root password ‚Äď simply press¬†enter¬†as there is no password for that user. The rest of the options depend on your choice, you can find a sample output and configuration suggestions in below screenshot:

Secure MariaDB Installation

answered Aug 31, 2015 by rajesh
0 votes

Step 2: Install MariaDB

6. MariaDB is an open source fork of the famous MySQL relational database. MariaDB has been forked by the MySQL creators due to concerns of Oracle acquisition. MariaDB is meant to remain free under the GNU GPL. It is slowly becoming the preferred option for a relational database engine.

To complete the install of MariaDB in Fedora 22 issue the following commands:

# dnf install mariadb-server 

Install MariaDB in Fedora 22

Install MariaDB Server

7. Once mariadb installation complete, you can start and enable MariaDB to auto start at system boot by issuing the following commands:

# systemctl start mariadb
# systemctl enable mariadb

Start Enable MariaDB Server

answered Aug 31, 2015 by rajesh
0 votes

Step 1: Setup Apache Web Server

1. Apache web server powers millions of websites across the web. It is very flexible in terms of customization and its security can be greatly improved with modules such as mod_security and mod_evasive.

To install Apache in Fedora 22 you can simply run the following command as root:

# dnf install httpd

Install Apache on Fedora 22

Install Apache Web Server

2. Once the install is complete you can power on Apache by issuing the following command:

# systemctl start httpd 

Start Apache Web Server

Start Apache Web Server

3. To verify that Apache is working properly open your server’s IP address in a web browser. You can find your IP address with command such as:

# ifconfig | grep inet

Check IP Address

Check IP Address

4. Once you know the IP address, you can enter your IP address in the browser you should see the default Apache page:

Note: In case you are not able to reach the page, it could be that the firewall is blocking connection on port 80. You can allow connections on the default Apache ports (80 and 443) by using:

# firewall-cmd --permanent ‚Äďadd-service=http
# firewall-cmd --permanent ‚Äďadd-service=https

Open Apache Ports on Firewall

Open Apache Ports on Firewall

Fedora 22 Apache Default Page

Fedora 22 Apache Default Page

5. To ensure that Apache will start upon sytem boot run the following command.

# systemctl enable httpd

Enable Apache at Boot

Enable Apache at Boot

Note: The default Apache directory root for your website files is /var/www/html/, make sure to place your files in there.

answered Aug 31, 2015 by rajesh

...