当前位置:网站首页>Fedora 21 installs lamp host server
Fedora 21 installs lamp host server
2022-07-03 17:48:00 【Brother Xing plays with the clouds】
not long ago Fedora 21 Released , There are three versions , One of them The server edition , The original tip is Server The server edition , Have a look first LAMP yes Linux、Apache、MySQL/MariaDB、PHP For short .
The example domain name used in this tutorial is server1.example.com,IP The address is 192.168.0.100, In fact, your installation is different , Please modify accordingly .
1、 Install the database first MySQL/MariaDB 5.
MariaDB Installation command :
yum install mariadb mariadb-server
by MariaDB Create boot up :
systemctl enable mariadb.service
start-up mysql service :
systemctl start mariadb.service
mysql_secure_installation
Set super root User password , Follow the instructions :
[[email protected] ~]# mysql_secure_installation /usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found
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): <– 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: <– Input password Re-enter new password: <– Enter the password again 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] <– 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] <– 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] <– ENTER – Dropping test database… … Success! – 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] <– 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! [[email protected] ~]#
2、 install Apache2
yum install httpd
Set the automatic startup with the system :
systemctl enable httpd.service
Start the service :
systemctl start httpd.service
Next we need to add Apache The service covers 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
Okay , Input IP Address :http://192.168.0.100, have a look apache Operation of the :
Fedora System Apache Default root /var/www/html, Profile directory /etc/httpd/conf/httpd.conf, Other configuration file directories /etc/httpd/conf.d/ directory.
3、 install PHP5
Installation command :
yum install php
restart apache command :
systemctl restart httpd.service
4、 test PHP5 obtain PHP5 Installation :
Create a probe file in the root directory : nano /var/www/html/info.php
Add file content :
<?php
phpinfo();
?>
Then access the probe file :http://192.168.0.100/info.php
5、 Give Way MySQL obtain PHP5 Support : First search for support plug-ins : yum search php
install : yum install php-mysqlnd php-mssql php-opcache
Restart the service : systemctl restart httpd.service
Visit the probe file again , See if it supports .
6、 install phpMyAdmin Management database :
yum install phpmyadmin
Now let's set PHPMyAdmin. We have changed Apache Configure the phpMyAdmin Allowing connections is not limited to localhost Address access (< Catalog /usr/share/phpMyAdmin/ >):
nano /etc/httpd/conf.d/phpMyAdmin.conf
The configuration 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 Installation completed , Now access phpmyadmin:http://192.168.0.100/phpmyadmin/
Reference link :
- Apache: http://httpd.apache.org/
- PHP: http://www.php.net/
- MySQL: http://www.mysql.com/
- Fedora: http://fedoraproject.org/
- phpMyAdmin: http://www.phpmyadmin.net/
边栏推荐
- Brief introduction to the core functions of automatic penetration testing tool
- 数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
- Draw some simple graphics with MFC
- Analysis report on production and marketing demand and investment forecast of China's PVC industry from 2021 to 2026
- Assembly for unloading Loadfrom() loaded assembly - unloading the assembly loaded with assembly LoadFrom()
- QT学习日记9——对话框
- 聊聊支付流程的设计与实现逻辑
- Managing multiple selections with MVVM - managing multiple selections with MVVM
- Swm32 series Tutorial 4 port mapping and serial port application
- Wechat applet for the first time
猜你喜欢
STM32实现74HC595控制
QT adjust win screen brightness and sound size
[RT thread] NXP rt10xx device driver framework -- pin construction and use
Leetcode Valentine's Day Special - looking for a single dog
How to read the source code [debug and observe the source code]
[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
Luogu: p1155 [noip2008 improvement group] double stack sorting (bipartite graph, simulation)
聊聊支付流程的设计与实现逻辑
Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
Deops入门
随机推荐
Inheritance of ES6 class
Notes on problems -- watching videos on edge will make the screen green
IntelliJ 2021.3 short command line when running applications
[set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
Kotlin的协程:上下文
Y is always discrete and can't understand, how to solve it? Answer: read it several times
分布式的任务分发框架-Gearman
Analyse ArrayList 3: suppression d'éléments
vs2013已阻止安装程序,需安装IE10
TensorBoard快速入门(Pytorch使用TensorBoard)
RDS数据库的监测页面在哪看?
(8) HS corner detection
Deops入门
Where is the database account used when running SQL tasks in data warehouse tasks configured
Global and Chinese pediatric palliative care drug market development research and investment planning recommendations report 2022-2028
MinGW compile boost library
[vscode] convert tabs to spaces
2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
QT learning diary 9 - dialog box
鸿蒙第四次培训