#!/bin/bash

function config_system()
{
    groupadd -r 9zm
    useradd -s /sbin/nologin -g 9zm -r 9zm
    echo 'HISTTIMEFORMAT="%F %T "' >> /etc/profile
    echo 'ulimit -c unlimited' >> /etc/profile
    source /etc/profile
    service postfix stop
    echo "alias ll='ls -al --time-style=\"+%Y-%m-%d %H:%M:%S\"'" >> ~/.bashrc
    source ~/.bashrc
    
    echo "/data/dump/core-%e-%p-%t" > /proc/sys/kernel/core_pattern 
    echo "1" > /proc/sys/kernel/core_uses_pid
    
    echo "$Note config system finish !!!!"
}

function apt_soft(){
	apt install -y vim gcc cmake gdb g++ curl wget gradle unzip zip autoconf git subversion rsync lrzsz libtool ntpdate \
	libpcre3 libpcre3-dev zlib1g-dev openssl libssl-dev \
	pkg-config libxml2-dev libsqlite3-dev libcurl4-openssl-dev libgmp-dev expect libncurses5
	# svn 配置覆盖
}

config_system
apt_soft
