แสดงบทความที่มีป้ายกำกับ apt แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ apt แสดงบทความทั้งหมด

วันจันทร์ที่ 3 มีนาคม พ.ศ. 2557

APT cacher installation

Running several server with same distribution like ubuntu or debian. It is smart to have repository cache on your network. This can save your bandwidth and time.


Server side
1. Install apt-cacher mandatory package
$  apt-get install apt-cacher

2. Edit apt-cacher configuration
$  vi /etc/apt-cacher/apt-cacher.conf

#####
daemon_addr =
allowed_hosts = /
#####

3. Restart apt-cacher service
$  /etc/init.d/apt-cacher restart


Client side
1. Create proxy files for connect to apt-cacher
$  vi /etc/apt/apt.conf.d/01proxy

#####
Acquire::http::Proxy "http://:3142";
#####


How it work?
1. On client side try to use command apt-get update
2. On APT cacher server check logs file at /var/log/apt-cacher/access.log
to see client connection


Reference :
http://www.debuntu.org/how-to-set-up-a-repository-cache-with-apt-cacher/
https://help.ubuntu.com/community/Apt-Cacher-Server

วันศุกร์ที่ 12 กุมภาพันธ์ พ.ศ. 2553

Ubuntu package management & package installed for web server

Update list of package
#apt-get update

Upgrade all package in system
#apt-get upgrade

To install package
#apt-get install foo

To remove package
#apt-get remove foo
-remove configuration on the system
#apt-get --purge remove for

To upgrade all packages on the system
#apt-get dist-upgrade

apt-cache : query package list tool

To find packages whose description contain word:
#apt-cache search word

To print the detailed information of a package:
#apt-cache show package

To print the packages a given package depends on:
#apt-cache depends package

#To print detailed information of the versions available for a package and the packages
that reverse-depends on it:
apt-cache showpkg package



PHP package
php5
php5-cgi
php5-cli
php5-curl
php4-common
php5-gd
php5-imagick
php5-memcache
php5-mysql
php5-xcache
libapache2-mod-fcgid
nfs-kernel-server


Apache package
apache2
apache2-mpm-worker
apache2-utils
apache2.2-bin
apache2.2-common
libapache2-mod-fcgid


Apache Ubuntu vs Apache gentoo
add user apache with uid81 (gentoo)
#useradd -r -u 81 apache

edit /etc/apache2/envvars to run apache with user apache

Reference :
A Debian Package Primer: Part One
Aptitude :part two
Ubuntu Community Doc.