Home  >  Article  >  Operation and Maintenance  >  Linux build web server process

Linux build web server process

angryTom
angryTomOriginal
2020-02-05 14:04:357998browse

This article will introduce you to the process of building a web server on a Linux server. It has certain reference value. I hope it will be helpful to students who are learning Linux operation and maintenance!

Linux build web server process

linux build web server process

1. First we need to log in to the Linux server, you can use VNC and SSH. Mainly used is SSH.

ssh root@ip -p 22

2. Then we can use apt and yum commands to update the system

sudo apt update
sudo apt upgrade

sudo yum update

3. Next, we need to download the server software. There are two ways, one is to use the package management tool to install it, the other is to download the source code to compile and install

1. The package management tool is to install apache or nginx

sudo apt install apache2 -y
sudo apt install nginx -y

sudo yum install httpd -y
sudo yum install nginx -y

2. Compile and install Apache Nginx

wget http://xxx.xxx.xxx/apache2.tar.gz  # apache2 的源码地址
tar -zxvf apache2.tar.gz #解压
./configure --prefix=/usr/local/apache2
make
make install

#nginx编译安装方法相同

4. Use the scp command to upload website files to the server website directory

scp -P 22 www.zip root@ip:/var/www/html

5. Unzip the website files

sudo unzip /var/www/html/www.zip

After completion, you can access the web site. It should be noted that our server does not have php, MySQL and other environments installed, so we can only create static sites.

Through so many operations, we can find that building a web server is really troublesome! It is recommended that you use Linux panel tools, such as 小PILinux Operation and Maintenance Panel, which can install all services with just one command.

(Online video tutorial sharing: linux video tutorial)

The above is the detailed content of Linux build web server process. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn