ubuntu的web服务器
Want to install OpenLiteSpeed Webserver on Ubuntu? Today we’re going to do just that.
是否想在Ubuntu上安装OpenLiteSpeed Web服务器? 今天,我们将要这样做。
The OpenLiteSpeed web server is an open-source server renowned for its lightweight nature and high performance.
OpenLiteSpeed Web服务器是一种开源服务器,以其轻量级的特性和高性能而闻名。
Developed by LiteSpeed Technologies, it brings an online GUI to help the users administrate their web servers. The OpenLiteSpeed web server is highly optimized and runs smoothly without consuming a lot of system resources.
它由LiteSpeed Technologies开发,具有在线GUI,可帮助用户管理其Web服务器。 OpenLiteSpeed Web服务器经过高度优化,可以平稳运行,而不会消耗大量系统资源。
With its low overhead and easily scalable structure, OpenLiteSpeed has grown its user base over the years. In this tutorial, we will guide you to install the OpenLiteSpeed web server on Ubuntu.
凭借其较低的开销和易于扩展的结构,OpenLiteSpeed多年来已扩大了用户群。 在本教程中,我们将指导您在Ubuntu上安装OpenLiteSpeed Web服务器。
入门 (Getting started)
Before we begin the tutorial to install OpenLiteSpeed webserver on Ubuntu, we need to make sure that we have the latest available repositories. To do this, we will update our default repositories using the apt package management service.
在开始本教程以在Ubuntu上安装OpenLiteSpeed Web服务器之前,我们需要确保我们拥有最新的可用存储库。 为此,我们将使用apt软件包管理服务更新默认存储库。
Firstly, you need to open the terminal on your Ubuntu system and type the following.
首先,您需要在Ubuntu系统上打开终端并输入以下内容。
sudo apt update
如何在Ubuntu上安装OpenLiteSpeed Web服务器 (How to install OpenLiteSpeed Webserver on Ubuntu)
It is time to install Openlitespeed webserver on Ubuntu. To do so, you need to follow the steps below
现在该在Ubuntu上安装Openlitespeed Web服务器了。 为此,您需要执行以下步骤
将OpenLiteSpeed存储库添加到Ubuntu (Add OpenLiteSpeed Repository to Ubuntu)
To install Openlitespeed webserver on Ubuntu, we need to first download the necessary repository keys. This can be done by downloading the official installation archive from openlitespeed.org and unpacking it. Alternatively, we can do this directly through the command line.
要在Ubuntu上安装Openlitespeed Web服务器,我们需要首先下载必要的存储库密钥。 这可以通过从openlitespeed.org下载官方安装档案并将其解压缩来完成 。 或者,我们可以直接通过命令行执行此操作。
First, we need to download the Openlitespeed repository and add the signing key of the developer to it. This can be done using the following command.
首先,我们需要下载Openlitespeed存储库,并向其中添加开发人员的签名密钥。 可以使用以下命令完成此操作。
wget -qO - https://rpms.litespeedtech.com/debian/lst_repo.gpg | sudo apt-key add -
Now, we would add the information of the Openlitespeed repository to our system. To do so, we use this command.
现在,我们将Openlitespeed存储库的信息添加到我们的系统中。 为此,我们使用此命令。
sudo add-apt-repository 'deb http://rpms.litespeedtech.com/debian/ bionic main'
Now, the required repositories are added to our package cache. You might have noticed that the command has a URL which points to a Debian package.
现在,所需的存储库已添加到我们的程序包缓存中。 您可能已经注意到该命令的URL指向Debian软件包。
However, there is no need to worry as LiteSpeed Technologies offers a common package for both Debian and Ubuntu distributions.
但是,不必担心,因为LiteSpeed Technologies为Debian和Ubuntu发行版提供了一个通用软件包。
使用APT在Ubuntu上安装OpenLiteSpeed Web服务器 (Install OpenLiteSpeed Webserver on Ubuntu using APT)
Now that we have the required repository, we can install Openlitespeed web server on Ubuntu.
有了所需的存储库后,我们就可以在Ubuntu上安装Openlitespeed Web服务器了。
We also need to install the PHP processor along with our web server. We will use the following command to install both on our system.
我们还需要与Web服务器一起安装PHP处理器。 我们将使用以下命令在我们的系统上安装两者。
sudo apt install openlitespeed lsphp73
Now, we will create a soft link pointing at the PHP processor which we installed with Openlitespeed web server.
现在,我们将创建一个指向通过Openlitespeed Web服务器安装PHP处理器的软链接。
This ensures that our Openlitespeed web server uses the correct version of PHP. The soft link can be created using the ln command.
这可以确保我们的Openlitespeed Web服务器使用正确版本PHP。 可以使用ln命令创建软链接。
sudo ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5
设置OpenLiteSpeed (Set up OpenLiteSpeed)
Once we install Openlitespeed webserver on Ubuntu, we need to set up administrative credentials.
在Ubuntu上安装Openlitespeed Web服务器后,我们需要设置管理凭据。
The default username is ‘admin’ while the default password is 123456.
默认用户名是“ admin”,默认密码是123456。
Hence, we need to change them before we get our server online for testing. To change the security credentials, we run a script named admpass.sh.
因此,我们需要先更改它们,然后才能将服务器联机进行测试。 要更改安全凭证,我们运行一个名为admpass.sh的脚本。
This script is available in the Openlitespeed files. We can run it using the following command.
该脚本可在Openlitespeed文件中找到。 我们可以使用以下命令运行它。
sudo /usr/local/lsws/admin/misc/admpass.sh
Once we run the script, we will be prompted to choose a username for the server admin. Once we enter it, we need to enter a password for our admin account and confirm it.
运行脚本后,将提示我们选择服务器管理员的用户名。 输入密码后,我们需要为管理员帐户输入密码并进行确认。
If we leave a field empty, the default entry will be used. Once you update the username and password, the script will confirm that it was successful.
如果我们将字段保留为空,则将使用默认条目。 更新用户名和密码后,脚本将确认它已成功。
Once we update the login credentials, our Openlitespeed server is secure to be tested. Now we will start the Openlitespeed server using the command lswsctrl.
一旦我们更新了登录凭证,我们的Openlitespeed服务器就可以安全地进行测试了。 现在,我们将使用命令lswsctrl启动Openlitespeed服务器。
sudo /usr/local/lsws/bin/lswsctrl start
To make our Openlitespeed web server reachable, we need to open the port 8088 and 7080 on the firewall for our server. We do so using the ufw command as shown below.
为了使我们的Openlitespeed Web服务器可访问,我们需要在服务器的防火墙上打开端口8088和7080。 我们使用ufw命令这样做,如下所示。
sudo ufw allow 8088
sudo ufw allow 7080
The port 8088 will serve as the default port for our Openlitespeed web server. Whereas, the port 7080 will govern access to the admin interface.
端口8088将用作我们的Openlitespeed Web服务器的默认端口。 而端口7080将控制对管理界面的访问。
With this, you were successful to install Openlitespeed web server on Ubuntu and set it up. It is time to test our server.
这样,您就可以在Ubuntu上成功安装Openlitespeed Web服务器并进行设置。 现在该测试我们的服务器了。
验证我们的安装 (Verify our installation)
Once we install Openlitespeed webserver on Ubuntu, we need to verify our installation. To do so, simply enter the following in your browser.
在Ubuntu上安装Openlitespeed Web服务器后,我们需要验证安装。 为此,只需在浏览器中输入以下内容。
http://<YourIPAddress>:8088
If your installation and configuration were successful, you should see the page shown above. If you wish to check the admin interface, it can be done by entering this in your browser.
如果安装和配置成功,则应该看到上面显示的页面。 如果您希望检查管理界面,可以通过在浏览器中输入管理界面来完成。
http://<YourIPAddress>:7080
Note: You might be warned of a security risk due to a self-signed certificate. However, you don’t need to worry about it. Simply advance to the web page.
注意:由于自签名证书,可能会警告您存在安全风险。 但是,您无需担心。 只需进入网页即可。
You will be prompted to enter the username and password. Entering the credentials will give you access to the admin interface.
系统将提示您输入用户名和密码。 输入凭据将使您可以访问管理界面。
结论 (Conclusion)
Openlitespeed is a highly optimised web server created by LiteSpeed Technologies. It can be managed through the admin interface available with the server.
Openlitespeed是由LiteSpeed Technologies创建的高度优化的Web服务器。 可以通过服务器随附的管理界面进行管理。
Exploring the default Openlitespeed webpage and the admin interface will provide you numerous methods to configure the server as per your preferences.
浏览默认的Openlitespeed网页和管理界面将为您提供多种方法,根据您的喜好配置服务器。
We hope this tutorial was able to help you install Openlitespeed web server on Ubuntu and set up basic configurations. If you have any feedback, queries or suggestions, feel free to reach out to us in the comments below.
我们希望本教程能够帮助您在Ubuntu上安装Openlitespeed Web服务器并设置基本配置。 如果您有任何反馈,疑问或建议,请随时通过以下评论与我们联系。
翻译自: https://www.journaldev.com/39069/install-openlitespeed-webserver-on-ubuntu
ubuntu的web服务器