centos7 安装常用软件
centos7
1234444444444444444444444444444444444444444444444444
时区 timedatectl set-timezone Asia/Shanghai 设置中文环境 localectl set-locale LANG=zh_CN.utf8
时钟校准 yum -y install ntp systemctl enable ntpd systemctl start ntpd
阿里云装好后, 需要配置一下完全组,添加一个允许80端口进入的规则即可
设置ssh密钥访问: sudo chmod 644 ~/.ssh/authorized_keys
sudo chmod 755 ~/.ssh 填写公钥到 authorized_keys 文件。
然后, 设置禁止密码方式登录。
vim /etc/ssh/sshd_config
#禁用密码验证(最后一行) PasswordAuthentication no #启用密钥验证(中间,默认是注释掉,取消注释) PubkeyAuthentication yes
安装zip,unzip yum install -y zip unzip rsync
安装git2,必须如下方式
curl https://setup.ius.io | sh
yum remove -y git
yum install -y git2u
配置git git config --global core.autocrlf false git config --global core.safecrlf false git config --global user.name '用户名' git config --global user.email '邮箱'
安装composr cd /usr/local/bin curl -s http://getcomposer.org/installer | php chmod a+x composer.phar ln -s composer.phar composer
cd composer --version 配置中国镜像 composer config -g repo.packagist composer https://packagist.laravel-china.org
查看composr全局配置 composer config -g --list
通常,composer的缓存在 /root/.composer/cache composer的全局可执行文件路径 /root/vendor/bin 全局已安装库路径 /root/vendor
家目录 /root/.composer