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
- Move DHCP config file to a static file
mv /etc/systemd/network/10-dhcp-en.network 10-static-en.network
- 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
- Restart Networking
systemctl restart systemd-networkd.service
Flush DNS Cache
systemctl restart systemd-resolved.service
To Allow SSH:
- Modify /etc/ssh/sshd_config
-
PermitRootLogin yes
-
- 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
- Create docker service daemon if needed
-
mkdir /etc/systemd/system/docker.service.d
-
- Modify /etc/systemd/system/docker.service.d/http-proxy.conf
-
[Service] Environment="HTTP_PROXY=http://<proxyfqdn>:<port>/"
-
- 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