CentOS 7 新装服务器部署流程
1、设置时区
rm -f /etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2、配置内网IP (如果是外网IP,linux要修改远程端口)
3、配置自己的yum源
yum install wget
rm -f /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel-7.repo https://mirrors.aliyun.com/repo/epel-7.repo
如何需要最新版本的rpm包,请安装下面的仓库
rpm -Uvh http://repo.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
4、关闭SELinux
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
setenforce 0
5、添加zabbix监控
6、关闭防火墙和NM
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl stop NetworkManager
systemctl disable NetworkManager
7、安装软件包
yum install -y vim openssh-clients ntpdate man lrzsz net-tools
8、时间同步任务
echo "$((RANDOM%60)) $((RANDOM%24)) * * * /usr/sbin/ntpdate time1.aliyun.com" >> /var/spool/cron/root
9、配置主机名
vim /etc/hostname
10、修改文件句柄数
#临时修改,立刻生效
ulimit -n 655350
#永久修改
echo "* soft nofile 655360" >> /etc/security/limits.conf
echo "* hard nofile 655360" >> /etc/security/limits.conf
11、可以禁用ipv6
cat >> /etc/modprobe.d/ipv6.conf <<EOF
alias net-pf-10 off
alias ipv6 off
EOF
12、去除ssh远程DNS认证
sed -i 's/#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config
sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/g' /etc/ssh/sshd_config
systemctl restart sshd
13、配置LDAP客户端
yum install openldap-clients nss-pam-ldapd -y
authconfig --enablemkhomedir \
--disableldaptls \
--enablemd5 \
--enableldap \
--enableldapauth \
--ldapserver=ldap://211.x.x.27:8389 \
--ldapbasedn="dc=wzlinux,dc=com" \
--enableshadow \
--update
14、安装python3(epel方式)
yum install -y python36-setuptools
easy_install-3.6 pip
配置国内pip源
mkdir .pip
cat >> .pip/pip.conf <<EOF
[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple
EOF
15、安装python3(rpm方式)
安装yum源
yum install https://centos7.iuscommunity.org/ius-release.rpm -y
可以安装的版本很多,我们这里安装python3.6
yum install -y python36u python36u-libs python36u-devel python36u-pip
验证
[root@localhost ~]# python3.6
Python 3.6.5 (default, Apr 10 2018, 17:08:37)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
>>>
[root@localhost ~]# pip3.6 -V
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
配置国内pip源
mkdir .pip
cat >> .pip/pip.conf <<EOF
[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple
EOF
CentOS 7 新装服务器部署流程的更多相关文章
- CentOS 6 新装服务器部署流程
1.设置时区 rm -f /etc/localtime cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2.配置内网IP (如果是外网IP,li ...
- Ubuntu 新装服务器部署流程
1.设定时区 rm -f /etc/localtime cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2.配置apt-get源 sed -i ...
- DNS之缓存服务器部署流程
环境介绍 [root@dns ~]# cat /etc/centos-releaseCentOS release 6.6 (Final)[root@dns ~]# ifconfig eth0|sed ...
- centos 搭建SVN服务器简单流程
yum -y install subversion mkdir -p /work/svn && cd /work/svn //创建版本库 svnadmin create test -- ...
- SSM 项目从搭建爬坑到 CentOS 服务器部署 - 速查手册
SSM 项目从搭建爬坑到 CentOS 服务器部署 - 速查手册 提示: (1)CSDN 博客左边有操作工具条上有文章目录 (2)SSM 指 Spring,Spring MVC,MyBatis Mav ...
- CentOS的SVN服务器搭建与自动部署全过程
CentOS的SVN服务器搭建与自动部署全过程 http://www.jb51.net/article/106218.htm authz-db = authz 引起的 svn 认证失败 http:// ...
- 【简书】在阿里云自带的CentOS + LAMP环境下部署一个Laravel项目
在阿里云自带的CentOS + LAMP环境下部署一个Laravel项目 作者 DonnieZero 关注 2017.07.29 22:02* 字数 2218 阅读 5556评论 3喜欢 1赞赏 1 ...
- HappyAA服务器部署笔记1(nginx+tomcat的安装与配置)
这是本人的服务器部署笔记.文章名称叫"部署笔记1"的原因是之后我对这个进行了改进之后,会有"部署笔记2","部署笔记3"...循序渐进,估计 ...
- Kent Beck揭秘Facebook开发部署流程
http://www.infoq.com/cn/news/2013/10/facebook-development-deployment Facebook是世界上最大的社交网站,有超过10亿用户每月至 ...
随机推荐
- react添加富文本
import {Editor} from 'react-draft-wysiwyg'import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'i ...
- CSS3 过渡 (transition )
transition 属性是一个简写属性,用于设置四个过渡属性: 1.transition-property 设置过渡效果的 CSS 属性的名称.一般写all 2.transition-durat ...
- 如何在Processing中调用Windows应用程序
Processing调用了exe就意味着失去了跨平台.调用的过程是,先得到当前的runtime,然后调用runtime的exec()方法,在exec()传入的是字符串参数,这个参数很重要,该有空格的地 ...
- (1)Angular的开发
流行的ReactNative.Node.js.Angular.js.RXjs等技术 H5视频直播 ReactNative应用 JavaScript的新语法 高性能服务端框架 Webpack支撑大规模应 ...
- shell脚本编程之变量简介及脚本执行过程
脚本变量简介 变量类型:字符型.数值型.真.假:事先确定数据的存放格式和长度: 变量存放在内存空间: 编译型语言,没有额外的处理逻辑,属于强类型语言: 脚本型语言,可以有解释器控制:所以,可以是弱类型 ...
- LOJ#565. 「LibreOJ Round #10」mathematican 的二进制 分治,FFT,概率期望
原文链接www.cnblogs.com/zhouzhendong/p/LOJ565.html 前言 标算真是优美可惜这题直接暴力FFT算一算就solved了. 题解 首先,假装没有进位,考虑解决这个问 ...
- 在应用中显示的图片很多情况不满足业务需求,我们需要动态根据图片的宽高进行缩放或加载中显示的缺省图片,这是我没就需要监听图片加载完成回调,来看看微信小程序怎么实现图片加载完成回调。
<swiper-item> <image src="{{item.image}}" class="slide-image" mode=&quo ...
- 震惊,hexo个人博客居然有这么方便的评论系统
论文搞得一头火,瞎倒腾了一下,没想到几分钟给自己的博客换了个评论系统. 之前用的gitalk,需要依赖github,死活没有成功,而且评论者还需要登录github才可以评论,不好用,刚才偶然间发现va ...
- 范仁义html+css课程---2、html常用标签
范仁义html+css课程---2.html常用标签 一.总结 一句话总结: html常用的标签有 标题标签.div.span.p.hr.br标签 等 1.html中的标题标签有哪些? <h1& ...
- arcgis python 异常处理
import arcpy in_features = "c:/base/transport.gdb/roads" try: # Note: CopyFeatures will al ...