js333 > 计算机互联网 > Debian系统初装后的各种配置,重新编译Kubuntu

原标题:Debian系统初装后的各种配置,重新编译Kubuntu

浏览次数:152 时间:2019-11-04

exim是生龙活虎款管见所及的邮件发送软件, 用自带的apt-get安装的exim4版本是不援助DKIM,大家亟须要对其源码实行改建才行。
这里介绍一下在debian情形下对exim实行DKIM(DomainKeys Identified Mail卡塔尔邮件签名的协助。

近些日子时时重装系统,而刚装完Debian系统的微型机必要各类配置真心有一些烦躁,于是乎想写个本子偷偷懒,解决一下每一回装系统都要重新配置的主题材料(在此享受给大家,也简化了富贵人家装Debian后麻烦的布署进度卡塔 尔(英语:State of Qatar)。

%1,安装软件包:

# apt-get install libdkim-dev dpatch

风姿罗曼蒂克、使用形式

sudo apt-get install fakeroot dpkg-dev libncurses5-dev kernel-package

在/etc/apt/sources.list中添加:

  1. 下载作者打包的文件new_machine.tar ,然后在本人的云盘分享处下载Linux的wps安装包(笔者本身会在Debian系统中动用WPS,那样能够轻便在Linux中对文书档案进行改变,要是直接Libreoffice对Windows下的文书档案进行更正,将来再获得Windows下开垦时排版都会全乱了卡塔 尔(阿拉伯语:قطر‎

%2,创建source directory

deb-src lenny main contrib non-free

相关下载地址:

mkdir ~/src

增多需求的软件:

百度网盘无偿下载地址:

cd ~/src

# cd /usr/src
# apt-get --force-yes -y install build-essential devscripts docbook-xsl xsltproc docbook-xml libpcre3-dev libldap2-dev libpam0g-dev libident-dev libdb4.6-dev libxmu-dev libxt-dev libxext-dev libx11-dev libxaw7-dev libpq-dev libmysqlclient15-dev libsqlite3-dev libperl-dev libgnutls-dev libsasl2-dev
# apt-get source exim4
# cd exim4-4.69/
# fakeroot debian/rules unpack-configs

  1. cd ~/Download  ---> tar -xvf new_machine.tar 踏向下载目录解压new_machine.tar文件

%3,下载内核源码

然后复制配置文件

3.cd new_machine

apt-get source linux-image-$(uname -r)

# cp EDITME.exim4-heavy EDITME.exim4-custom
# echo "EXPERIMENTAL_DKIM=yes" >> EDITME.exim4-custom
# echo "LDFLAGS += -ldkim" >> EDITME.exim4-custom
# fakeroot debian/rules pack-configs

4.mv ~/Download/wps-office_8.1.0.3724~b1p2_i386.deb  .

%4,配置基本

修改
vi debian/rules
找到extradaemonpackages这行,修改为:
extradaemonpackages=exim4-daemon-heavy exim4-daemon-custom
为了让exim找到libdkim,还需要

5.ifconfig 也许ping www.bkjia.com确认计算机是不是联网

cd linux-3.0.0

echo "80_libdkim_patch" >> debian/patches/00list
cd debian/patches
wget '' -O - |
  cat >> 80_libdkim_patch.dpatch

6.su 切换至 root 用户

make menuconfig

形成上述步骤,并无提醒出错i后就能够编译了

7.chmod +x install.sh  --->  ./install.sh  好了,脚本会安装非常多事物,所以那时您能够去用餐依旧打球去了!

%5,加快创设

debuild -uc -us

二、脚本体现

export CONCURRENCY_LEVEL=3

自此就足以获得安装包了:

初读书人写的比较简单,有好的建议还望我们提议来:

平常来说, concurrency level = number of processor cores + 1

# ls ../*.deb | grep exim4
../exim4_4.69-7_all.deb
../exim4-base_4.69-7_amd64.deb
../exim4-config_4.69-7_all.deb
../exim4-daemon-custom_4.69-7_amd64.deb
../exim4-daemon-custom-dbg_4.69-7_amd64.deb
../exim4-daemon-heavy_4.69-7_amd64.deb
../exim4-daemon-heavy-dbg_4.69-7_amd64.deb
../exim4-daemon-light_4.69-7_amd64.deb
../exim4-daemon-light-dbg_4.69-7_amd64.deb
../exim4-dbg_4.69-7_amd64.deb
../exim4-dev_4.69-7_amd64.deb
../eximon4_4.69-7_amd64.deb

#!/bin/bash
# (C) 2014 Yunlong Zhou <[email protected]>
# Under licence  GPL
# File : install.sh
# Introduction:
#   This script is using for simplify the installing of Debian 5/6/7 new install machine
# Useage :
#    1. "su"   -- get root permission
#   2. "ifconfig" or "ping www.baidu.com " -- to check if the computer is connecting Internet
#  3. if have no Internet , "dhclient eth0" -- to connect the Internet
#  4. "tar -xvf new_machine.tar"  then "cd new_machine"
#  5. "chmox +x install.sh"   -- give our script a execution permission
#  5. "./install.sh"  -- auto install and you can have a coffee now   

%6,清理一时文件

安装包的相继
dpkg -i exim4-config*.deb
dpkg -i exim4-base*.deb
dpkg -i exim4-daemon-light*.deb
dpkg -i daemon-custom*.deb
末尾,改正配置文件/etc/exim4/exim4.conf.template在remote_smtp 处
添加:

# firstly ,we set the apt-source, here we just give Debian 5/6/7 set module, if you use older or newer Debian version ,Just do a little change !
 echo "Now setting apt source"
 if grep -q "7.*" /etc/debian_version || grep -q -i "wheezy" /etc/debian_version ; [[ $? == 0 ]] ; then
  echo "deb wheezy main contrib non-free" >/etc/apt/sources.list
 elif grep -q "6.*" /etc/debian_version || grep -q -i "squeeze" /etc/debian_version ; [[ $? == 0 ]] ; then
    echo "deb squeeze main contrib non-free" >/etc/apt/sources.list 
 elif grep -q "5.*" /etc/debian_version || grep -q -i "lenny" /etc/debian_version ; [[ $? == 0 ]] ; then
    echo "deb lenny main contrib non-free" >/etc/apt/sources.list 
 fi 
 apt-get update
 
 # add chinese fonts and ibus,if you don't need ,just comment it
 echo "Now doning Chinese install"
 echo Y | apt-get install ttf-wqy-zenhei xfonts-intl-chinese wqy*  ibus im-switch ibus-pinyin 
 
 # add some useful application ,if you need some changes ,just do it
 echo " Now doing some application install"
 echo Y | apt-get install aptitude  dia xournal wireshark ssh unzip  ctags cscope git chromium-browser vim screen linuxlogo libncurses5-dev  build-essential libc6-dbg kernel-package

make-kpkg clean

dkim_selector = dkim
  dkim_domain =  ${lc:${domain:$h_from:}}
  dkim_private_key = /root/dkim.private.key
  dkim_strict = 0

 # install sudo ,if you don't need just comment it
 echo "Now install sudo for your system and give your user a sudoer permission"
 echo Y | apt-get install sudo
 my_user=`who | head -n 1 | cut -d " " -f 1`
 echo "$my_user ALL=(ALL:ALL) ALL" >> /etc/sudoers 

%7,编写翻译内核

图片 1

 # the function is using for check if a application is installed ,if not installed just install it with apt-get install
function install_app  # para is the func you want to install
{
 aptitude search $1 > /tmp/log
 file_line=`cat /tmp/log | wc -l`
 for((i=1;i<=$file_line;i++));do
  sed -n "$i"'p' /tmp/log >/tmp/log1
  i_status=`awk '{print $1}' /tmp/log1`
  par2=`awk '{print $2}' /tmp/log1`
  par3=`awk '{print $3}' /tmp/log1`
  if [[ $par2 == $1 || $par3 == $1 && $i_status != 'i' ]]; then
        echo "Sorry ,"$1" not installed,we will install it"
        apt-get install $1
  elif [[ $par2 == $1 || $par3 == $1 && $i_status == 'i' ]]; then
   echo "OK ,"$1" has been installed "
   break
    fi
 done
 rm /tmp/log /tmp/log1
}

time fakeroot make-kpkg –initrd –append-to-version=-tweak kernel-image kernel-headers

# sometimes ,our system have no graphic interfaces,we use these to install GNOME, if no need comment it
 echo " Now installing gnome"
install_app  xorg
install_app  gnome-core
install_app  gdm3

你能够将-tweak 换到你愿意的

# add flash support for FireFox and Chrome Browse
echo " Now add flash support for browse"
mkdir -p /home/$my_user/.mozilla/plugins/
mv libflashplayer.so /home/$my_user/.mozilla/plugins/

%8,安装内核

# add vim config
echo " Now add vim config"
mkdir -p /home/$my_user/.vim/plugin
mv taglist.vim /home/$my_user/.vim/plugin/
mv vimrc /etc/vim/vimrc 

cd ~/src

# install WPS for i386/i686 system
echo "Now installing WPS"
uname -a >/tmp/system_version
if grep "i386" /tmp/system_version || grep "i686" /tmp/system_version ; then
 dpkg -i symbol-fonts_*
 if [ ! -f wps-office_* ] ;then
  echo " Now doloading wps for linux ,may need a little long time"
  wget
 fi
 dpkg -i wps-office_*
else
 echo "Sorry ,your system is not 32 bit system ,we will not install wps"
fi

sudo dpkg -i linux-image-3.0.6-tweak_3.0.6-tweak-10.00.Custom_amd64.deb

# install deepin screenshot
echo "Now installing deepin screen shot"
echo Y | apt-get install python-xlib
dpkg -i deepin-scrot*

sudo dpkg -i linux-headers-3.0.6-tweak_3.0.6-tweak-10.00.Custom_amd64.deb

注:

%9,重启Computer

文中提到大多Debian配置方面包车型客车事物,假使我们有意思味招待出门右拐看一下本身后边的博文:

图片 2

《Debian安装全战术》

《Ubuntu 下安装WPS for Linux》

《Ubuntu下创办Vim+Taglist+Cscope+Ctags组合编辑器》 

 

推荐阅读:

Debian 7.0 Wheezy 测量检验体验

Debian 7.0 Wheezy 发布!

U盘安装Debian 7.0 Wheezy

...

本文由js333发布于计算机互联网,转载请注明出处:Debian系统初装后的各种配置,重新编译Kubuntu

关键词:

上一篇:其保存的数据无故丢失的原因金沙js333娱乐场

下一篇:程序员必读书单,程序员层次模型