Centos 8 安装 Nginx Jdk Mysql Redis PHP开发常用工具

系统安装

安装说明:

下载地址:https://mirrors.aliyun.com/centos/

。建议下载 *.minimal.iso即可

  • 建议英文安装
  • 时区选择中国上海
  • 硬盘分区默认auto就可以(auto模式,空间都给了跟目录)
  • 网卡建议设置好,一定要设置成on
  • 这个文章是8.2版本写的,最新的8.3、 8.4 、8.5都适用的

常用操作

WEB管理平台Cockpit

centos8一个改变就是提供了一个web界面管理服务器,这个web服务名称叫Cockpit。 开启命令

systemctl start cockpit.socket
systemctl enable cockpit.socket
可以在浏览器中运行 http://ip:9090

常用命令安装

– netstat 命令安装

dnf install net-tools

时间同步

如果没有安装 请运行 dnf install chrony

vi /etc/chrony.conf

更改时区
timedatectl set-timezone Asia/Shanghai
注释掉
pool 2.centos.pool.ntp.org iburst
加入新的的时间服务器
server 182.92.12.11 iburst
server ntp.aliyun.com iburst


重启服务
systemctl restart chronyd.service
此时时间已经与网络时间同步
设置开机自启
systemctl enable chronyd.service

手工同步一下
chronyc sources -v
离线Rpm包获取
  • 离线包下载,比如mysqld dnf install mysql-server --downloadonly
  • 离线包目录 /var/cache/dnf里面的 /var/cache/dnf/BaseOS-??/packages 或 /var/cache/dnf/AppStream-??/packages
  • 离线安装RPM先运行 rpm --import /etc/pki/rpm-gpg/RPM* 否则提示key错误等

安全设置

Selinue配置(建议关闭)
临时关闭
# 临时关闭
setenforce 0
永久关闭方案
  • 编辑 /etc/sysconfig/selinux
  • SELINUX=enforcing 改为 SELINUX=disabled
防火墙配置
# 开启开机启动/关闭
systemctl enable firewalld.service
systemctl disable firewalld.service
#打开/关闭/重启命令
systemctl start firewalld.service
systemctl stop firewalld.service
systemctl restart firewalld.service
#查询状态
systemctl status firewalld.service

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值