您的位置 首页 linux

centos初始化

将yum源配置为阿里云的源

sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sudo yum clean all
sudo yum makecache
sudo yum repolist
sudo yum -y update

安装git

sudo yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm -y
sudo yum install git -y
git --version

安装vim8

sudo yum install epel-release -y # 配置epel源
sudo yum install -y gcc python34 python34-devel ncurses-devel wget libzip bzip2 git # 安装python3,以及vim8.0编译环境
cd /usr/local/src
sudo wget ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2 # 下载vim8.0 建议用迅雷下载,wget下载太慢了
sudo tar -jxf vim-8.0.tar.bz2
cd vim80
sudo make clean
sudo ./configure --prefix=/usr/local/vim --enable-fail-if-missing --enable-python3interp --enable-multibyte --enable-fontset --with-features=huge # 编译安装并支持python3
sudo make
sudo make install
sudo ln -s /usr/local/vim/bin/vim /usr/bin/vim # 建立软链
vim --version # 查看版本

安装 oh-my-zsh

sudo yum -y install zsh
chsh -s /bin/zsh 
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
sudo git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions # 自动提示历史命令的插件
vim ~/.zshrc
# plugins=(
#   git
#   zsh-autosuggestions
#   extract
#   z
# )
source ~/.zshrc

其他工具

sudo yum install net-tools -y

lnmp

下载完整安装包

进入目录,执行 sudo ./install.sh

open_dir 报错处理:

注释 fastcgi.conf 配置

# fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";

如果还报错,查看对应的web目录下是否有 .user.ini 文件,若有,将其删除

自带的default目录下的.user.ini无法删除

本文由钟森龙创作,转载请注明出处:http://zhiqiexing.com/62.html
关注微信
微信扫码关注

微信扫一扫关注我

返回顶部