• Linux基本配置(centos_7)


    基础命令

    • yum
    • wget
    • tar
    • sz/rz
    yum install lrzsz
    • zip/unzip
    yum install zip yum install unzip
    • git
    yum -y install git
     
    #配置用户名与邮箱
    git config --global user.name "yourname"
    git config --global user.email "youremail"

     

     
     
    基础语言/usr/local/languages
    • go
    wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz
    tar -zxvf go1.14.linux-amd64.tar.gz
    mkdir gopath
    #配置环境变量,见文件详情
    • java
    wget https://download.oracle.com/otn/java/jdk/8u241-b07/1f5b5a70bf22433b84d0e960903adac8/jdk-8u241-linux-x64.tar.gz?AuthParam=1584250180_36a6458a2b11880c19853cda2aa9a7e2
    tar -zxvf jdk-8u241-linux-x64.tar.gz?AuthParam=1584250180_36a6458a2b11880c19853cda2aa9a7e2
    #配置环境变量,见文件详情
    • python
    wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
    tar -zxvf Python-3.6.6.tgz mv Python-3.6.6 python-3.6.6 cd python-3.6.6
    yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel ./configure --prefix=/usr/local/languages/python-3.6.6
    make
    make install
    #配置环境变量,见文件详情
    ln -s /usr/local/languages/python-3.6.6/bin/python3.6 /usr/local/bin/python3
      配置文件 
    vim /etc/profile 
    #把下面的内容跟新进去
    source /etc/profile
     
    #go
    #安装目录
    export GOROOT=/usr/local/languages/go
    export PATH=${GOROOT}/bin:$PATH
    #工作目录
    export GOPATH=/usr/local/languages/gopath
    export PATH=${GOPATH}/bin:$PATH
    #java
    JAVA_HOME=/usr/local/languages/jdk1.8.0_241
    JRE_HOME=/usr/local/languages/jdk1.8.0_241/jre
    CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
    export JAVA_HOME JRE_HOME CLASS_PATH PATH
    #python
    export PYTHON_HOME=/usr/local/languages/python-3.6.6
    export PATH=$PYTHON_HOME/bin:$PATH

     

     

    工具 /usr/local/tools
    • mysql
    wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
    tar -zxvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz 
    #咱去阿里云买个吧好么
    • redis
    wget http://download.redis.io/releases/redis-5.0.8.tar.gz
    tar -zxvf redis-5.0.8.tar.gz cd redis-5.0.8
    make
    cd src
    make install
    cp -r mkreleasehdr.sh redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-server ../bin/
    cd ../bin
    ./redis-serve ../redis.conf

      redis 命令

    #登录redis,修改配置文件
    ./redis-cli -h 127.0.0.1
    #修改redis的守护进程为no ,不启用
    127.0.0.1:6379> config set daemonize "no"
    OK
    #修改redis的保护模式为no,不启用
    127.0.0.1:6379> config set protected-mode "no"
    OK
    #修改redis的端口
    127.0.0.1:6379> config set port "9000"
    OK
    #修改redis只读
    127.0.0.1:6379> config set slave-read-only "slave-read-only yes"
    OK
     
  • 相关阅读:
    vivado工程移植
    Search Everything 多项查找
    RTL_代码覆盖率
    在ARTIX-7上实现摄像头视频通路
    转:自动生成testbench
    转:winedt中显示中文
    Zynq和microblaze的区别
    转:找不到include xgpio.h;Unresolved include xgpio.h
    DHTMLX 常用技术
    Ubuntu中安装 mercurial – TortoiseHG
  • 原文地址:https://www.cnblogs.com/feizisy/p/11277930.html
Copyright © 2020-2023  润新知