阿东的笔记_  工具
## ubuntu 20.04 开发环境安装 docker+docker-compose+node+php7.4+必要设置 ``` Bash # sudo 命令免密 sudo visudo # 在最后添加一行 adong 当前用户名 adong ALL=(ALL) NOPASSWD: ALL apt-get update && apt-get upgrade -y # 安装docker curl -sSL https://get.daocloud.io/docker | sh # 安装docker-compose sudo curl -L "https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose # 配置docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://7tvcne82.mirror.aliyuncs.com"] } EOF # docker 用户权限问题 sudo usermod -aG docker $USER newgrp docker sudo chmod 666 /var/run/docker.sock # 重启 docker sudo systemctl restart docker #安装 node 16.x curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt install nodejs -y # 安装 php7.4 apt-get install software-properties-common -y add-apt-repository ppa:ondrej/php -y apt-get install php7.4 php7.4-swoole php7.4-xml -y # 终端配置 zsh sudo apt-get install -y zsh sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" chsh -s /bin/zsh git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh # git git config --global user.name "adong" git config --global user.email "xxxx@xxxx.com" git config --global credential.helper store # python 安装 , 下载最新版本 wget https://www.python.org/ftp/python/3.7.15/Python-3.7.15.tgz mkdir /usr/local/python3.10 # 进入下载包的目录 ./configure --prefix=/usr/local/python3.10 make make install ln -s /usr/local/python3.10/bin/python3.10 /usr/bin/python3.10 ln -s /usr/local/python3.10/bin/pip3 /usr/bin/pip3.10 pip3.10 config set global.index-url https://pypi.douban.com/simple/ # done 搞定,愉快的开发了 ```
adddge@sohu.com  | 桂ICP备2022009838号-2