How to install Cockpit web console on CentOS
Cockpit is pre-installed on CentOS and can be enabled with sudo systemctl enable --now cockpit.socket, starting the service on port 9090.Allow access by running sudo firewall-cmd --permanent --add-service=cockpit and reload with sudo firewall-cmd --reload.Access the web interface via http://your-server-ip:9090 using system credentials, ensuring SELinux is enforcing and port 9090 is reachable.
Cockpit is a lightweight, web-based server management tool that makes it easy to monitor and administer CentOS systems. It provides a clean interface for managing services, storage, networks, containers, and user accounts. Installing Cockpit on CentOS is straightforward and can be done in just a few steps.
Enable and Start Cockpit Service
Cockpit is included in CentOS by default, so you don’t need to install additional repositories in most cases. First, ensure the service is enabled and running:
- Run sudo systemctl enable --now cockpit.socket to enable and start the Cockpit socket
- This command activates the web console and sets it to start automatically on boot
- The service runs on port 9090 by default
Configure Firewall Access
To access Cockpit from a remote browser, you must allow traffic through the firewall:
- Use sudo firewall-cmd --permanent --add-service=cockpit to open the required port
- Then reload the firewall with sudo firewall-cmd --reload
- This permits access to the web interface from other machines on the network
Access the Web Interface
Once installed and configured, open a web browser and navigate to:
- http://your-server-ip:9090
- Log in using your system’s username and password (must have sudo or appropriate permissions)
- You’ll see an overview of system resources, logs, and available administration tools
Make sure SELinux is in enforcing mode and up to date, as Cockpit works best when security policies are active. If you’re behind a corporate firewall or NAT, ensure port 9090 is accessible and not blocked.
Basically just enable the service, adjust the firewall, and log in. No extra packages needed on standard CentOS installations.
The above is the detailed content of How to install Cockpit web console on CentOS. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

ArtGPT
AI image generator for creative art from text prompts.

Stock Market GPT
AI powered investment research for smarter decisions

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Uninstall the old version of Docker to avoid conflicts, 2. Install yum-utils and add the official Docker repository, 3. Install DockerCE, CLI and containerd, 4. Start and enable Docker services, 5. Run hello-world image to verify that the installation is successful, 6. Optionally configure non-root users to run Docker.

First add the official PostgreSQL repository, then disable the system's own modules and install the PostgreSQL server and client. After initializing the database, start the service and set up the power-on self-start. Then configure the authentication method and network access permissions, and finally restart the service to make the configuration take effect.

The chmod command is used to modify the permissions of files and directories in CentOS, supports symbol mode and digital mode, and can achieve the principle of minimum permissions by reasonably setting read, write and execute permissions, improving system security.

Startbycheckingnetworkinterfacestatuswithipaddrshow,ensureit'sUPandhasavalidIP;ifdown,bringitupusingiplinksetup.Verifyconnectivitybypingingthegateway(foundviaiproute|grepdefault)andapublicIPlike8.8.8.8totestlocalandexternalreachability.IfIPpingsworkb

Cockpitispre-installedonCentOSandcanbeenabledwithsudosystemctlenable--nowcockpit.socket,startingtheserviceonport9090.Allowaccessbyrunningsudofirewall-cmd--permanent--add-service=cockpitandreloadwithsudofirewall-cmd--reload.Accessthewebinterfaceviahtt

Createa2GBswapfileusingddif=/dev/zeroof=/swapfilebs=1Mcount=2048.2.Setpermissionswithchmod600/swapfile.3.Formatasswapusingmkswap/swapfile.4.Enablewithswapon/swapfile.5.Makepermanentbyadding/swapfilenoneswapsw00to/etc/fstab.6.Optionallysetvm.swappines

First,checkinternetandDNSconnectivityusingpingandnslookup;iffailed,update/etc/resolv.confwithvalidDNSservers.Thencleanyumcachewith"yumcleanall",remove/var/cache/yum,andregeneratemetadatavia"yummakecache".Next,verifyrepositoryfiles

Setrootpasswordwithsudopasswdroot,edit/etc/ssh/sshd_configtosetPermitRootLoginyesandPasswordAuthenticationyes,thenrestartSSHviasudosystemctlrestartsshd,testingnewaccessbeforeclosingcurrentsession.
