How to Install and Test a Web Server in Chromebook Linux

0

You can easily set up a web server on the Linux environment of your Chromebook, Crostini. Here’s how to do it in three simple steps.


Server racks in data center

The Chromebook Linux (Crostini) environment is a great development tool, and it’s especially good for web development. It’s easy to set up a web server to test your web page directly from your Chromebook before deploying it to a production server. Here’s how.

Step 1: Install a web server on your Chromebook

It’s easy to install any supported web server on your Chromebook, using the standard Debian APT tool. For example, if you wanted to install Apache, you would just run this command:

sudo apt install apache2

If you wanted to install another server, such as Ngnix, you would also use APT:

sudo apt install nginx

APT will then install and start the server you just downloaded.

If you want to make sure it works, there are several ways. You can use top or htop and find the name of the server daemon. You can also use the ps command and grep the output to check if the daemon is running:

ps aux | grep server

Finding an apache server on linux htop

To replace server with the name of the server in the aforementioned command.

You can start and stop your server with the systemctl command. For example, to start Apache, type:

sudo systemctl start apache2.service

Step 2: Find the Linux container IP address


Viewing Chromebook Linux IP Address

Once you’ve confirmed that your server is running, you’ll want to know what IP address the container is connected to. You can do this by running:

USE VIDEO OF THE DAY
ip address

This will list all interfaces in the Linux container. Look for the section that reads “eth0.” The IP address is listed next to “inet.” This is a private address visible only to your Chromebook.

Step 3: Connect to your server


Chromebook Linux Apache test page

The next step is to connect to your server and make sure it is running. It’s very easy. Just put the IP address you got earlier in the Chrome browser and you should see the test page.

You can then start developing your website, placing the files in the default directory that the server will look for, usually in /var/www.

You can now develop and test websites on your Chromebook

You can see how easy it is to install a server for web development on your Chromebook. Note that all of these steps only work on Crostini, which is your Chromebook’s Linux environment. Read on for more information on setting up Linux on your Chromebook.


install-linunx-chromebook
How to Install Linux on a Chromebook

Here’s how to install Linux on your Chromebook so you can start using other apps like Skype, VLC Media Player, and more!

Read more


About the Author

Share.

Comments are closed.