welcome: please sign in
location: Server_OS

Basic System Config for Different OS

These are basic configurations for web servers, focus on VPS settings and are for different Linux distributions. All of them have been tested on my own VPS boxes, but I don't make any kind of promise that they can work on different machine too.

Archlinux

When using ArchLinux on an OpenVZ box, there will be a FATAL: Kernel too old error if upgraded glibc. This is becouse the host uses a kernel older than Arch's, usually 2.6.18.

An older source for OpenVZ

Use an old verson of the official sources.

/etc/pacman.conf:

   1 [core]
   2 # Add your preferred servers here, they will be used first
   3 # Include = /etc/pacman.d/mirrorlist
   4 Server = http://arm.konnichi.com/2010/12/29/core/os/x86_64

/etc/pacman.d/mirrorlist

   1 # Any
   2 Server = http://arm.konnichi.com/2011/01/28/$repo/os/x86_64
   3 # Server = ftp://mirrors.kernel.org/archlinux/$repo/os/x86_64
   4 # Server = http://mirrors.kernel.org/archlinux/$repo/os/x86_64
   5 

A 3rd part glibc

Use a 3rd party glibc build to avoid the error, this glibc is build with kernel 2.6.18

/etc/pacman.conf:

   1 [glibc-vps]
   2 Server = http://dev.archlinux.org/~ibiru/openvz/glibc-vps/x86_64

Ubuntu

A newer kernel

   1 sudo apt-get install python-software-properties
   2 sudo add-apt-repository ppa:xorg-edgers/ppa
   3 sudo apt-get update && apt-get dist-upgrade

Remove old kernel

   1 dpkg --get-selections | grep linux
   2 sudo apt-get remove linux-image-3.2.0-24-virtual
   3 sudo apt-get autoremove
   4 sudo apt-get autoclean
   5 sudo update-grub

A Minimal System

This is actually for Debian.

   1 apt-get --force-yes -y purge lynx memtester unixodbc python-* odbcinst-* tcpdump ttf-* apache2-* bind9-* xinetd samba-* nscd-* portmap sendmail-* sasl2-bin
   2 # Then type "Yes, do as I say!" to continue
   3 apt-get autoremove && apt-get autoclean && apt-get update && apt-get dist-upgrade

DotDeb

DotDeb doesn't officially support Ubuntu, but can still use it by adding these lines into /etc/apt/sources.list:

   1 deb http://packages.dotdeb.org stable all
   2 deb-src http://packages.dotdeb.org stable all

Then add the key:

   1 curl http://www.dotdeb.org/dotdeb.gpg | apt-key add -

Percona

Percona is an improved MySQL project.

To install percona on Debian, follow this:

   1 gpg --keyserver  hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
   2 gpg -a --export CD2EFD2A | sudo apt-key add -

Then add this to /etc/apt/sources.list:

   1 deb http://repo.percona.com/apt squeeze main
   2 deb-src http://repo.percona.com/apt squeeze main

Install by:

   1 apt-get update && apt-get install percona-server-server-5.5 percona-server-client-5.5

CentOS/RHEL/Fedora/Scientific Linux

Remove old kernel

   1 rpm -qa | grep kernel
   2 yum remove kernel-2.6.32-220.el6.i686

Use EPEL

   1 rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
   2 #rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
   3 

More sources:

   1 rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
   2 rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
   3 yum update

Remi repo needs to be enabled manually.

Special repo:

   1 rpm -Uvh http://centos.alt.ru/pub/repository/centos/6/i386/centalt-release-6-1.noarch.rpm

This repo has a latest httpd build, but it conflicts with remi repo, so this need to be disabled and manually selected only when upgrading httpd.

   1 rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
   2 # rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
   3 

The Webtatic repo has a up-to-date httpd, a PHP 5.3.x and MySQL in both 5.1.x and 5.5.x for CentOS 5 but only has PHP 5.4.x for CentOS 6. Need to be enabled manually.

And there is a JasonLitka repo that have a newer MySQL 5.1.x with the package name mysql, see instructions in the page.

Clean Up

   1 yum remove Deployment_Guide-en-US finger cups-libs cups bluez-libs desktop-file-utils ppp rp-pppoe wireless-tools irda-utils nfs-utils nfs-utils-lib rdate fetchmail eject ksh mkbootdisk mtools syslinux tcsh startup-notification talk apmd rmt dump setserial portmap yp-tools ypbind telnet rsh rcp postfix httpd sendmail bind bind-utils libX* mesa-* perl-* phonon-* ql* qt* samba-* xorg-* alsa-* avahi-* plymouth-* sos

UTF-8

Edit /etc/vimrc and config it as above:

   1 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
   2    set fileencodings=utf-8,ucs-bom,latin1
   3 endif

Slackware

Package Management

A slackpkg is useful.

   1 installpkg /path/to/the/file.pkg.xz # install a package
   2 

Timezone

Maybe need to reinstall glibc.

   1 slackpkg update
   2 slackpkg reinstall glibc

Set timezone permanently:

   1 zic -l Asia/Shanghai

Ref.

Server_OS (last edited 2014-02-12 15:31:57 by 113)

How many stars in your bowl, How many sorrows in your soul?
CopyRight © 2011-2019 Allen Zhong, under a CC BY-NC-ND 4.0 License.