The information below is a living document about the use of VMware’s Photon OS. As always, double-check the official documentation as this page may be out of date over time.

Setting a Static IP

  1. Move DHCP config file to a static file
    mv /etc/systemd/network/10-dhcp-en.network 10-static-en.network
  2. Modify 10-static-en.network with the following as an example. Change the relevant details.
    DHCP=no
    Address=192.168.100.10/24
    Gateway=192.168.100.1
    DNS=192.168.100.1
    DNS=192.168.100.2
    Domains=domain.com
  3. Restart Networking
    systemctl restart systemd-networkd.service

Flush DNS Cache

systemctl restart systemd-resolved.service

To Allow SSH:

  1. Modify /etc/ssh/sshd_config
    • PermitRootLogin yes
  2. Restart SSH Daemon
    • systemctl restart sshd

Updating with TDNF

tdnf makecache
tdnf update

Installing Package with TDNF

tdnf install 

Setting A Proxy for Various Processes

Docker Service

  1. Create docker service daemon if needed
    • mkdir /etc/systemd/system/docker.service.d
  2. Modify /etc/systemd/system/docker.service.d/http-proxy.conf
    • [Service]
      Environment="HTTP_PROXY=http://<proxyfqdn>:<port>/"
  3. Restart Docker services
    systemctl restart docker
    systemctl daemon-reload

TDNF

Modify /etc/tdnf/tdnf.conf

proxy="http://<proxyfqdn>:<port>"

Exports

export http_proxy=http://<proxyfqdn>:<port>/
export https_proxy=https://<proxyfqdn>:<port>/

GIT

git config --global http.proxy $HTTP_PROXY

Sources