centos 系统初始化

cmd

修改主机名
hostnamectl set-hostname xxx
vi /etc/hosts 

vi  /etc/sysctl.conf 增加
fs.file-max = 655350

vi /etc/security/limits.conf 增加如下内容:
root soft nofile 655350
root hard nofile 655350
root soft nproc 655350
root hard nproc 655350
* soft nofile 655350
* hard nofile 655350
* soft nproc 655350
* hard nproc 655350

vi /etc/systemd/system.conf  与 /etc/systemd/user.conf 增加如下内容
DefaultLimitCORE=infinity
DefaultLimitNOFILE=655350
DefaultLimitNPROC=655350

vi /etc/ssh/sshd_config  搜索Port 改成21688

重启

yum update -y && yum install -y openssl-devel bzip2-devel libffi-devel zsh mysql mysql-devel  && yum install -y git zsh && yum -y install gcc-c++ make nginx epel-release supervisor

安装supervisor: yum install -y epel-release supervisor

安装python:
* yum 安装经常会出现缺少依赖
* 打开官网确认最新版本: https://www.python.org/downloads/
* 修改版本下载源码:wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz
* 编译:./configure --enable-optimizations && make altinstall


安装zsh:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
安装:autojump: git clone git://github.com/joelthelion/autojump.git && cd autojump && python3 install.py
复制 内容到~/.zshrc

安装nodejs: 

* 查看目前推荐使用的版本:https://nodejs.org/en/
* 找到下载对应版本的链接:https://github.com/nodesource/distributions
* 复制命令:` curl -sL https://rpm.nodesource.com/setup_16.x | bash -`
* yum install -y nodejs
* npm install -g tyarn

安装go:

* 复制下载链接:https://golang.google.cn/doc/install
* 按照网页命令执行

ref

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容