Linode Library Home
Linode Library RSS Feed
Home :: Web Servers :: Nginx :: Installation
Print View View Source

Websites with Nginx on Arch Linux

Published: by

Nginx is a lightweight and high performance web server, designed with the purpose of delivering large amounts of static content quickly and with efficient use of system resources. In contrast to the Apache HTTP server, which uses a threaded or process-oriented approach to handling requests, nginx uses an asynchronous event-driven model to provide more predictable performance under load.

Before you begin installing the nginx web server, it is assumed that you have followed our getting started guide. If you're new to Linux server administration, you may be interested in our using Linux document series including the beginner's guide and administration basics guide.

Contents

Set the Hostname

Before you begin installing and configuring the components described in this guide, please make sure you've followed our instructions for setting your hostname. Issue the following commands to make sure it is set properly:

hostname
hostname -f

The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).

Installing nginx

Nginx is included in the Arch Linux software repositories. Issue following sequence of commands ensure that your system's package manager and databases are up to date:

pacman -Sy
pacman -S pacman

Install the nginx web server by issuing the following command:

pacman -S nginx

Edit the /etc/rc.conf file, adding "nginx" to the "DEAMONS=" line as shown in the following excerpt:

File excerpt:/etc/rc.conf

DAEMONS=(syslog-ng network netfs crond sshd ntpd nginx)

To start the server for the first time, use the following command:

/etc/rc.d/nginx start

Congratulations! You now have a running and fully functional HTTP server powered by nginx. Continue reading our introduction to basic nginx configuration for more information about using and setting up the web server.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

Creative Commons License

This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.

Last edited by Alex Fornuto on Thursday, March 27th, 2014 (r4357).