centos6安装完成之后必要的配置
centos6安装完成之后必要的配置
一配置yum源
[root@centos61 ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
--:--:-- --:--:-- --:--:--
[root@centos61 ~]# cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=
enabled=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=
enabled=
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
[root@centos61 ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
---- ::-- http://mirrors.aliyun.com/repo/epel-6.repo
Resolving mirrors.aliyun.com... 117.161.115.189, 117.161.115.192, 117.161.115.190, ...
Connecting to mirrors.aliyun.com|117.161.115.189|:... connected.
HTTP request sent, awaiting response... OK
Length: [application/octet-stream]
Saving to: “/etc/yum.repos.d/epel.repo” %[==============================================================>] --.-K/s in 0s -- :: ( MB/s) - “/etc/yum.repos.d/epel.repo” saved [/]
[root@centos61 yum.repos.d]# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux - $basearch
baseurl=http://mirrors.aliyun.com/epel/6/$basearch
failovermethod=priority
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 [epel-debuginfo]
name=Extra Packages for Enterprise Linux - $basearch - Debug
baseurl=http://mirrors.aliyun.com/epel/6/$basearch/debug
failovermethod=priority
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck= [epel-source]
name=Extra Packages for Enterprise Linux - $basearch - Source
baseurl=http://mirrors.aliyun.com/epel/6/SRPMS
failovermethod=priority
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=
[root@centos61 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base CentOS- - Base - mirrors.aliyun.com ,
epel Extra Packages for Enterprise Linux - x86_64 ,
extras CentOS- - Extras - mirrors.aliyun.com
updates CentOS- - Updates - mirrors.aliyun.com
repolist: ,
[root@centos61 yum.repos.d]# ls
bak base.repo CentOS-Base.repo epel.repo
[root@centos61 yum.repos.d]# pwd
/etc/yum.repos.d
二安装必要的软件包
[root@centos61 ~]# yum install -y vim tree telnet nc nmap net-tools wget bash-completion lrzsz chrony bc
[root@centos61 ~]# yum install bash-completion
Loaded plugins: fastestmirror
Setting up Install Process
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch :1.3-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ========================================================================================================
Package Arch Version Repository Size
========================================================================================================
Installing:
bash-completion noarch :1.3-.el6 epel k Transaction Summary
========================================================================================================
Install Package(s) Total download size: k
Installed size: k
Is this ok [y/N]: y
Downloading Packages:
bash-completion-1.3-.el6.noarch.rpm | kB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : :bash-completion-1.3-.el6.noarch /
Verifying : :bash-completion-1.3-.el6.noarch / Installed:
bash-completion.noarch :1.3-.el6 Complete!
[root@centos61 ~]#
三创建目录
存放shell脚本文件/shell_scripts
[root@centos61 ~]# mkdir /shell_scripts,/app
mkdir: cannot create directory `/shell_scripts,/app': No such file or directory
[root@centos61 ~]# ls /
app boot etc lib lost+found mnt proc sbin srv tmp var
bin dev home lib64 media opt root selinux sys usr
[root@centos61 ~]# mkdir /shell_scripts
[root@centos61 ~]# mkdir /app/
mkdir: cannot create directory `/app/': File exists
[root@centos61 ~]# ls /app/
lost+found
[root@centos61 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 % /
tmpfs % /dev/shm
/dev/sda3 % /app
/dev/sda1 % /boot
/dev/sr0 % /mnt
[root@centos61 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 : .7G rom /mnt
sda : 200G disk
├─sda1 : 1G part /boot
├─sda2 : .8G part /
├─sda3 : .5G part /app
├─sda4 : 1K part
└─sda5 : 2G part [SWAP]
[root@centos61 ~]#
四设置别名
[root@centos61 ~]# tail - /etc/bashrc
alias vinet0='vim /etc/sysconfig/network-scripts/ifcfg-eth0'
alias catnet0='cat /etc/sysconfig/network-scripts/ifcfg-eth0' [root@centos61 ~]# . /etc/bashrc
[root@centos61 ~]# alias
alias catnet0='cat /etc/sysconfig/network-scripts/ifcfg-eth0'
alias cp='cp -i'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias vinet0='vim /etc/sysconfig/network-scripts/ifcfg-eth0'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
centos6安装完成之后必要的配置的更多相关文章
- Centos6 安装 Redis 和集群配置
Redis安装 先确认gcc和tcl已经安装 sudo yum install gcc-c++ sudo yum install tcl 解压, 编译和安装 .tar.gz /usr/src/ cd ...
- Centos6安装SGE以及集群配置
最近给实验室的服务器集群安装SGE,摸索了一天多,踩了好些坑,现在将其安装和配置过程记录下来,以免以后需要使用时又忘记了. 一.准备工作 1.关闭集群中所有节点的防火墙 #service iptabl ...
- centos6 安装配置ss笔记
2018-05-17 centos6 安装配置ss笔记 操作环境:Centos 6 x86_64 bbr 服务器地址:美国 1.准备VPS 在https://www.bwh1.net可购买,购买时已默 ...
- CentOS6安装各种大数据软件 第四章:Hadoop分布式集群配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- CentOS6安装各种大数据软件 第九章:Hue大数据可视化工具安装和配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- CentOS6安装各种大数据软件 第八章:Hive安装和配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- CentOS6安装各种大数据软件 第七章:Flume安装与配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- CentOS6安装各种大数据软件 第六章:HBase分布式集群的配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
- CentOS6安装各种大数据软件 第五章:Kafka集群的配置
相关文章链接 CentOS6安装各种大数据软件 第一章:各个软件版本介绍 CentOS6安装各种大数据软件 第二章:Linux各个软件启动命令 CentOS6安装各种大数据软件 第三章:Linux基础 ...
随机推荐
- v-if指令
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...
- Ubuntu安装byzanz截取动态效果图
byzanz-record主要参数选项 用法: byzanz-record [选项...] 录制您的当前桌面会话 帮助选项: -?, --help 显示帮助选项 --help-all 显示全部帮助选项 ...
- 记boost协程切换bug发现和分析
在分析了各大开源协程库实现后,最终选择参考boost.context的汇编实现,来写tbox的切换内核. 在这过程中,我对boost各个架构平台下的context切换,都进行了分析和测试. 在maco ...
- Pikachu漏洞练习平台实验——越权漏洞(八)
1.概述 由于没有对用户权限进行严格的判断 导致低权限的账号(比如普通用户)可以去完成高权限账号(比如超管)范围内的操作 水行越权:A用户和B用户属于同一级别用户,但各自不能操作对方个人信息.A用户如 ...
- Linux服务正常启动,Linux服务器能访问,但是外部机器不能访问
公司用到了jenkins,就在自己虚拟机里面部署了一个jenkins.部署成功之后,在Linux虚拟机里面能正常访问,但是外部真实机却不能访问.当时的第一反应就是觉得应该是权限问题,猜测会不会是jen ...
- kmp(暴力匹配)
http://poj.org/problem?id=3080 Blue Jeans Time Limit: 1000MS Memory Limit: 65536K Total Submission ...
- bzoj1779 [Usaco2010 Hol]Cowwar 奶牛战争(网络流)
1779: [Usaco2010 Hol]Cowwar 奶牛战争 Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 302 Solved: 131[Sub ...
- Oracle 汉字占用字节数
在oracle中一个字符特别是中文字符占几个字节是与字符集有关的. 比如GBK,汉字就会占两个字节,英文1个:如果是UTF-8,汉字一般占3个字节,英文还是1个.但是一般情况下,我们都认为是 ...
- [转载]Linux上使用ssl进行端口转发
原文地址:Linux上使用ssl进行端口转发 作者:呼延十 背景介绍 作为一个后端程序员,经常要和别人联调接口,每当这时,总是被公司的各种,dev,qa,pre,prod环境搞得头疼,,,我真的只是想 ...
- Python Web开发:Django+BootStrap实现简单的博客项目
创建blog的项目结构 关于如何创建一个Django项目,请查看[Python Web开发:使用Django框架创建HolleWorld项目] 创建blog的数据模型 创建一个文章类 所有开发都是数据 ...