Linux Suite Fedora 21 install LAMP Server Graphics tutorial

Source: Internet
Author: User
Tags anonymous install php phpmyadmin

This tutorial is in accordance with the original Howtoforge.com website translation, if not successful, you can refer to the original. Not long ago Fedora 21 released, the version has three, which has a server version, the original hint is the server version, first look at the LAMP is Linux, Apache, MYSQL/MARIADB, PHP abbreviation.

This tutorial takes the instance domain name is the SERVER1.EXAMPLE.COM,IP address is 192.168.0.100, in fact you install the time to be different, please make the corresponding modification.

1, the first installation of the database MYSQL/MARIADB 5.

MARIADB installation command:

Yum Install mariadb Mariadb-server

Create a boot from mariadb:

Systemctl Enable Mariadb.service

To start the MySQL service:

Systemctl Start Mariadb.service

Mysql_secure_installation

Set the super root user password and follow the instructions:

[Root@server1 ~]# Mysql_secure_installation
/usr/bin/mysql_secure_installation:line 379:find_mysql_client:command not found

Note:running all PARTS The This SCRIPT is recommended to all MARIADB
SERVERS in PRODUCTION use! Please READ each step carefully!

In order to log into mariadb to secure it, we'll need the current
Password for the root user. If you ' ve just installed mariadb, and
You haven ' t set the root password yet, the password'll be blank,
So your should just press ENTER here.

Enter current password for root (enter for none): <–enter
OK, successfully used password, moving on ...

Setting The root password ensures that nobody can log into the MARIADB
Root user without the proper authorisation.

Set root Password? [y/n] <–enter
New Password: <– Enter password
Re-enter new password: <– Enter password again
Password Updated successfully!
Reloading privilege tables.
... success!

By default, a MARIADB installation has a anonymous user, allowing anyone
To log into MARIADB without has to have a user account created for
them. This is intended only for testing, and to make the installation
Go a bit smoother. Should remove them before moving into a
Production environment.

Remove anonymous users? [y/n] <–enter
... success!

Normally, Root should only is allowed to connect from ' localhost '. This
Ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [y/n] <–enter
... success!

By default, MARIADB comes with a database named ' test ' that anyone can
Access. This is also intended a for testing, and should to be removed
Before moving into a production environment.

Remove test database and access to it? [y/n] <–enter
–dropping Test Database ...
... success!
–removing privileges on test database ...
... success!

Reloading the privilege tables would ensure that all changes made so far
would take effect immediately.

Reload privilege tables now? [y/n] <–enter
... success!

Cleaning up ...

All done! If you have ' ve completed all of the above steps, your mariadb
Installation should now is secure.

The for using mariadb!
[Root@server1 ~]#

2. Installation Apache2


Yum Install httpd

Setup starts with system:

Systemctl Enable Httpd.service

To start the service:

Systemctl Start Httpd.service

Next we need to add the Apache service overlay in the firewall command as follows:

Firewall-cmd--set-default-zone=public

Firewall-cmd--permanent--zone=public--add-service=http
Firewall-cmd--permanent--zone=public--add-service=https
Firewall-cmd--reload

OK, input IP address: http://192.168.0.100, look at the Apache operation:



Fedora system Apache Default root directory/var/www/html, config file directory/etc/httpd/conf/httpd.conf, other profile directory/etc/httpd/conf.d/directory.

3. Installation PHP5

Install Command:

Yum Install PHP

Restart Apache command:

Systemctl Restart Httpd.service

4, test PHP5 get PHP5 Installation:


Create a probe file under the root directory:
nano/var/www/html/info.php

To add the contents of a file:

<?php
Phpinfo ();
?>

Then access the probe file: http://192.168.0.100/info.php

5, let MySQL get PHP5 support:

First search for support plug-ins:
Yum Search PHP
Installation:
Yum Install Php-mysqlnd Php-mssql php-opcache
Restart Service:
Systemctl Restart Httpd.service

Visit the probe file again to see if it has been supported.

6, the installation of phpMyAdmin Management database:


Yum Install phpMyAdmin

Now we set the phpMyAdmin. We have changed the Apache configuration so that phpMyAdmin allows connections not limited to localhost address access (< directory/usr/share/phpmyadmin/>):

Nano/etc/httpd/conf.d/phpmyadmin.conf

Configuration content is as follows:

<Directory/usr/share/phpMyAdmin/>
# Adddefaultcharset UTF-8

# <ifmodule Mod_authz_core.c>
# Apache 2.4 #
# <RequireAny>
# Require IP 127.0.0.1
# Require IP:: 1
# </RequireAny>
# </IfModule>
# <ifmodule!mod_authz_core.c>
# Apache 2.2 #
# Order Deny,allow
# Deny from all
# Allow from 127.0.0.1
# Allow from:: 1
# </IfModule>
Require all granted
</Directory>

Restart Apache:

Systemctl Restart Httpd.service

OK install complete, now visit phpmyadmin:http://192.168.0.100/phpmyadmin/

Official Links:


apache:http://httpd.apache.org/
php:http://www.php.net/
mysql:http://www.mysql.com/
fedora:http://fedoraproject.org/
phpmyadmin:http://www.phpmyadmin.net/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.