### Example: Install Development Tools Group by Name Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/using-dnf-to-manage-software-packages.html An example demonstrating the installation of the 'Development Tools' software package group by its name. ```shell dnf group install "Development Tools" ``` -------------------------------- ### Example: Install Development Group by ID Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/using-dnf-to-manage-software-packages.html An example demonstrating the installation of the 'development' software package group by its ID. ```shell dnf group install development ``` -------------------------------- ### Install and Start HTTPD Service Source: https://docs.openeuler.org/en/docs/25.03/server/installation_upgrade/installation/using-kickstart-for-automatic-installation.html Install the httpd package and ensure the httpd service is started and enabled to run on boot. ```shell # dnf install httpd -y # systemctl start httpd # systemctl enable httpd ``` -------------------------------- ### Example: Start udsproxyd on Client Source: https://docs.openeuler.org/en/docs/25.03/server/diversified_computing/dpu_offload/libvirt-direct-connection-aggregation-environment-establishment.html An example of starting the udsproxyd service on the client with specific parameters for thread count, IP addresses, and ports. ```bash nohup /usr/bin/udsproxyd 1 192.168.10.10 12121 192.168.10.11 12121 2>&1 & ``` -------------------------------- ### Install lxcfs and lxcfs-toolkit, and start the lxcfs service Source: https://docs.openeuler.org/en/docs/25.03/cloud/container_form/system_container/security-and-isolation.html This snippet shows the commands to install the necessary packages and start the lxcfs service on the host system. Ensure these prerequisites are met before configuring container isolation. ```shell [root@localhost ~]# yum install lxcfs lxcfs-toolkit [root@localhost ~]# systemctl start lxcfs ``` -------------------------------- ### Quick NestOS Installation Source: https://docs.openeuler.org/en/docs/25.03/cloud/nestos/nestos/nestos-for-container.html Execute this command to start the NestOS installation wizard from the live ISO environment. Ensure you are in the live environment before running. ```shell sudo installnestos ``` -------------------------------- ### Start Container with File Handle Limit and Verify Source: https://docs.openeuler.org/en/docs/25.03/cloud/container_form/system_container/maximum-number-of-handles.html This example demonstrates starting a system container with a --files-limit of 1024 and then verifying that the limit is successfully written to the files.limit parameter. It also shows how to execute a command within the container. ```shell [root@localhost ~]# isula run -tid --files-limit 1024 --system-container --external-rootfs /tmp/root-fs empty init 01e82fcf97d4937aa1d96eb8067f9f23e4707b92de152328c3fc0ecb5f64e91d [root@localhost ~]# isula exec -it 01e82fcf97d4 bash [root@localhost ~]# cat /sys/fs/cgroup/files/files.limit 1024 ``` -------------------------------- ### Start a Service Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/service-management.html Use this command to start a service. Replace 'name.service' with the actual service name. Example: starting httpd. ```shell systemctl start name.service ``` ```shell # systemctl start httpd.service ``` -------------------------------- ### Install and Configure TFTP Server Source: https://docs.openeuler.org/en/docs/25.03/server/installation_upgrade/installation/using-kickstart-for-automatic-installation.html Installs the TFTP server, configures its service, and enables it to start on boot. ```shell # dnf install tftp-server -y # vim /etc/xinetd.d/tftp service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 } # systemctl start tftp # systemctl enable tftp # systemctl start xinetd # systemctl status xinetd # systemctl enable xinetd ``` -------------------------------- ### Prepare VM Disk Files Source: https://docs.openeuler.org/en/docs/25.03/cloud/cluster_deployment/kubernetes/preparing-VMs.html Installs qemu-img, defines a storage pool for VM images, builds and starts the pool, and creates various disk images for master and node VMs. ```bash dnf install -y qemu-img virsh pool-define-as vmPool --type dir --target /mnt/vm/images/ virsh pool-build vmPool virsh pool-start vmPool virsh pool-autostart vmPool virsh vol-create-as --pool vmPool --name master0.img --capacity 200G --allocation 1G --format qcow2 virsh vol-create-as --pool vmPool --name master1.img --capacity 200G --allocation 1G --format qcow2 virsh vol-create-as --pool vmPool --name master2.img --capacity 200G --allocation 1G --format qcow2 virsh vol-create-as --pool vmPool --name node1.img --capacity 300G --allocation 1G --format qcow2 virsh vol-create-as --pool vmPool --name node2.img --capacity 300G --allocation 1G --format qcow2 virsh vol-create-as --pool vmPool --name node3.img --capacity 300G --allocation 1G --format qcow2 ``` -------------------------------- ### Run sysHAX Service (dnf install) Source: https://docs.openeuler.org/en/docs/25.03/tools/ai/euler-copilot-framework/xpu_turbo/deploy_guide/deployment.html Start the sysHAX service after installing it using the dnf package manager. ```bash # When installing sysHAX using dnf install sysHAX syshax run ``` -------------------------------- ### Install VM Runtime and Libvirt for Arm Environment Source: https://docs.openeuler.org/en/docs/25.03/server/diversified_computing/dpu_offload/libvirt-direct-connection-aggregation-environment-establishment.html Install necessary packages including qemu, libvirt, and edk2-aarch64 for starting VMs in an Arm environment. This is a prerequisite for libvirt service deployment. ```bash yum install -y qemu libvirt edk2-aarch64 # (required for starting VMs in the Arm environment) ``` -------------------------------- ### Install and Enable MySQL Service Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html Copies the MySQL server startup script to the init.d directory and enables it to start on boot. This is done as root. ```shell cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql chkconfig mysql on ``` -------------------------------- ### Example Output of Environment Activation and Package Installation Source: https://docs.openeuler.org/en/docs/25.03/tools/community_tools/epkg/epkg_use/epkg-package-manager-usage-guide.html Shows the console output when activating environment 't1' and subsequently installing the 'tree' package. This includes messages about path updates, environment activation confirmation, and the download progress of package dependencies. ```shell [root@2d785c36ee2e /]# epkg env activate t1 Add common to path Add t1 to path Environment 't1' activated. Environment 't1' activated. [root@2d785c36ee2e /]# epkg install tree EPKG_ENV_NAME: t1 Caching repodata for: "OS" Cache for "OS" already exists. Skipping... Caching repodata for: "OS" Cache for "OS" already exists. Skipping... Caching repodata for: "everything" Cache for "everything" already exists. Skipping... start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/FF/FFCRTKRFGFQ6S2YVLOSUF6PHSMRP7A2N__ncurses-libs__6.4__8.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/D5/D5BOEFTRBNV3E4EXBVXDSRNTIGLGWVB7__glibc-all-langpacks__2.38__34.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/VX/VX6SUOPGEVDWF6E5M2XBV53VS7IXSFM5__openEuler-repos__1.0__3.3.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/LO/LO6RYZTBB2Q7ZLG6SWSICKGTEHUTBWUA__libselinux__3.5__3.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/EP/EPIEEK2P5IUPO4PIOJ2BXM3QPEFTZUCT__basesystem__12__3.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/2G/2GYDDYVWYYIDGOLGTVUACSBHYVRCRJH3__setup__2.14.5__2.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/HC/HCOKXTWQQUPCFPNI7DMDC6FGSDOWNACC__glibc__2.38__34.oe2409.epkg ############################################################################################################################################################################################################### 100.0% start download https://repo.oepkgs.net/openeuler/epkg/channel/openEuler-24.09/everything/aarch64//store/OJ/OJQAHJTY3Y7MZAXETYMTYRYSFRVVLPDC__glibc-common__2.38__34.oe2409.epkg ############################################################################################################################################################################################################### 100.0% ``` -------------------------------- ### Upgrade OS with System and Upgrade Configurations Source: https://docs.openeuler.org/en/docs/25.03/cloud/kubeos/kubeos/usage-instructions.html Apply system configurations (`sysconfigs`) before reboot and upgrade configurations (`upgradeconfigs`) before the upgrade starts. This example uses containerd and demonstrates setting kernel parameters. ```yaml apiVersion: upgrade.openeuler.org/v1alpha1 kind: OS metadata: name: os-sample spec: imagetype: "" opstype: upgrade osversion: edit.os.version maxunavailable: edit.node.upgrade.number containerimage: "" evictpodforce: true/false imageurl: "" checksum: container image digests flagSafe: false mtls: false sysconfigs: version: edit.os.version configs: - model: kernel.sysctl contents: - key: kernel param key1 value: kernel param value1 - key: kernel param key2 value: kernel param value2 - model: kernel.sysctl.persist configpath: persist file path contents: - key: kernel param key3 value: kernel param value3 - key: "" value: "" upgradeconfigs: version: 1.0.0 configs: - model: kernel.sysctl contents: - key: kernel param key4 value: kernel param value4 ``` -------------------------------- ### Example: Setting VM Memory with Balloon Device Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/stratovirt/vm_management.html Example demonstrating how to set the guest memory size to 2 GiB using the balloon device, assuming the VM was started with 4 GiB. This is useful when the VM has more than 2 GiB of idle memory. ```shell <- {"execute": "balloon", "arguments": {"value": 2147483648}} -> {"return": {}} ``` -------------------------------- ### EulerLauncher Configuration Example Source: https://docs.openeuler.org/en/docs/25.03/tools/community_tools/virtualization/euler_launcher/mac-user-manual.html Example configuration for EulerLauncher, specifying directories for logs, working files, Wget, and QEMU. Set `debug` to `True` for verbose logging. ```ini [default] log_dir = # Log file location (xxx.log) work_dir = # EulerLauncher working directory, which is used to store VM images and VM files. wget_dir = # Path of the Wget executable file. Set this parameter based on the previous step. qemu_dir = # Path of the QEMU executable file. Set this parameter based on the previous step. debug = True ``` -------------------------------- ### Example: Create Database Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html This example creates a new database named 'databaseexample'. ```pgsql > CREATE DATABASE databaseexample; ``` -------------------------------- ### Package Installation Workflow Source: https://docs.openeuler.org/en/docs/25.03/tools/community_tools/epkg/epkg_use/epkg-package-manager-usage-guide.html Demonstrates the basic workflow for creating an environment, installing a package into it, creating a second environment with a specific repository, and installing a package into the second environment. ```bash epkg env create $env # Create an environment. epkg install $package # Install a package in the environment. epkg env create $env2 --repo $repo # Create environment 2, specify a repository. epkg install $package # Install a package in environment 2. ``` -------------------------------- ### Start Plugin API Request Example Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/aops/deploying-aops-agent.html Example of starting a plugin using the AOPS agent API. Requires the plugin name as a query parameter. ```json { "code": 200, "msg": "xxxx" } ``` -------------------------------- ### Select Database Example Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html Example of selecting the 'databaseexample' database using the \c command. ```shell postgres=# \c databaseexample; ``` -------------------------------- ### Start Skylark Service Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/virtualization/skylark.html Starts the Skylark service. This is typically done after installation or configuration changes. ```shell # systemctl start skylarkd ``` -------------------------------- ### Install vLLM Source: https://docs.openeuler.org/en/docs/25.03/tools/ai/euler-copilot-framework/witty_assistant/witty_web/deploy_guide/deployment.html Install the vLLM library for efficient LLM serving. Install the OpenAI compatible web server extension if needed. ```bash pip install vllm ``` ```bash pip install 'vllm[openai]' ``` -------------------------------- ### Example: Create a Role with LOGIN Privilege Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html This example demonstrates creating a role named 'roleexample1' that is allowed to log in. ```shell postgres=# CREATE ROLE roleexample1 LOGIN; ``` -------------------------------- ### Example VM Creation Command Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/stratovirt/vm_management.html This is an example command to create a VM, which can then be used to create a snapshot. ```shell $ stratovirt \ -machine microvm \ -kernel /path/to/kernel \ -smp 1 -m 1024 \ -append "console=ttyS0 pci=off reboot=k quiet panic=1 root=/dev/vda" \ -drive file=/path/to/rootfs,id=rootfs,readonly=off,direct=off \ -device virtio-blk-device,drive=rootfs \ -qmp unix:/path/to/socket,server,nowait \ -serial stdio ``` -------------------------------- ### Install and Start Authz Plugin Service Source: https://docs.openeuler.org/en/docs/25.03/cloud/container_form/system_container/security-and-isolation.html Install the authorization plugin using yum and start its service to enable user permission control for the container engine. This is a prerequisite for configuring user permission policies. ```bash [root@localhost ~]# yum install authz [root@localhost ~]# systemctl start authz ``` -------------------------------- ### Install Firmware for AArch64 Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/stratovirt/interconnect_isula.html Installs the EDK2-AArch64 firmware required for starting a standard VM on AArch64 architecture. ```shell # yum install -y edk2-aarch64 ``` -------------------------------- ### Install Firmware for x86_64 Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/stratovirt/interconnect_isula.html Installs the EDK2-OVMF firmware required for starting a standard VM on x86_64 architecture. ```shell # yum install -y edk2-ovmf ``` -------------------------------- ### Initialize Cloud Environment Source: https://docs.openeuler.org/en/docs/25.03/edge_computing/kube_edge/kubeedge-deployment-guide.html Run the setup script to initialize the cloud environment for KubeEdge deployment. ```bash ./setup-cloud.sh ``` -------------------------------- ### VM Configuration Example (master.xml) Source: https://docs.openeuler.org/en/docs/25.03/cloud/cluster_deployment/kubernetes/preparing-VMs.html This is an example VM configuration file in XML format for libvirt. Ensure unique values for name, nvram, disk source file, and MAC address. ```bash cat master.xml k8smaster0 8 8 hvm /usr/share/edk2/aarch64/QEMU_EFI-pflash.raw /var/lib/libvirt/qemu/nvram/k8smaster0.fd 1 destroy restart restart /usr/libexec/qemu-kvm ``` -------------------------------- ### Example: Download httpd Package with Dependencies Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/using-dnf-to-manage-software-packages.html An example demonstrating the download of the 'httpd' package and its dependencies. ```shell dnf download --resolve httpd ``` -------------------------------- ### Check Other LLVM/Clang Version Installation Source: https://docs.openeuler.org/en/docs/25.03/server/development/application_dev/using-clang-for-compilation.html Check whether the installation of other LLVM/Clang versions is successful, for example, 'clang-15 -v'. ```shell clang-15 -v ``` -------------------------------- ### Setup RPM Build Environment and Download Source Source: https://docs.openeuler.org/en/docs/25.03/server/development/application_dev/building-an-rpm-package.html Sets up the RPM build directory structure and downloads the source code for the GNU Hello World project. ```shell rpmdev-setuptree cd ~/rpmbuild/SOURCES wget http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz ``` -------------------------------- ### Start Gala Anteater Service Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/gala/using-gala-anteater.html Use this command to start the Gala Anteater service. Ensure the service is installed and configured. ```bash systemctl start gala-anteater ``` -------------------------------- ### Start Docker Daemon Source: https://docs.openeuler.org/en/docs/25.03/cloud/container_engine/docker_engine/container-engine.html Use this command to start the Docker daemon if it is installed via RPM or system package management. ```shell systemctl start docker ``` -------------------------------- ### Enable a Service to Start at Boot Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/service-management.html Use this command to configure a service to start automatically when the system boots. Example: enabling httpd. ```shell systemctl enable name.service ``` ```shell # systemctl enable httpd.service ``` -------------------------------- ### Run Tuning Example Source: https://docs.openeuler.org/en/docs/25.03/server/performance/system_optimization/atune/installation-and-deployment.html Execute a tuning command from the examples directory to verify the distributed deployment. Refer to the specific README for details. ```shell atune-adm tuning --project compress --detail compress_client.yaml ``` -------------------------------- ### Restart a Service Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/service-management.html Use this command to stop and then immediately start a service. It also starts the service if it is not running. Example: restarting bluetooth. ```shell systemctl restart name.service ``` ```shell # systemctl restart bluetooth.service ``` -------------------------------- ### Start Gala Gopher Service Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/gala/using-gala-gopher.html Start the gala-gopher service using systemctl. This command assumes gala-gopher has been installed and configured as a systemd service. ```bash # systemctl start gala-gopher.service ``` -------------------------------- ### QCA Server Boot Options Source: https://docs.openeuler.org/en/docs/25.03/server/security/trusted_computing/remote-attestation-kunpeng-security-library.html Starts the QCA server. Ensure the CA path parameter matches the server path. Options control application scenario and server address. ```console -C, --scenario int Sets the application scenario of the program, The default value is sce_no_as(0), 1=sce_as_no_daa, 2=sce_as_with_daa. -S, --server string Specifies the open server address/port. ``` -------------------------------- ### Create Database Example Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html Example of creating a database named 'database1' using the SQL command. ```shell postgres=# CREATE DATABASE database1; ``` -------------------------------- ### Set System to Start with Graphical Interface Source: https://docs.openeuler.org/en/docs/25.03/tools/desktop/ukui/ukui-installation.html After installing UKUI, use this command to configure the system to automatically start with the graphical interface upon reboot. ```shell systemctl set-default graphical.target ``` -------------------------------- ### Client Mount and Setup Script Source: https://docs.openeuler.org/en/docs/25.03/server/diversified_computing/dpu_offload/offload-deployment-guide.html This script prepares the client environment by mounting server directories and necessary file systems for dockerd and containerd. It includes inserting the qtfs kernel module and setting up cgroup mounts. ```bash #!/bin/bash mkdir -p /another_rootfs/var/run/docker/containerd iptables -t nat -N DOCKER echo "---------insmod qtfs ko----------" insmod /YOUR/QTFS/PATH/qtfs.ko qtfs_server_ip= qtfs_log_level=INFO # The proc file system in the chroot environment is replaced by the proc shared file system of the DPU. The actual proc file system of the local host needs to be mounted to **/local_proc**. mount -t proc proc /another_rootfs/local_proc/ # Bind the chroot internal environment to the external environment to facilitate configuration and running. mount --bind /var/run/ /another_rootfs/var/run/ mount --bind /var/lib/ /another_rootfs/var/lib/ mount --bind /etc /another_rootfs/etc mkdir -p /another_rootfs/var/lib/isulad # Create and mount the dev, sys, and cgroup file systems in the chroot environment. mount -t devtmpfs devtmpfs /another_rootfs/dev/ mount -t sysfs sysfs /another_rootfs/sys mkdir -p /another_rootfs/sys/fs/cgroup mount -t tmpfs tmpfs /another_rootfs/sys/fs/cgroup list="perf_event freezer files net_cls,net_prio hugetlb pids rdma cpu,cpuacct memory devices blkio cpuset" for i in $list do echo $i mkdir -p /another_rootfs/sys/fs/cgroup/$i mount -t cgroup cgroup -o rw,nosuid,nodev,noexec,relatime,$i /another_rootfs/sys/fs/cgroup/$i done ## common system dir mount -t qtfs -o proc /proc /another_rootfs/proc echo "proc" mount -t qtfs /sys /another_rootfs/sys echo "cgroup" # Mount the shared directory required by the container management plane. mount -t qtfs /var/lib/docker/containers /another_rootfs/var/lib/docker/containers mount -t qtfs /var/lib/docker/containerd /another_rootfs/var/lib/docker/containerd mount -t qtfs /var/lib/docker/overlay2 /another_rootfs/var/lib/docker/overlay2 mount -t qtfs /var/lib/docker/image /another_rootfs/var/lib/docker/image mount -t qtfs /var/lib/docker/tmp /another_rootfs/var/lib/docker/tmp mkdir -p /another_rootfs/run/containerd/io.containerd.runtime.v1.linux/ mount -t qtfs /run/containerd/io.containerd.runtime.v1.linux/ /another_rootfs/run/containerd/io.containerd.runtime.v1.linux/ mkdir -p /another_rootfs/var/run/docker/containerd mount -t qtfs /var/run/docker/containerd /another_rootfs/var/run/docker/containerd mount -t qtfs /var/lib/kubelet/pods /another_rootfs/var/lib/kubelet/pods ``` -------------------------------- ### Start oeAware Service Source: https://docs.openeuler.org/en/docs/25.03/server/performance/tuning_framework/oeaware/oeaware-user-guide.html Start the oeAware service using the systemd command. This command is used to initiate the oeAware service after installation or configuration changes. ```shell systemctl start oeaware ``` -------------------------------- ### Prepare HTTP Installation Source Source: https://docs.openeuler.org/en/docs/25.03/server/installation_upgrade/installation/using-kickstart-for-automatic-installation.html Mounts the openEuler ISO image and copies its contents to the HTTP server's document root. ```shell # mount openEuler-21.09-aarch64-dvd.iso /mnt # cp -r /mnt/* /var/www/html/openEuler/ ``` -------------------------------- ### Start Open vSwitch Service Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/virtualization/environment-preparation.html Starts the Open vSwitch service, enabling its network virtualization functionalities. This command should be run after the Open vSwitch component has been installed. ```shell systemctl start openvswitch ``` -------------------------------- ### Define and Start VM Source: https://docs.openeuler.org/en/docs/25.03/cloud/cluster_deployment/kubernetes/preparing-VMs.html Defines a VM using an XML file and then starts the VM. Ensure the XML file (e.g., master.xml) is correctly configured. ```shell virsh define master.xml virsh start k8smaster0 ``` -------------------------------- ### NestOS Butane Configuration: Directories, Files, and Symbolic Links Source: https://docs.openeuler.org/en/docs/25.03/cloud/nestos/nestos/nestos-for-container.html This Butane configuration example shows how to create directories, files with specific content and permissions, and symbolic links. It also demonstrates downloading a file from a URL with verification. ```yaml variant: nestos version: 1.0.0 storage: directories: - path: /opt/tools overwrite: true files: - path: /var/helloworld overwrite: true contents: inline: Hello, world! mode: 0644 user: name: dnsmasq group: name: dnsmasq - path: /opt/tools/transmogrifier overwrite: true contents: source: https://mytools.example.com/path/to/archive.gz compression: gzip verification: hash: sha512-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 mode: 0555 links: - path: /usr/local/bin/transmogrifier overwrite: true target: /opt/tools/transmogrifier hard: false ``` -------------------------------- ### Start tprofiling Probe Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/gala/using-gala-gopher.html Use this command to start the tprofiling probe, specifying the events to monitor and processes to snoop. Ensure gala-gopher is installed and Kafka is configured. ```shell curl -X PUT http://:9999/tprofiling -d json='{"cmd": {"probe": ["oncpu", "syscall_file", "syscall_net", "syscall_sched", "syscall_lock"]}, "snoopers": {"proc_name": [{"comm": "java"}]}, "state": "running"}' ``` -------------------------------- ### Start etmem Server and Project Source: https://docs.openeuler.org/en/docs/25.03/server/memory_storage/etmem/etmem-user-guide.html Commands to start the etmem server, add a project configuration, and start the project. Used for observing memory swapping behavior. ```bash etmemd -l 0 -s monitor_app & etmem obj add -f etmem_config -s monitor_app etmem project start -n test -s monitor_app etmem project show -s monitor_app ``` -------------------------------- ### Install and Reboot with Instrumentation Kernel Source: https://docs.openeuler.org/en/docs/25.03/server/development/llvm/kernel_pgo_user_guide.html Installs the newly built instrumentation kernel and sets it as the default for the next reboot. A reboot is required to start using this kernel. ```bash rpm -ivh kernel-6.6.0-1.aarch64.rpm # Note that the file name may vary. grub2-reboot 0 # Specify the newly installed kernel as the boot option for the next reboot. reboot ``` -------------------------------- ### /v1/agent/plugin/start Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/aops/deploying-aops-agent.html Starts a plugin that is installed but not running. Currently, only the gala-gopher plugin is supported. ```APIDOC ## POST /v1/agent/plugin/start ### Description Starts the plug-in that is installed but not running. Currently, only the gala-gopher plug-in is supported. ### Method POST ### Endpoint /v1/agent/plugin/start ### Parameters #### Query Parameters - **plugin_name** (str) - True - Plug-in name ### Request Example Parameter| Value ---|--- plugin_name| gala-gopher ### Response #### Success Response (200) - **code** (int) - Return code - **msg** (str) - Information corresponding to the status code #### Response Example ```json { "code": 200, "msg": "xxxx" } ``` ``` -------------------------------- ### Install QEMU and Wget using Homebrew Source: https://docs.openeuler.org/en/docs/25.03/tools/community_tools/virtualization/euler_launcher/mac-user-manual.html Install QEMU for virtualization and Wget for downloading images using the Homebrew package manager. ```Shell brew install qemu brew install wget ``` -------------------------------- ### Initiate Live Migration via QMP (TCP) Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/stratovirt/vm_management.html Use ncat to connect to the source VM's QMP socket and send the migrate command with the TCP URI. This starts the live migration process. ```shell $ ncat -U path/to/socket1 -> {"QMP":{"version":{"StratoVirt":{"micro":1,"minor":0,"major":0}},"package":""},"capabilities":[]} <- {"execute":"migrate", "arguments":{"uri":"tcp:192.168.0.1:4446"}} -> {"return":{}} ``` -------------------------------- ### Get Application Info API Response Example Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/aops/deploying-aops-agent.html Example response from the AOPS agent API for collecting running application information. Includes a list of running applications. ```json { "code": 200, "msg": "xxxx", "resp": { "running": [ "mysql", "docker" ] } } ``` -------------------------------- ### Install CRI Command Line Tool crictl Source: https://docs.openeuler.org/en/docs/25.03/cloud/container_runtime/kuasar/kuasar-install-config.html Download and install the crictl tool, which is required for starting sandboxes and containers. Choose the appropriate download for your environment (Arm or x86). ```sh # Arm environment $ wget https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.25.0/crictl-v1.25.0-linux-arm64.tar.gz $ tar -zxvf crictl-v1.25.0-linux-arm64.tar.gz -C /usr/local/bin # x86 environment $ wget https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.25.0/crictl-v1.25.0-linux-amd64.tar.gz $ tar -zxvf crictl-v1.25.0-linux-amd64.tar.gz -C /usr/local/bin ``` -------------------------------- ### Example displaying information for httpd package Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/using-dnf-to-manage-software-packages.html An example command to retrieve and display detailed information about the 'httpd' package. ```shell $ dnf info httpd Available Packages Name : httpd Version : 2.4.34 Release : 8.h5.oe1 Arch : aarch64 Size : 1.2 M Repo : Local Summary : Apache HTTP Server URL : http://httpd.apache.org/ License : ASL 2.0 Description : The Apache HTTP Server is a powerful, efficient, and extensible : web server. ``` -------------------------------- ### Configure dracut arguments Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/basic-configuration.html Use dracut_args to specify drivers to omit or install, and to control filesystem check behavior. This example omits specific drivers and installation of chmod, and disables fsck. ```bash dracut_args --omit-drivers "mdio-gpi usb_8dev et1011c rt2x00usb bcm-phy-lib mac80211_hwsim rtl8723be rndis_host hns3_cae amd vrf rtl8192cu mt76x02-lib int51x1 ppp_deflate team_mode_loadbalance smsc911x aweth bonding mwifiex_usb hnae dnet rt2x00pci vaser_pci hdlc_ppp marvell rtl8xxxu mlxsw_i2c ath9k_htc rtl8150 smc91x cortina at803x rockchip cxgb4 spi_ks8995 mt76x2u smsc9420 mdio-cavium bnxt_en ch9200 dummy macsec ice mt7601u rtl8188ee ixgbevf net1080 liquidio_vf be2net mlxsw_switchx2 gl620a xilinx_gmii2rgmii ppp_generic rtl8192de sja1000_platform ath10k_core cc770_platform realte igb c_can_platform c_can ethoc dm9601 smsc95xx lg-vl600 ifb enic ath9 mdio-octeon ppp_mppe ath10k_pci cc770 team_mode_activebackup marvell10g hinic rt2x00lib mlx4_en iavf broadcom igc c_can_pci alx rtl8192se rtl8723ae microchip lan78xx atl1c rtl8192c-common almia ax88179_178a qed netxen_nic brcmsmac rt2800usb e1000 qla3xxx mdio-bitbang qsemi mdio-mscc-miim plx_pci ipvlan r8152 cx82310_eth slhc mt76x0-usb ems_pci xen-netfront usbnet pppoe mlxsw_minimal mlxsw_spectrum cdc_ncm rt2800lib rtl_usb hnae3 ath9k_common ath9k_hw catc mt76 hns_enet_drv ppp_async huawei_cdc_ncm i40e rtl8192ce dl2 qmi_wwan mii peak_usb plusb can-dev slcan amd-xgbe team_mode_roundrobin ste10Xp thunder_xcv pptp thunder_bgx ixgbe davicom icplus tap tun smsc75xx smsc dlci hns_dsaf mlxsw_core rt2800mmi softing uPD60620 vaser_usb dp83867 brcmfmac mwifiex_pcie mlx4_core micrel team macvlan bnx2 virtio_net rtl_pci zaurus hns_mdi libcxgb hv_netvsc nicvf mt76x0u teranetics mlxfw cdc_eem qcom-emac pppox mt76-usb sierra_net i40evf bcm87xx mwifiex pegasus rt2x00mmi sja1000 ena hclgevf cnic cxgb4vf ppp_synctty iwlmvm team_mode_broadcast vxlan vsockmon hdlc_cisc rtl8723-common bsd_comp fakelb dp83822 dp83tc811 cicada fm10 8139t sfc hs geneve hclge xgene-enet-v2 cdc_mbim hdlc asix netdevsim rt2800pci team_mode_random lxt ems_usb mlxsw_pci sr9700 mdio-thunder mlxsw_switchib macvtapatlantic cdc_ether mcs7830 nicpf mdi peak_pci atl1e cdc_subset ipvtap btcoexist mt76x0-common iwldvm bcm7xxx vitesse netconsole epic100 myri10ge r8169 qede microchip_t1 liquidi bnx2x brcmutil mwifiex_sdi mlx5_core rtlwifi vmxnet3 nlmon hns3 hdlc_raw esd_usb2 atl2 mt76x2-common iwlwifi mdio-bcm-unimac national ath rtwpci rtw88 nfp rtl8821ae fjes thunderbolt-net 8139cp atl1 mscc vcan dp83848 dp83640 hdlc_fr e1000e ipheth net_failover aquantia rtl8192ee igbvf rocker intel-xway tg3" --omit "ramdisk network ifcfg qemu-net" --install "chmod" --nofscks ``` -------------------------------- ### System Architecture and OS Configuration Source: https://docs.openeuler.org/en/docs/25.03/virtualization/virtualization_platform/stratovirt/interconnect_libvirt.html Configure VM startup parameters including OS type, kernel, command line, and loader. ```xml ... hvm /home/std-vmlinuxz console=ttyAMA0 root=/dev/vda reboot=k panic=1 rw `/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw` ... ``` -------------------------------- ### AIDE Database Initialization Output Source: https://docs.openeuler.org/en/docs/25.03/server/security/shangmi/file-integrity-protection.html Example output after initializing the AIDE database, showing the database location and checksums for various algorithms including SM3. ```text AIDE initialized database at /var/lib/aide/aide.db.new.gz Number of entries: 64249 --------------------------------------------------- The attributes of the (uncompressed) database(s): --------------------------------------------------- /var/lib/aide/aide.db.new.gz MD5 : a7y5ErdpBAezV2iGdaVleg== SHA1 : u7W7jxomFtZn8rwMlkIRCN0r7iQ= SHA256 : 88Kw5b2yJ9bejwO+NqT6lyAieno+K0+W BPVBjXcUl08= SHA512 : WyOIgRxk9SeSoktF6BYVV0tRL7nGNDKQ A9QyxVCgzg+PwPMV7tzxmwOZI/dB64pP vQ/D2jqJdf3NS2PHMI4yvg== RMD160 : qTEPs2SIxPm3iEwsCnwvp9hR4s4= TIGER : 0HgLucmhCcB56bxOMj+j1Kuja8UIsFRg CRC32 : VKE1TA== WHIRLPOOL : JSA35/NmkMOkUWEpcZJf3PR1UUz5WcLG AmBKPkao3fzQUsLMTJizCV4CwAE0G/Yc KX0mpW5vx+gk3njya8rAvA== GOST : yKjiytOwRr3bJcFsxnJ310t1FY6YE3HB YNT8XP93xpc= STRIBOG256: 9bzS+5j4ZAoU/P7v3tkKOWn4ZfggcX28 9dLQVhaiJtQ= STRIBOG512: 9LLXgqsRIRiXP2WOrOJt1qhx6psfbACd un+GTVmu441quX4zaaPIIG9lzDMBAqMg hZx5DlxsQj3YjMezSUsXLg== SM3 : Vwii+uw3Ge5Hh3eo1KOombxn2jWgyYRX ZdyCRZqWZ/E= End timestamp: 2022-08-12 09:01:25 +0800 (run time: 2m 43s) ``` -------------------------------- ### Example: Create a User with Specific Hostname Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html This example shows how to create a user named 'userexample2' with a specific IP address as the hostname ('192.168.1.100') and a password. ```pgsql > CREATE USER 'userexample2'@'192.168.1.100' IDENTIFIED BY '123456'; ``` -------------------------------- ### Query Software Package Details Source: https://docs.openeuler.org/en/docs/25.03/server/maintenance/common_skills/information-collection.html Get detailed information about a specific installed software package. Replace 'systemd' with the package name you are interested in. ```shell rpm -qi systemd # (systemd is used as an example.) ``` -------------------------------- ### Pkgship System Configuration Example Source: https://docs.openeuler.org/en/docs/25.03/tools/devops/package_manage/pkgship/pkgship.html Example of the package.ini file showing system, log, uwsgi, redis, and database configurations. ```ini [SYSTEM-System Configuration] ; Path for storing the .yaml file imported during database initialization. The .yaml file records the location of the imported .sqlite file. init_conf_path=/etc/pkgship/conf.yaml ; Service query port query_port=8090 ; Service query IP address query_ip_addr=127.0.0.1 ; Address of the remote service. The command line can directly call the remote service to complete the data request. remote_host=https://api.openeuler.org/pkgmanage ; Directory for storing temporary files during initialization and download. The directory will not be occupied for a long time. It is recommended that the available space be at least 1 GB. temporary_directory=/opt/pkgship/tmp/ [LOG-Logs] ; Service log storage path log_path=/var/log/pkgship/ ; Log level. The options are as follows: ; INFO DEBUG WARNING ERROR CRITICAL log_level=INFO ; Maximum size of a service log file. If the size of a service log file exceeds the value of this parameter, the file is automatically compressed and dumped. The default value is 30 MB. max_bytes=31457280 ; Maximum number of backup log files. The default value is 30. backup_count=30 [UWSGI-Web Server Configuration] ; Operation log path daemonize=/var/log/pkgship-operation/uwsgi.log ; Size of data transmitted between the front end and back end buffer-size=65536 ; Network connection timeout interval http-timeout=600 ; Service response time harakiri=600 [REDIS-Cache Configuration] ; The address of the Redis cache server can be the released domain or IP address that can be accessed. ; The default link address is 127.0.0.1. redis_host=127.0.0.1 ; Port number of the Redis cache server. The default value is 6379. redis_port=6379 ; Maximum number of connections allowed by the Redis server at a time. redis_max_connections=10 [DATABASE-Database] ; Database access address. The default value is the IP address of the local host. database_host=127.0.0.1 ; Database access port. The default value is 9200. database_port=9200 ``` -------------------------------- ### Query Servers in Range Source: https://docs.openeuler.org/en/docs/25.03/server/security/trusted_computing/remote-attestation-kunpeng-security-library.html Use the GET method with the /{from}/{to} path to query information about servers within a specified range. Replace {from} and {to} with the start and end IDs of the range. ```shell curl -X GET -H "Content-Type: application/json" http://localhost:40002/1/9 ``` -------------------------------- ### Clone KubeEdge Examples Source: https://docs.openeuler.org/en/docs/25.03/edge_computing/kube_edge/kubeedge-usage-guide.html Download the KubeEdge examples repository to access demo code and configurations. Ensure your GOPATH is set correctly. ```shell [root@ke-cloud ~]# git clone https://github.com/kubeedge/examples.git $GOPATH/src/github.com/kubeedge/examples ``` -------------------------------- ### Diagnose Nginx Service Startup Failure Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/configuring-the-repo-server.html If Nginx fails to start, use this command to get detailed status and error information. Run as the root user. ```shell systemctl status nginx.service --full ``` -------------------------------- ### Example sudoers File Configuration Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/user-and-user-group-management.html This example demonstrates defining user aliases and specifying their command privileges within the `/etc/sudoers` file. ```text #sudoers files #User alias specification User_Alias ADMIN=ted1:POWERUSER=globus,ted2 #user privilege specification ADMIN ALL=ALL POWERUSER ALL=ALL,!/bin/su ``` -------------------------------- ### Configure EulerLauncher Settings Source: https://docs.openeuler.org/en/docs/25.03/tools/community_tools/virtualization/euler_launcher/win-user-manual.html These are example configuration settings for EulerLauncher. Ensure the paths are valid for your system. ```ini log_dir = D:\eulerlauncher-workdir\logs debug = True work_dir = D:\eulerlauncher-workdir image_dir = images instance_dir = instances ``` -------------------------------- ### Verify httpd Server Setup (Linux) Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/configuring-the-web-server.html Use curl to check if the web page is accessible after setting up the httpd server. This confirms successful installation and configuration. ```shell curl http://192.168.1.60 ``` -------------------------------- ### Build Custom NestOS Container Image Source: https://docs.openeuler.org/en/docs/25.03/cloud/nestos/nestos/nestos-for-container.html Example Containerfile (Dockerfile) demonstrating how to customize a NestOS container image by installing additional software packages like 'strace'. Ensure to use 'rpm-ostree install' for package management and end meaningful build commands with 'ostree container commit'. ```dockerfile FROM registry.example.com/nestos:1.0.20240603.0-x86_64 # Perform custom build steps, such as installing software or copying self-built components. # Here, installing the strace package is used as an example. RUN rpm-ostree install strace && rm -rf /var/cache && ostree container commit ``` -------------------------------- ### Example: Create a Role using createuser Source: https://docs.openeuler.org/en/docs/25.03/server/administration/administrator/setting-up-the-database-server.html This example uses the 'createuser' shell command to create a role named 'roleexample3'. ```console [postgres@localhost ~]$ createuser roleexample3 ``` -------------------------------- ### Manual Deployment Menu Source: https://docs.openeuler.org/en/docs/25.03/tools/ai/euler-copilot-framework/witty_assistant/witty_web/deploy_guide/deployment.html Navigate the manual deployment menu to install components step-by-step. Options 3, 4, and 5 can be skipped if model services already exist. ```bash # Select 1 for manual deployment ============================== Main Deployment Menu ============================== 0) One-click Automatic Deployment 1) Manual Step-by-Step Deployment - Existing Model Services 2) Restart Services 3) Uninstall All Components and Clear Data 4) Exit Program ============================== Please enter option number (0-3): 1 # Skip steps 3, 4, 5 and execute sequentially ============================== Manual Step-by-Step Deployment Menu ============================== 1) Execute Environment Check Script 2) Install k3s and helm 3) Install Ollama - Can be skipped if model services already exist 4) Deploy Deepseek Model - Can be skipped if model services already exist 5) Deploy Embedding Model - Can be skipped if model services already exist 6) Install Databases 7) Install AuthHub 8) Install Witty Assistant 9) Return to Main Menu ============================== Please enter option number (1-9): ``` -------------------------------- ### Enable Graphical Boot and Disable GDM Source: https://docs.openeuler.org/en/docs/25.03/tools/desktop/xfce/xfce-installation.html Configures the system to automatically start the graphical interface upon boot and disables the GDM display manager if it was installed by default. ```shell sudo systemctl enable lightdm sudo systemctl set-default graphical.target systemctl disable gdm ``` -------------------------------- ### Query Rubik Version Information (cURL) Source: https://docs.openeuler.org/en/docs/25.03/cloud/hybrid_deployment/rubik/http-apis.html Example cURL command to query the Rubik version. It sends a GET request to the /version endpoint through the Unix domain socket. ```bash curl -XGET --unix-socket /run/rubik/rubik.sock http://localhost/version ``` -------------------------------- ### Configuring Container umask Policy in iSulad Source: https://docs.openeuler.org/en/docs/25.03/cloud/container_engine/isula_container_engine/installation-configuration.html Define the container umask policy for iSulad. This example sets the policy to 'normal', which results in a umask value of 0022 for the started container. ```json "native.umask": "normal" ``` -------------------------------- ### Build and Run SecGear HelloWorld on x86 Source: https://docs.openeuler.org/en/docs/25.03/server/security/secgear/developer-guide.html Build the secGear project and its examples, then run the helloworld application in an x86 environment. Ensure both the Intel SGX SDK environment and the secGear environment scripts are sourced. ```shell // clone secGear repository git clone https://atomgit.com/openeuler/secGear.git // build secGear and examples cd secGear source /opt/intel/sgxsdk/environment && source environment mkdir debug && cd debug && cmake .. && make && sudo make install // run helloworld ./examples/helloworld/host/secgear_helloworld ```