понеділок, 21 квітня 2008 р.

Apache22 - установка из портов

Эту и другие статьи Вы можете прочитать на моем личном сайте

кратко что я вытворял под руководством опытного товарища

#cd /usr/local/etc/rc.d
# ll
total 16
-r-xr-xr-x 1 root wheel 4744 Aug 27 07:45 apache22
-r-xr-xr-x 1 root wheel 833 Oct 28 2006 avahi-daemon.sh
-r-xr-xr-x 1 root wheel 1072 Oct 28 2006 avahi-dnsconfd.sh
-r-xr-xr-x 1 root wheel 622 Oct 28 2006 dbus
-r-xr-xr-x 1 root wheel 1184 Oct 15 2006 exim.sh
-r-xr-xr-x 1 root wheel 1046 Oct 15 2006 postfix
......
# cat apache22
#!/bin/sh
#
# $FreeBSD: ports/www/apache22/files/apache22.sh.in,v 1.1 2006/09/24 16:16:40 clement Exp $
#

# PROVIDE: apache22
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable apache22:
# apache22_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable apache22
# apache22_profiles (str): Set to "" by default.
# Define your profiles here.
# apache22limits_enable (bool):Set to "NO" by default.
# Set it to yes to run `limits $limits_args`
# just before apache starts.
# apache22_flags (str): Set to "" by default.
# Extra flags passed to start command.
# apache22limits_args (str): Default to "-e -C daemon"
# Arguments of pre-start limits run.
# apache22_http_accept_enable (bool): Set to "NO" by default.
# Set to yes to check for accf_http kernel
# module on start up and load if not loaded.
. /etc/rc.subr

name="apache22"
rcvar=`set_rcvar`

start_precmd="apache22_precmd"
restart_precmd="apache22_checkconfig"
reload_precmd="apache22_checkconfig"
reload_cmd="apache22_graceful"
graceful_cmd="apache22_graceful"
gracefulstop_cmd="apache22_gracefulstop"
configtest_cmd="apache22_checkconfig"
command="/usr/local/sbin/httpd"
_pidprefix="/var/run/httpd"
pidfile="${_pidprefix}.pid"
required_files=/usr/local/etc/apache22/httpd.conf
..........

* тут встевил apache22_enable куда просил товарищь чуть выше
# //usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
httpd: apr_sockaddr_info_get() failed for tools.voliacable.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Starting apache22.
httpd: apr_sockaddr_info_get() failed for tools.voliacable.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
# ps -auxww|grep http
root 60642 0.0 0.0 372 252 p0 R+ 8:58AM 0:00.00 grep http
# netstat -an|grep LISTEN
tcp4 0 0 127.0.0.1.25 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
# /usr/local/etc/rc.d/apache22 status
apache22 is not running.
# cat httpd-error.log
[Tue Aug 28 08:50:48 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 28 08:50:48 2007] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "rex.bex.fex"
Configuration Failed
[Tue Aug 28 08:55:23 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 28 08:55:23 2007] [alert] (EAI hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "rex.bex.fex"
Configuration Failed
[Tue Aug 28 08:56:47 2007] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Aug 28 08:56:47 2007] [alert] (EAI hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "rex.bex.fex"
Configuration Failed
# cat /etc/hosts
::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
* localhost.my.domain заменил на rex.bex.fex
#top|grep httpd
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
60702 root 1 8 0 6416K 4864K nanslp 0:01 16.02% httpd

Получился танец с бубном- такое случается тогда, когда неправильно что-то настроено изначально

неділю, 13 квітня 2008 р.

настройка FreeBSD 7. шаг второй. Задачи сервера

Эту и другие статьи Вы можете прочитать на моем личном сайте

сервак будет у нас работать внутренним форумом, шлюзом в инет одной подсети (прозрачный прокси), почтовым шлюзом (отправлять почту и снимать ее для юзеров с внешних серваков- переброской портов).
Ставим на него апач, строим ipfw, строим squid (прозрачный, ограничение на размер скачиваемого, регулируемая полоса для групп юзеров, авторизация, ACL) в общем, ничего супер сложного - все хорошо документировано и секретом не является.
Теперь ставим из портов апач и смотрим что получилось :)

Настройка FreeBSD 7. шаг первый

Эту и другие статьи Вы можете прочитать на моем личном сайте
завелся вот сервачок вот такой:
site# dmesg
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008
root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(R) CPU 3050 @ 2.13GHz (2133.34-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0x6f2 Stepping = 2
Features=0xbfebfbff
Features2=0xe3bd
AMD Features=0x20100000
AMD Features2=0x1
Cores per package: 2
real memory = 1072168960 (1022 MB)
avail memory = 1035567104 (987 MB)
ACPI APIC Table:
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID: 0
cpu1 (AP): APIC ID: 1
ioapic0 irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
hptrr: HPT RocketRAID controller driver v1.1 (Feb 24 2008 19:59:27)
acpi0: on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit> port 0x1008-0x100b on acpi0
cpu0: on acpi0
est0: on cpu0
p4tcc0: on cpu0
cpu1: on acpi0
est1: on cpu1
p4tcc1: on cpu1
pcib0: port 0xcf8-0xcff on acpi0
pci0: on pcib0
pcib1: irq 16 at device 1.0 on pci0
pci1: on pcib1
pcib2: irq 20 at device 28.0 on pci0
pci2: on pcib2
pcib3: at device 0.0 on pci2
pci3: on pcib3
pcib4: irq 20 at device 28.4 on pci0
pci4: on pcib4
em0: port 0x4000-0x401f mem 0xdc080000-0xdc09ffff,0xdc000000-0xdc07ffff irq 16 at device 0.0 on pci4
em0: Using MSI interrupt
em0: Ethernet address: 00:e0:81:4a:14:bf
em0: [FILTER]
pcib5: irq 21 at device 28.5 on pci0
pci5: on pcib5
em1: port 0x5000-0x501f mem 0xdc180000-0xdc19ffff,0xdc100000-0xdc17ffff irq 17 at device 0.0 on pci5
em1: Using MSI interrupt
em1: Ethernet address: 00:e0:81:4a:14:c0
em1: [FILTER]
uhci0: port 0x3000-0x301f irq 23 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: on uhci0
usb0: USB revision 1.0
uhub0: on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: port 0x3020-0x303f irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: on uhci1
usb1: USB revision 1.0
uhub1: on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: port 0x3040-0x305f irq 18 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: on uhci2
usb2: USB revision 1.0
uhub2: on usb2
uhub2: 2 ports with 2 removable, self powered
uhci3: port 0x3060-0x307f irq 16 at device 29.3 on pci0
uhci3: [GIANT-LOCKED]
uhci3: [ITHREAD]
usb3: on uhci3
usb3: USB revision 1.0
uhub3: on usb3
uhub3: 2 ports with 2 removable, self powered
ehci0: mem 0xdc500000-0xdc5003ff irq 23 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: on ehci0
usb4: USB revision 2.0
uhub4: on usb4
uhub4: 8 ports with 8 removable, self powered
pcib6: at device 30.0 on pci0
pci10: on pcib6
fxp0: port 0x6080-0x60bf mem 0xdc260000-0xdc260fff,0xdc240000-0xdc25ffff irq 16 at device 2.0 on pci10
miibus0: on fxp0
inphy0: PHY 1 on miibus0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:e0:81:4a:14:c1
fxp0: [ITHREAD]
vgapci0: port 0x6000-0x607f mem 0xd8000000-0xdbffffff,0xdc200000-0xdc23ffff at device 5.0 on pci10
isab0: at device 31.0 on pci0
isa0: on isab0
atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x30a0-0x30af at device 31.1 on pci0
ata0: on atapci0
ata0: [ITHREAD]
ata1: on atapci0
ata1: [ITHREAD]
atapci1: port 0x30e8-0x30ef,0x30dc-0x30df,0x30e0-0x30e7,0x30d8-0x30db,0x30b0-0x30bf mem 0xdc500400-0xdc5007ff irq 19 at device 31.2 on pci0
atapci1: [ITHREAD]
atapci1: AHCI called from vendor specific driver
atapci1: AHCI Version 01.10 controller with 4 ports detected
ata2: on atapci1
ata2: [ITHREAD]
ata3: on atapci1
ata3: [ITHREAD]
ata4: on atapci1
ata4: [ITHREAD]
ata5: on atapci1
ata5: [ITHREAD]
pci0: at device 31.3 (no driver attached)
acpi_button0: on acpi0
atkbdc0: port 0x60,0x64 irq 1 on acpi0
atkbd0: irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
sio0: <16550a-compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
sio1: <16550a-compatible> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
sio1: [FILTER]
pmtimer0 on isa0
orm0: at iomem 0xc0000-0xc7fff pnpid ORM0000 on isa0
ppc0: parallel port not found.
sc0: at flags 0x100 on isa0
sc0: VGA <16 flags="0x300">
vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
hptrr: no controller detected.
acd0: DVDR at ata0-master UDMA33
ad4: 238475MB at ata2-master SATA300
ad6: 238475MB at ata3-master SATA300
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/ad4s1a
em1: link state changed to UP
em1: link state changed to DOWN
em1: link state changed to UP
arp: 192.168.15.1 is on fxp0 but got reply from 00:04:23:d9:47:d1 on em1
arp: 192.168.15.100 is on fxp0 but got reply from 00:0e:7b:27:ca:9e on em1
site#
после скромной установки установлены такие пакеты (чтоб просто начать работу этого хватило)
site# pkg_info
apache-2.2.6_2 Version 2.2 of Apache web server with prefork MPM.
expat-2.0.0_1 XML 1.0 parser written in C
freetype2-2.3.5 A free and portable TrueType font rendering engine
gd-2.0.35,1 A graphics library for fast creation of images
gettext-0.16.1_3 GNU gettext package
glib-2.14.2 Some useful routines of C programming (current stable versi
jpeg-6b_4 IJG's jpeg compression utilities
libiconv-1.11_1 A character set conversion library
linux_base-fc-4_10 Base set of packages needed in Linux mode (for i386/amd64)
mc-4.6.1_6 Midnight Commander, a free Norton Commander Clone
pcre-7.4 Perl Compatible Regular Expressions library
perl-5.8.8_1 Practical Extraction and Report Language
pkg-config-0.22_1 A utility to retrieve information about installed libraries
png-1.2.22 Library for manipulating PNG images
sarg-2.2.3.1_4 Squid log analyzer and HTML report generator
squid-2.6.16_1 HTTP Caching Proxy
uk-gd-2.0.35,1 A graphics library for fast image creation with KOI8-U supp
uk-webalizer-2.1.10_12 A web server log file analysis program
site#

понеділок, 7 квітня 2008 р.

Перенос папки «Documents and Settings»

Эту и другие статьи Вы можете прочитать на моем личном сайте

Руководство как совершить перенос папки «Documents and Settings» на другой диск с другим путем со всеми предупреждениями для Windows XP тут

Перемещение всей папки

Примечание. Использование этого способа предполагает изменения местонахождения основных компонентов Windows. Этот метод рекомендуется применять только в том случае, если требуется переместить или переименовать папку «Documents and Settings» и нет возможности использовать файл Unattend.txt для изменения имени в процессе установки операционной системы.

Для перемещения в новое местоположение всей папки «Documents and Settings», включая важные компоненты системы, выполните следующие действия.
1.Войдите в компьютерную систему с правами администратора, затем создайте новую папку.
2.В текущей папке «Documents and Settings» в меню Сервис выберите команду Свойства папки и перейдите на вкладку Вид.
3.В разделе Дополнительные параметры установите флажок Показывать скрытые файлы и папки и снимите флажки Скрывать расширения для зарегистрированных типов файлов и Скрывать защищенные системные файлы (рекомендуется).
4.Нажмите кнопку ОК.
5.Перетащите все папки из папки «Documents and Settings», чтобы скопировать их в новую папку, кроме папки для текущего администратора в системе.
6.Выйдите и снова войдите в систему с другой учетной записью администратора.
7.Снова откройте папку «Documents and Settings» и скопируйте профиль администратора, выход которого из системы был только что выполнен, в новую папку. Дополнительный этап необходим из-за того, что профиль учетной записи, с которой был выполнен вход в систему, скопировать нельзя.
8.Выйдите из системы, затем войдите в нее с правами администратора.
9.Откройте редактор реестра, затем в меню Правка выберите команду Правка.
10.Введите в появившемся диалоговом окне строку documents and settings и нажмите кнопку Найти далее.
11.Во всех разделах и параметрах реестра, в которых содержится исходный путь, замените значения или переименуйте разделы и параметры реестра в соответствии с новым путем.Внимание! Это изменение необходимо выполнить для всех вхождений исходного пути в реестре. В противном случае компьютер может не запуститься. Совершенно необходимо обновить все разделы и параметры реестра.

12.Перезагрузите компьютер. Теперь исходную папку «Documents and Settings» можно удалить.