In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces Fedora 23 how to install LAMP server, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
LAMP is actually the Linux+Apache+PHP+MySQL environment.
Install Apache
Apache is an open source web services framework. Fully support CGI, SSL.
Switch to the root account: suFedora 23 yFedora 22 enter the following command to install Apache:dnf install httpd-yFedora 21 and earlier: yum install httpd-y starts the httpd service to start the service each time the system: systemctl enable httpd uses the following command to start the httpd service: systemctl start httpd
If you encounter the following error:
Job for httpd.service failed. See 'systemctl status httpd.service' and' journalctl-xn' for details.
Delete everything in / etc/hostname and add "localhost". At the same time, set the value of "Servername" in the / etc/httpd/conf/httpd.conf file to "localhost" and try to start the httpd service again.
And adjust the firewall to allow httpd services to be accessed from remote clients.
Firewall-cmd-permanent-add-service=httpfirewall-cmd-permanent-add-service=https
Restart the firewalld service:
Firewall-cmd-reload
Open a browser and enter the server IP to access:
Fedora 23 how to install LAMP Server Fedora 23 how to install LAMP Server install MariaDB
Fedora 23ax 22 user installation command:
Dnf install mariadb mariadb-server-y
Fedora 21 and earlier commands:
Yum install mariadb mariadb-server-y
Automatically start the command with the system:
Systemctl enable mariadb
Start the database server:
Systemctl start mariadb
Set the password for the MariaDB root account. By default, the password for MySQL root users is empty. Therefore, to prevent unauthorized access to the MySQL database, we set the root user password:
Mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR 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 will be blank
So you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
Root user without the proper authorisation.
You already have a root password set, so you can safely answer'nails.
Change the root password? [YBO] y # # Enter 'y'and press enter # #
New password: # # Enter password # #
Re-enter new password: # # Re-enter password # #
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
To log into MariaDB without having to have a user account created for
Them. This is intended only for testing, and to make the installation
Go a bit smoother. You should remove them before moving into a
Production environment.
Remove anonymous users? [Y/n] # # Press Enter # #
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
Ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] # # Press Enter # #
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
Access. This is also intended only for testing, and should be removed
Before moving into a production environment.
Remove test database and access to it? [Y/n] # # Press Enter # #
-Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
-Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
Will take effect immediately.
Reload privilege tables now? [Y/n] # # Press Enter # #
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
Installation should now be secure.
Thanks for using MariaDB!
Install PHP
Fedora 23ax 22 user command:
Dnf install php-y
Fedora 21 and earlier versions:
Yum install php-y
Test whether PHP is running:
Vi / var/www/html/testphp.php
Enter the following:
Restart the Http service:
Systemctl restart httpd
Enter it in the browser to see:
Install the PHP module
Search for the module and install:
Fedora 23ax 22 users:
Dnf search php
Fedora 22 and earlier:
Yum search php
Now install the modules you choose, such as php-mysql, using the following command:
Fedora 23ax 22 users:
Dnf install php-mysql-y
Fedora 22 and earlier:
Yum install php-mysql-y
Restart the HTTP service:
Systemctl restart httpd
The browser checks to see if the module installation is successful:
Install phpMyAdmin
Phpmyadmin is used to manage the database:
Fedora 23ax 22 users:
Dnf install phpmyadmin-y
Fedora 22 and earlier:
Yum install phpmyadmin-y
By default, phpMyAdmin can only be accessed from the local host. To access your network from a remote system, perform the following steps.
Vi / etc/httpd/conf.d/phpMyAdmin.conf
Find and comment out 127.0.0.1 and request ip:: 1 lines. Then add an additional line that requires all grants to be slightly lower than for comment lines.
This is my changed phpMyAdmin.conf file. These changes are marked in bold.
[...] Alias / phpMyAdmin / usr/share/phpMyAdminAlias / phpmyadmin / usr/share/phpMyAdmin AddDefaultCharset UTF-8 # Apache 2.4 # Require ip 127.0.0.1# Require ip:: 1 Require all granted # Apache 2.2 Order Deny Allow Deny from All Allow from 127.0.0.1 Allow from:: 1# Apache 2.4 # Require ip 127.0.0.1# Require ip:: 1 Require all granted [...]
Important: however, allowing access to the database by someone other than localhost should be considered dangerous unless properly protected by SSL. You do this at your own risk.
Save and close the file. Restart the httpd service.
Systemctl restart httpd
OK, open phpmyadmin to test:
All right, installation complete!
Thank you for reading this article carefully. I hope the article "how to install LAMP Server in Fedora 23" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.