воскресенье, 2 сентября 2012 г.

Установка и базовая настройка SliTaz 4.0

В 4й версии был убран установочный скрипт slitaz-installer, при этом способ установки сабжа из консоли стал не совсем понятен. После недолгих поисков, удалось частично понять новую идеологию дистрибутива. Итак,

Установка
tazinst new tazinst.conf
создается в текущем каталоге файл tazinst.conf с параметрами установки. Они описагы в доке:
http://hg.slitaz.org/slitaz-tools/raw-file/6e8c38a0aee3/doc/tazinst.en.html

...
 The setup file contains the following variables:

    The variables describing the installation source:
        *INST_TYPE: the type of media containing the SliTaz source files, either: cdrom (SliTaz LiveCD), usb (SliTaz LiveUSB), iso (ISO image of SliTaz), web (ISO image on the Web), weboot, ex: INST_TYPE=web
        SRC_FILE: the name of the source file containing SliTaz. It depends on the type of support:
            cdrom (SliTaz LiveCD): unused
            usb (SliTaz LiveUSB): name of the partition on the host USB device, ex: SRC_FILE=/dev/sdb1
            iso (ISO image of SliTaz): name of the ISO file, ex: SRC_FILE=~/slitaz.3.0.iso
            web (ISO image on the Web): name of the URL, ex: SRC_FILE=http://mirror.slitaz.org/iso/cooking/slitaz-cooking.iso. Note that 3 URLs are predefined: 'stable', 'cooking, 'rolling', ex: SRC_FILE=cooking downloads the latest cooking available from the web
            weboot: unused

    The variables describing the target partition:
        *TGT_PARTITION: the name of the target partition SliTaz will install to or update, ex: TGT_PARTITION=/dev/hda3
        TGT_FS: if this variable is entered, the target partition will be formatted in the file system specified, otherwise the partition will be cleaned and /home will be preserved, ex: TGT_FS=ext3
        TGT_HOME: this variable indicates if need be, the name of the partition to receive the /home directory, ex: TGT_HOME=/dev/hda5
        TGT_HOME_FS: if this variable is entered, the home partition will be formatted in the file system specified, ex: TGT_HOME_FS=ext2

    The system settings:
        TGT_HOSTNAME: name of the system, ex: TGT_HOSTNAME=hd-slitaz, by default TGT_HOSTNAME=slitaz
        TGT_ROOT_PWD: superuser password, ex: TGT_ROOT_PWD=toor, by default TGT_ROOT_PWD=root
        TGT_USER: user name, ex: TGT_USER=toto, by default TGT_USER=tux
        TGT_USER_PWD: user password, ex: TGT_USER_PWD=titi, by default TGT_USER_PWD=tux

    The boot loader (bootloader) configuration variables:
        TGT_GRUB: install the GRUB bootloader (yes or no), ex: TGT_GRUB=yes, by default TGT_GRUB=no
        TGT_WINBOOT: if this variable is entered, it indicates the partition containing Windows© to implement a dual-boot. It can also be set to 'auto', in this case the dual-boot will be on the first partition Windows© detects, ex: TGT_WINBOOT=auto

Note that only variables preceded by a asterisk are mandatory, others are optional. Thus a minimal setup file can be:

INST_TYPE=cdrom
TGT_PARTITION=/dev/hda3

This file will install SliTaz on /dev/hda3 formatting the partition from a LiveCD.
...

В моем случае хватило указать:
INST_TYPE=cdrom
TGT_PARTITION=/dev/sda1
TGT_FS=ext3
TGT_HOSTNAME=slitaz4-test
TGT_ROOT_PWD=***
TGT_USER=My
TGT_USER_PWD=***
TGT_GRUB=yes
Теперь запускаем установку
tazinst install tazinst.conf
после окончания убеждаемся, что Grub поставился и перезагружаемся reboot
--
Настройка сети - правка файла /etc/network.conf
INTERFACE="eth0"
DHCP="no"
STATIC="yes"
IP="172.17.17.20"
NETMASK="255.255.255.0"
GATEWAY="172.17.17.1"
DNS_SERVER="172.17.17.1"

После правки /etc/init.d/network.sh restart
--
Для активации ssh сервера (здесь это dropbear) дописываем его в автозапуск (под root'ом):
vi /etc/rcS.conf
 RUN_DAEMONS="...httpd dropbear"
:wq
запускаем сервис (ключи сгенерятся автоматом)
/etc/init.d/dropbear start
--
Установка пакетов (sudo, vim, screen...)
Помощь по системе управления пакетами: http://doc.slitaz.org/ru:handbook:packages
Help самой проги - tazpkg usage
# tazpkg recharge
# tazpkg get-install sudo
# visudo
для My
$ sudo tazpkg get-install screen vim fail2ban
--
Удаленное web управление - Tazpanel
для доступа извне правим конфиг:
sudo vim /etc/slitaz/httpd.conf (! не спутать с /etc/httpd.conf!)
добавляем после A:127.0.0.1
A:172.17.17. (разрешаем подсеть - точка в конце нужна!)
Сохраняем, перезагружаем панель
sudo /etc/init.d/tazpanel restart
теперю появится доступ для пользователя root на адресе хоста на порту 82:
http://172.17.17.20:82

Комментариев нет:

Отправить комментарий