Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The process of installing apache on Linux server

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "the process of installing apache on Linux server". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "the process of installing apache on Linux server".

Apache installation

1. Install Apache and use the command "yum install httpd-y"

[root@localhost ~] # yum install httpd-y

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

Base | 4.0 kB 00:00...

Setting up Install Process

2. Start apache

[root@localhost ~] # service httpd start

Starting httpd:httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

[OK]

[root@localhost ~] #

3. Set apache to boot automatically.

[root@localhost] # chkconfig-- level 5 httpd on

[root@localhost] # chkconfig-- list httpd

Httpd 0: off 1: close 2: close 3: close 4: close 5: enable 6: close

[root@localhost ~] #

4. Modify the firewall

If you want other machines to access the host's apache, either turn off the firewall or modify the firewall configuration

1) turn off the firewall

Enter the setup command at the terminal

[root@localhost ~] # setup

Pop-up window, select firewall

Pop-up window, use a space to close the firewall, save exit (have * is started)

2) modify firewall configuration

Enter the command "setup" in the terminal, select "Firewall" in the pop-up box, and then select "Custom"

Use the spacebar to select "http" and "https", and then select "forward"

Select add

Add port 80, protocol tcp, and then determine

Go back to the original interface, "OK."

Restart the firewall

[root@localhost ~] # service iptables restart

Iptables: set chain to policy ACCEPT:filter nat [OK]

Iptables: clear firewall rules: [OK]

Iptables: uninstalling module: [OK]

Iptables: apply firewall rules: [OK]

[root@localhost ~] #

Restart apache

[root@localhost ~] # service httpd restart

Stop httpd: [OK]

Starting httpd:httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

[OK]

[root@localhost ~] #

5. Test, enter the local ip address on other LAN computers, and see the following interface represents the successful installation of apache.

At this point, I believe you have a deeper understanding of "the process of installing apache on Linux server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report