CentOS-8 Mini

https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/

hostnamectl set-hostname CentOS
hwclock
timedatectl
timedatectl set-timezone Asia/Shanghai
/etc/firewalld/firewalld.conf
/usr/lib/firewalld/firewalld.conf
nmcli
vi /etc/sysconfig/network-scripts/ifcfg-ens
nmcli c reload
nmcli c down ens
nmcli c up ens
cat /etc/redhat-release
cd /etc/yum.repos.d
baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
# dnf -y install epel-release
# dnf clean all
# dnf makecache
# dnf repolist
dnf list installed
dnf search 
dnf install
dnf reinstall
dnf remove 
dnf download
dnf info
dnf check-update
dnf grouplist
dnf install vim
dnf install wget
dnf install bash-completion
dnf install net-tools
rpm -qa | grep kernel
dnf erase

httpd
dnf install httpd
sudo systemctl status firewalld
systemctl list-unit-files | grep httpd
chkconfig httpd on  (systemctl enable httpd)
systemctl start httpd
httpd -v
hostname -I | awk ‘{print $1}‘
$ sudo firewall-cmd --permanent --zone=public --add-service=http
$ sudo firewall-cmd --permanent --zone=public --add-service=https
$ sudo firewall-cmd --reload
curl 127.0.0.1:80
/etc/httpd/conf/httpd.conf

dnf install cockpit
systemctl enable cockpit.socket
systemctl start cockpit.socket
firewall-cmd --permanent --add-service=cockpit
firewall-cmd --reload
systemctl status cockpit.socket
ss -tunlp | grep cockpit
netstat -lnp | grep 9090
ps auxf|grep cockpit

dnf install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
which java
ls -lrt /usr/bin/java
ls -lrt /etc/alternatives/java

cat <<EOF | sudo tee /etc/profile.d/java.sh
export JAVA_HOME=/usr/lib/jvm/java-openjdk
export PATH=\$PATH:\$JAVA_HOME/bin
export CLASSPATH=.:\$JAVA_HOME/jre/lib:\$JAVA_HOME/lib:\$JAVA_HOME/lib/tools.jar
EOF

source /etc/profile.d/java.sh

 

vi /etc/profile.d/java.sh

#set java environment
JAVA_HOME=/usr/local/jdk/jdk1.8.0_162
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH

chmod 755 /etc/profile.d/java.sh

source /etc/profile.d/java.sh

 

文章来自:https://www.cnblogs.com/neoo9901/p/12316200.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3