# Oracle Linux mirror (pkg.shecan.ir)

> Mirror of yum.oracle.com: /repo/OracleLinux/OL<n>/... for Oracle Linux 7 to 10 (BaseOS, AppStream, UEK, add-ons) and the keys /RPM-GPG-KEY-oracle-ol<n>.

- Upstream: yum.oracle.com
- Mirror URL: <https://mirror-oracle.pkg.shecan.ir/repo/OracleLinux/>
- Clients: dnf, yum
- Service status: <https://pkg.shecan.ir/status.json> (key `oracle`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/oracle/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/oracle.json>

## Limitations

- dnf and yum still verify the Oracle signatures.
- Repositories that need ULN (Unbreakable Linux Network) access are not available.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### dnf, yum: persistent (user- or system-wide configuration)

Run (linux)

```sh
sudo mkdir -p /root/yum.repos.d.bak && sudo cp /etc/yum.repos.d/*.repo /root/yum.repos.d.bak/
sudo sed -i -E 's,https?://yum\$ociregion\.(\$ocidomain|oracle\.com)/,https://mirror-oracle.pkg.shecan.ir/,; s,https?://yum\.oracle\.com/,https://mirror-oracle.pkg.shecan.ir/,' /etc/yum.repos.d/*.repo
sudo dnf makecache
```

Undo / restore the default (linux)

```sh
sudo cp /root/yum.repos.d.bak/*.repo /etc/yum.repos.d/
```
