一个80后
程序员的笔记

Linux基础安装

1、安装一些基础扩展:

hostnamectl set-hostname mydev
yum -y install make cmake gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel patch wget crontabs libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel unzip tar bzip2 bzip2-devel libzip-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel libcurl libcurl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel vim-minimal gettext gettext-devel ncurses-devel gmp-devel pspell-devel unzip libcap diffutils ca-certificates net-tools libc-client-devel psmisc libXpm-devel git-core c-ares-devel libicu-devel libxslt libxslt-devel xz expat-devel libaio-devel rpcgen libtirpc-devel perl
#lsb
yum -y install redhat-lsb

2、常用命令:(这里根据自己习惯修改)

cat >> ~/.bashrc<<EOF
# Source bbhsky definitions
if [ -f ~/.bash_bbhsky ]; then
        . ~/.bash_bbhsky
fi
EOF
cat >> ~/.bash_bbhsky<<EOF
# bbhsky system specific aliases and functions
alias ll='ls -lh'
alias mil='make && make install'
# bbhsky docker specific aliases and functions
alias sd='sudo docker'
alias sdi='sudo docker images'
alias sdp='sudo docker ps'
alias sdpa='sudo docker ps -a'
alias sds='sudo docker stop'
alias sdr='sudo docker rm'
# bbhsky git specific aliases and functions
alias gts='git status'
alias ga='git add .'
alias gcm='git commit -m'
EOF
source .bashrc

3、安装NTP服务以及校对时间:

rm -rf /etc/localtime
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
yum install -y ntp
ntpdate -u ntp1.aliyun.com

4、删除系统原有的服务:

rpm -qa|grep httpd
rpm -e httpd httpd-tools --nodeps
rpm -qa|grep mysql
rpm -e mysql mysql-libs --nodeps
rpm -qa|grep php
rpm -e php-mysql php-cli php-gd php-common php --nodeps

yum -y remove httpd*
yum -y remove mysql-server mysql mysql-libs
yum -y remove php*
yum clean all

5、关闭SELINUX:

sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config

6、安装Git

7、更换源

git clone git@gitee.com:bbhsky/Centos7-setup.git #下载工具包
#  http://mirrors.163.com/.help/centos.html 更多源找这里
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
cp conf/CentOS-Base-163.repo /etc/yum.repos.d/CentOS-Base-163.repo
yum clean all
yum makecache
赞(2) 打赏
未经允许不得转载:笨笨天地 » Linux基础安装
分享到: 更多 (0)

相关推荐

  • 暂无文章

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏