Installing Swift on Fedora Server

Swift is a highly scalable distributed object storage system designed for large-scale cloud infrastructure. In this tutorial, we will learn how to install Swift on a Fedora server.

Prerequisites

Before we start with the installation process, you need to have the following:

Step 1: Installing the Required Packages

The first thing you need to do is to update the system and install the required packages. You can do this by running the following command:

sudo dnf update -y && sudo dnf install -y centos-release-openstack-rocky epel-release && sudo dnf update -y && sudo dnf group install -y "Development Tools"

This command will update your system and install the necessary packages required for the installation of Swift.

Step 2: Installing Swift

Now, we are ready to install Swift from the official repo. You can do this by running the following command:

sudo dnf install -y python2-swiftclient python-swift python-swiftclient memcached

This command will install the required packages for Swift.

Step 3: Configuring Swift

After installation, we need to configure Swift. Open the configuration file /etc/swift/swift.conf, and update the following values:

[swift-hash]
# random unique string that can never change.  This value should be
# different from the value for SwiftHash (below), but should be consistent
# across all nodes in a cluster.
swift_hash_path_suffix = <random_string>
SwiftHash = <random_string>

[storage-policy:0]
name = Policy-0
default = yes

[swift-constraints]
# maximum size of an object in bytes
max_file_size = 5368709122

# maximum number of objects allowed per container
max_objects_per_container = 1000000

In the above example, you can update the swift_hash_path_suffix and SwiftHash with a random unique string.

Step 4: Starting Swift

After configuration, we can start Swift by running the following command:

sudo systemctl start openstack-swift-proxy.service openstack-swift-account.service openstack-swift-container.service openstack-swift-object.service

This command will start the Swift services.

To enable automatic start of the Swift services on system boot, run the following command:

sudo systemctl enable openstack-swift-proxy.service openstack-swift-account.service openstack-swift-container.service openstack-swift-object.service

Conclusion

Congratulations! You have successfully installed Swift on your Fedora server. You can now integrate Swift with other OpenStack services like Keystone, Glance, and Nova.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!