Rocky Linux is a community-driven enterprise Linux distribution that serves as a drop-in replacement for CentOS. This comprehensive guide will walk you through the installation process, system configuration, and post-installation setup for development work.
What is Rocky Linux?
Rocky Linux is a community version of Enterprise Linux that:
- Tracks slightly ahead of the stable release
- Is enterprise-ready and production-grade
- Maintains 1:1 binary compatibility with RHEL
- Is supported by a large, active community
Prerequisites
Before you begin, ensure you have:
- A computer meeting minimum system requirements
- A USB drive (8GB minimum) or blank CD/DVD
- Internet connection for updates
- Basic understanding of Linux concepts
Installation Steps
1. Download and Prepare Installation Media
- Download the Rocky Linux ISO image
- Choose between:
- Minimal ISO (recommended for servers)
- DVD ISO (includes additional packages)
- Create bootable media:
- USB drive using tools like Rufus or Etcher
- CD/DVD using burning software
2. Basic Installation
- Boot from installation media
- Select installation language
- Configure installation destination
- Set up network connection
- Configure system timezone
- Create root password
- Create user account
- Begin installation
3. Disk Partitioning
Here’s a recommended partition layout:
[jeff@localhost ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 8.9M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/rl-root 70G 3.1G 67G 5% /
/dev/md126p1 1014M 236M 779M 24% /boot
/dev/mapper/rl-home 1.8T 13G 1.8T 1% /home
tmpfs 1.6G 0 1.6G 0% /run/user/1000
Post-Installation Configuration
1. System Updates
# Update system packages
sudo dnf update -y
# Reboot if required
sudo reboot
2. Install Essential Tools
Ansible Installation
Ansible is recommended for system automation:
# Install EPEL repository
sudo dnf install -y epel-release
# Install Ansible
sudo dnf install ansible -y
# Verify installation
ansible --version
Development Tools
# Install Git
sudo dnf install git
# Install Node.js and NVM
sudo dnf install nodejs
sudo dnf install nvm
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
3. System Configuration
Set Hostname
# Edit hosts file
vi /etc/hosts
# Add or modify the line:
127.0.0.1 myhostname.domain.com
# Restart hostname service
systemctl restart systemd-hostnamed
# Reboot to apply changes
sudo reboot
Security Considerations
Firewall Configuration
# Check firewall status sudo firewall-cmd --state # Configure firewall rules as needed sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --reload
SELinux
- Enabled by default
- Configure based on security requirements
- Monitor audit logs
System Updates
- Enable automatic updates
- Regular security patches
- Monitor update notifications
Performance Optimization
System Tuning
# Install tuned sudo dnf install tuned # Enable and start tuned service sudo systemctl enable tuned sudo systemctl start tuned
Swap Configuration
- Monitor swap usage
- Adjust if needed
- Consider SSD for swap
Troubleshooting
Common Issues
Boot Problems
- Check BIOS settings
- Verify boot media
- Review system logs
Network Issues
- Check network configuration
- Verify firewall rules
- Test connectivity
Package Management
- Clear DNF cache
- Check repository status
- Verify package signatures