Skip to content
blahlt edited this page Nov 7, 2014 · 1 revision

/boot - 100mb
/ - 15-20gb (programos)
/var - 8-12gb (logai, pacman cache, abs (kompiliuojami paketai))
/home - max (vartotojo dokumentai)
!! jei mazai ram tai dar reikia dar ir swap
http://blog.gotux.net/linux/arch-linux-installation/

http://www.customize.org/screenshots/89822
http://rainmeter.net/cms/SuitesEnigma

vim
http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/

==================
disk size:

  1. df -H
    ================ ================
    https://wiki.archlinux.org/index.php/Beginners’_Guide
    ================ ================
    0. TINKLO PLOKŠTĖS KONFIGŪRAVIMAS
    ==========
    pažiurim koks tinklo plokštės pavadinimas:
    root@archiso ~ # ls /sys/class/net
    gausim rezultata pvz. “enp2s8@ irda@ lo@ wlp2s2@”. Nustatyti kuris prietaisas yra tinklo plokštė galima paleidus komanda:
    root@archiso ~ # ip link show PRIETAISO_PAVADINIMAS
    pavyzdziui “ip link show enp2s8” ir suradus, kurios komandos rezultate bus “link/ether” įrašas.

Keičiant MAC adresą pirmiausia išjungiame pačia plokštę su komanda:
root@archiso ~ # ip link set dev PLOKSTES_PAVADINIMAS down
, o tada pakeičiame ir patį MAC adresą:
root@archiso ~ # ip link set dev PLOKSTES_PAVADINIMAS address AB:CD:ED:GH:IJ:KL
startuojame:
root@archiso ~ # ip link set dev PLOKSTES_PAVADINIMAS up
ir paleidziam dhcp:
root@archiso ~ # dhcpcd PLOKSTES_PAVADINIMAS
! gali nerasti DHCP serverio (jei laidas kaišiojamas, gal requestų skaičių riboja serveris ar pan.) tai reikia palaukti kelias minutes ir bandyti vėl
! Patikrinti MAC adresą galimą komanda:
! root@archiso ~ # ip link show PRIETAISO_PAVADINIMAS

#systemctl disable macspoof@enp2s8
#systemctl disable dhcpcd@enp2s8
#reboot
po perkrovimo su ikistu laidu rasom:
#ip link set dev enp2s8 addr AB:CD:ED:GH:IJ:KL
#ip link set dev enp2s8 down
#ip link set dev enp2s8 up
#dhcpcd enp2s8

!!!!!!!!!!!!!!!!!!!!!!
! Interneta pavyko uzkrauti tik ikisus laida ir perkrovus kompa
! tada isjungiam dhcpcd “dhcpcd -k enp2s8”, pakeiciam MAC “ip link set enp2s8 AB:CD:ED:GH:IJ:KL” ir paleidziam
! dhcpcd “dhcpcd enp2s8”
!!!!!!!!!!!!!!!!!!!!!!!!!
I. INTERNETO PATIKRINIMAS
=====
patikrinam ar yra internetas:
root@archiso ~# ping -c 3 www.google.com

II.a DISKO PARUOSIMASMBR (Master Boot Record)
=================
padarom particijas (nestatom bootable, failines sistemos tipa paliekan default, particijos tipa Primary):
root@archiso ~# cfdisk
pvz:
/boot - bootable, 100mb
/ - 15-20gb (programos)
/var - 8-12gb (logai, pacman cache, abs (kompiliuojami paketai))
/home - max (vartotojo dokumentai)


  • ant virtualbox kai diskas 20GB: *
  • /boot – 100MB *
  • / – 10GB *
  • /var – 5GB *
  • /home – 5GB *
    ***********************************
  • ant IBM T40 kai diskas 36.9GB: *
  • /boot – 100MB *
  • / – 15GB *
  • /var – 5GB *
  • /home – 16GB *
    ***********************************
    suformatuojam particijas:
    root@archiso ~# mkfs.ext4 /dev/sda1
    root@archiso ~# mkfs.ext4 /dev/sda2
    root@archiso ~# mkfs.ext4 /dev/sda3
    root@archiso ~# mkfs.ext4 /dev/sda4
    ??mkswap /dev/sda2

primountinam naujai sukurtus diskus (&& vykdo sekancia komanda jei pavyksta pirmoji t.y. pirmoji grazina 1):
root@archiso ~# mount /dev/sda2 /mnt
root@archiso ~# mkdir /mnt/boot && mount /dev/sda1 /mnt/boot
root@archiso ~# mkdir /mnt/var && mount /dev/sda3 /mnt/var
root@archiso ~# mkdir /mnt/home && mount /dev/sda4 /mnt/home
??swapon /dev/sda2

II.b DISKO PARUOSIMASGPT (GUID Partition Table)
=
GPT – naujesnis particijavimo standartas, kuris palaiko daugiau particijų, didesnius diskus ir t.t. Rekomenduojama naudoti diskams >2.2 TB arba norint tureti >4 particijas.
Particijas sukuriam su grafine aplikacija
root@archiso ~# gdisk /dev/sda
arba per komandine eilute
root@archiso ~# cgdisk /dev/sda
[ UNDONE ]

III. DIEGIMAS
=====
sudiegiam tik bazini paketa
root@archiso ~# pacstrap /mnt base

sugeneruojam fstab faila (-U nes kazkur skaiciau, kad geriau per UUID, nes antraip prijungus nauja diska gali sudurnavoti – http://mpitn.wordpress.com/2011/10/27/etcfstab-ir-uuid/)
root@archiso ~# genfstab -U /mnt >> /mnt/etc/fstab

pakeiciam disko root direktorija ir procesus i naujai sudiegta sistema
root@archiso ~# arch-chroot /mnt
sh-4.2#

IV.a KONFIGURAVIMASINITSCRIPTS ******** NEBEVEIKIA ****** REIKIA NAUDOTI SYSTEMD *******
======
nuo 2013.01.04 versijos reikia sudiegti initscripts (kitaip nebuna pvz /etc/rc.conf)
(y – atnaujina paketu sarasa, u – atnaujina ir instaliuoja paketa)
sh-4.2# pacman -Syu initscripts

pakoreguojam daemonus (programos, kurios dirba backgrounde, sarasa ir statusus galima suzinoti: rc.d list):
sh-4.2# vi /etc/rc.conf
ir pakeiciam “DAEMONS=(syslog-ng network crond)” i “DAEMONS=(@syslog-ng @network crond)”, kad pasileidziant nestabdytu krovimosi proceso
2013.01.04 versijoje irasom
DAEMONS=(@network)

IV.b KONFIGURAVIMASSYSTEMD
=========
! (http://evilshit.wordpress.com/2012/12/03/how-migrate-from-initscripts-to-systemd-on-archlinux/)
! (http://patrakov.blogspot.com/2011/01/writing-systemd-service-files.html)
! galima paziureti daemonu (daemonas – analogiskai kaip windowsuose
! yra servisai t.y. programa kuri veikia background’e) sarasa.
! sh-4.2# systemctl list-unit-files
! STATE reiksmes gali buti static, disabled ir enabled:
! enabled – veikiantis
! disabled – neveikiantis
! static – neveikiantis, bet gali buti paleistas kitu programu
! Kadangi dbus.service yra static tai jo ijungineti jau nereikia systemd ji startuos automatiskai kai tik prireiks.

IV. KONFIGURAVIMO TESINYS
=====
! failas /etc/hosts paprastas tekstinis failas, kuris IP adresui priskiria
! hostname (kompiuterio varda tinkle). Vienam IP adresui yra skirta viena ! eilute. Taigi i /etc/hosts irasom
! kazka panasaus (gali buti, kad ten jau yra sie irasai):

127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost

ijungiam lietuviska lokale:
sh-4.2# vi /etc/locale.gen
ir pakeiciam (atkomentuojam) “#lt_LT.UTF-8 UTF-8” i “lt_LT.UTF-8 UTF-8”
ir sugeneruojam:
sh-4.2# locale-gen

! Norint ijungti tinkla, pirmiausia perziurim tinklo plokstes:
! sh-4.2# ls /sys/class/net
! ir ijungiam daemona, kad startuotu uzsikrovus sistemai:
! NEVEIKIA sh-4.2# systemctl enable dhcpcd@TINKLO_PLOKSTES_PAVADINIMAS

ijungiam dhcp servisa:
sh-4.2# systemctl enable dhcpcd.service

V. BOOTLOADER
=====
sudiegiam grub:
sh-4.2# pacman -S grub-bios
sh-4.2# grub-install —recheck /dev/sda

sukuriam konfiguracija:
sh-4.2# grub-mkconfig -o /boot/grub/grub.cfg

VI. ROOT
====
nustatom root slaptazodi:
sh-4.2# passwd

VII. UNMOUNT ir REBOOT
======
iseinam is chroot aplinkos
sh-4.2# exit

umountinam particijas:
root@archiso ~# umount /mnt/{boot,home,var,}

perkraunam sistema:
root@archiso ~# reboot

VII. PACMAN
===
atnaujinam paketu sarasa (du —refresh arba -y forsuoja paketu atnaujinima, net jei manoma, kad paketai naujausi, rekomenduojama paleisti “pacman -Syy” visada kai pakeiciamas mirroras)
[root@::1 localhost ~]# pacman -Syy

(GAL VISDELTO NEREIKIA, NES GALI SUGESTI) atnaujinam sistema (sync, refresh, upgrade system):
[root@::1 localhost ~]# pacman -Syu

VIII. VARTOTOJAS
====
sukuriam vartotoja:

[root@::1 localhost ~]# useradd -m -g users -G wheel -s /bin/bash rs

! Standartiskai reiktu vartotoja prideti taip “useradd -m -g users -G audio,lp,optical,storage,video,games,power,scanner,wheel -s /bin/bash rs”, bet https://wiki.archlinux.org/index.php/Systemd#Supplementary_information raso, kad itraukus i tas grupes gali kilti problemu
! Norint pasalinti vartototoja “userdel -r rs”, -r raktas pasalina vartotojo home ir pasto (mail spool) direktorijas
! Vartotoju grupiu aprasymas https://wiki.archlinux.org/index.php/Users_and_Groups#User_groups
! Pridedant vartotoja butinai turi egzistuoti grupe, norint sukurti grupe “groupadd GRUPES_PAVADINIMAS”, norint pasalinti “groupdel GRUPES_PAVADINIMAS”
! Norint paziureti kas priklauso grupei: grep ^GRUPES_PAVADINIMAS /etc/group

nustatom slaptazodi naujam vartotojui:
[root@::1 localhost ~]# passwd rs

sudiegiam sudo (kad galetume pasinaudoti root’o teisemis):
[root@::1 localhost ~]# pacman -S sudo

padarom, kad sudo veiktu vartotojams, kurie priklauso wheel grupei:
[root@::1 localhost ~]# visudo
ir pakeiciam (atkomentuojam) “# %wheel ALL=(ALL) ALL” i “%wheel ALL=(ALL) ALL

perkraunam sistema ir prisiloginam nauju vartotoju:
[root@::1 localhost ~]# shutdown -r now

IX. GNOME
====

  1. pacman -S gnome gnome-extra gnome-tweak-tool
  2. systemctl enable gdm
    gdm turetu susiinstaliuoti su gnome paketu
    ?? # pacman -S xf86-video-xxxxx
    ?? # exec gnome-session – neveikia

IX. GRAFINE APLINKA
=======

! Install the virtualbox-guest-utils package. Manually load the modules with:
! # sudo modprobe -a vboxguest vboxsf vboxvideo
!
! pataisyti “modesetting module” klaida log’e reikia suinstaliuoti xf86-video-modesetting
! pataisyti Failed to load module “fbdev” reikia suinstalinti xf86-video-fbdev
! pataisyti glx suinstaliuoti rss-glx

!! Xorg 0: -configure
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Finding the “bus id” of your cards is easy, just run: lspci | grep VGA
the result would be something like:
01:08.0 VGA compatible controller: Number 9 Computer Company Revolution 4 (rev 02)
Then “01:08.0” is your bus id. If you have two cards, you will have two lines like that.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

suinstaliuojam xorg ir video draiverius (VirtualBox’e – xf86-video-vesa)
[rs@::1 localhost ~]$ sudo pacman -S xorg-server xorg-xinit xf86-video-XXXXX dbus
startuojam dbus:
[rs@::1 localhost ~]$ sudo rc.d start dbus
irasom i rc.conf kad dbus startuotu kaip deamonas (prie DAEMONS)

X.a XFCE4
=======
sudiegiam xfce
[rs@::1 localhost ~]$ sudo pacman -S xfce4
sudiegiam grazesnius sriftus:
[rs@::1 localhost ~]$ sudo pacman -S ttf-dejavu
padarom kad po logino startuotu xfce, i .bash_profile irasom (svarbus tarpai):
if [ “$(tty)” = “/dev/tty1” -o “$(tty)” = “/dev/vc/1” ] ; then
startxfce4 —with-ck-launch && exit
fi

  1. —with-ck-launch -=> ijungia restart, shutdown
  2. && exit -=> po logout issilogina ir konsoleje

==-=-=-=-=

  1. pacman -S xfce4
    pasirenkam 17 (xfwm4)
  2. pacman -S xfce4
    pasirenkam 16 (xfdesktop)
  3. pacman -S xfce4
    pasirenkam 10 (xfce4-panel)
  4. pacman -S xfce4
    pasirenkam 12 (xfce4-session)
  1. pacman -S xorg-server xorg-xinit xf86-video-xxxxxxx
  1. startxfce4 —jokiu programu nera, truksta paveiksleliu ir t.t.
    padarom logout ir suinstaliuojam terminala
  2. pacman -S xfce4
    pasirenkam 14 (xfce4-terminal)
  1. pacman -S xfce4
    pasirenkam 13 (xfce4-settings), kad butu ikonos
  2. pacman -S ttf-dejavu —kad sriftai atsirastu

X.b AWESOME
=======
sudiegiam awesome
[rs@::1 localhost ~]$ sudo pacman S awesome
padarom kad startuotu awesome su startx komanda
[rs@::1 localhost ~]$ echo exec awesome >> ~/.xinitrc
padarom, kad prisiloginus startuotu awesome, i ~/.bash_profile (jei naudojam zsh tai i ~/.zprofile) irasom
vt=$(fgconsole 2>/dev/null)
(( vt == 1 )) && exec startx -
vt$vt &> ~/.xlog
unset vt
kad uzdetu desktop paveiksleli sudiegian xsetroot
[rs@::1 localhost ~]$ sudo pacman -S xorg-xsetroot
galima taip pat suinstaliuoti xterm
[rs@::1 localhost ~]$ sudo pacman -S xterm

X.c E17
=======
sudiegiam e17
localhost% pacman -S enlightenment17

sudiegiam sriftus
localhost% pacman -S ttf-dejavu ttf-bitstream-vera

i ~/.xinitrc irasom exec enlightenment_start
localhost% echo exec enlightenment_start >> ~/.xinitrc

startuojam e17
localhost% startx

IX. memtest86+
========
norint patestuoti atminti galim suinstaliuoti memtest86+

  1. sudo pacman -S memtest86+
    ir perkonfiguruojam grub, kad kraunantis kompiuteriui leistu pasirinkti memtest86+
  2. sudo grub-mkconfig -o /boot/grub/grub.cfg

???
https://wiki.archlinux.org/index.php/LXDE
???

X. KONSOLE
==
sudiegian zsh:
[rs@::1 localhost ~]$ sudo pacman -S zsh
pakeiciam default shell’a (!!! nebestartuos xfce, nes nebepasileish bash !!!):
[rs@::1 localhost ~]$ chsh -s $(whitch zsh)
padarom logout ir prisilogine padarom nustatymus, pvz kad editorius butu vi: bindkey -v
irasom i ~/.zshrc, kad normaliai veiktu Home, End ir t.t.:

bindkey “<CTRL+V ir spaudziam HOME>” # Home [[1~
bindkey “<CTRL+V ir spaudziam END>” end-of-line # End ^[[4~
bindkey "
[[5~" beginning-of-history # PageUp [[5~
bindkey "
[[6~" end-of-history # PageDown
bindkey “^[[2~” quoted-insert # Ins (kazkodel neveikia)
bindkey “<CTRL+V ir spaudziam DEL>” delete-char # Del

alias ls=‘ls —color=auto’ #rodys spalvotai

================ ================
==================
conky naujas modulis
-————————-
src folderi sukuriam myobject.cc
-————
#include
void print_myobject(struct text_object *obj, char *p, int p_max_size)
{
snprintf(p, p_max_size, “mano tekstinis objektas”);
}
-—————

ir myobject.h
-—————
#ifndef _MYOBJECT_H
#define _MYOBJECT_H

void print_myobject(struct text_object *, char *, int);

#endif /* _MYOBJECT_H */
-—————

src/CMakeLists.txt papildom
-—————
set(conky_sources …………
………………………
myobject.cc)
-—————
ir irasom
-—————
if(BUILD_MYOBJECT)
set(myobject myobject.cc)
set(optional_sources ${optional_sources} ${myobject})
endif(BUILD_MYOBJECT)
-—————

core.cc papildom
-—————
END OBJ
obj→callbacks.print = &print_myobject;
-—————
ir
-—————
#ifdef BUILD_MYOBJECT
#include “myobject.h”
#endif /* BUILD_MYOBJECT */
-—————

i cmake/config.h.in irasom
-—————
#cmakedefine BUILD_MYOBJECT 1
-—————

i cmake/ConkyBuildOptions.cmake irasom
-—————
option(BUILD_MYOBJECT “Build myobject” true)
-—————

i ~/.conkyrc irasom
-—————
my: ${myobject}
-—————

================ ================
==================
XTERM konfiguravimas
-————————-
irasom i ~/.Xresources
xterm*scrollBar: true
xterm*rightScrollBar: true

suinstaliuojam xrdb (be sito neveiks net ir restartuojant X’us)
#pacman -S xorg-xrdb
ir paleidziam
#xrdb ~/.Xresources

arba restartuojam X’us

================ ================
=================

VIM
-

omnicppcomplete plugin instaliavimas
-————————————————-
iszipinam viska i ~/.vim folderi ir ir paleidziam vim
parasom :helptags $HOME/.vim/doc
i ~/.vimrc irasom sias eilutes
:set nocp
:filetype plugin on
sukuriam folderi ir nueinam ten

  1. mkdir -p ~/.vim/tags && cd ~/.vim/tags
    sugeneruojam tagus
  2. ctags -R —sort=yes —c++-kinds=p —fields=iaS —extra=q —language-force=C+ -f X11 /usr/include/X11/

================ ================
==================

xorg-server
xorg-xinit
xf86-video-vesa – video draiveriai
xfce4-session – atsiras startxfce4 (tuo paciu suinstalins is dbus)
sudo rc.d start dbus (taip pat irasyti i rc.conf prie DAEMONS)
xfdesktop
gnome-icon-theme (foleriu ir pan. iconos)
xfwm4 (maximize, minimize ir pan. langai, kursorius)

xfce4-settings (nustatymai)
xfce4-panel (desktopo paneles)

================ ================
==================

kad butu galima instaliuoti is AUR
i /etc/pacman.conf irasom dvi eilutes:
[archlinuxfr]
Server = http://repo.archlinux.fr/$arch
ir sudiegiam

  1. pacman -Sy yaourt
    kad sudiegti programa rasom (gali reikti pries tai irasyt sudo, nes gali permisionu trukti):
  2. yaourt
    pvz: # yaourt freecad

================ ================
==================

PADIDINAM TMP FOLDERI (https://wiki.archlinux.org/index.php/Fstab)
#sudo vi /etc/fstab
ir irasom size=xG, pvz:
tmpfs /tmp tmpfs nodev,nosuid,size=2G 0 0

================ ================
==================

PAKEISTI KONSOLES REZOLIUCIJA (https://wiki.archlinux.org/index.php/GRUB2#Setting_the_framebuffer_resolution)
grub2 meniu spaudziam ‘c’
irasom ‘vbeinfo’ ir pasiziurim kokias rezoliucijas galim naudoti
uzkraunam sistema
#sudo vim /etc/default/grub
irasom eilutes pvz:
GRUB_GFXMODE=1024×768×32
GRUB_GFXPAYLOAD_LINUX=keep (The gfxpayload property will make sure the kernel keeps the resolution. )
ir paleidziam: #sudo grub-mkconfig -o /boot/grub/grub.cfg

GRUB_GFXMODE=1280×1024×32
================ ================
==================

http://wiki.xfce.org/faq
You put the following in your .bash_profile/.bashrc if you want that Xfce is started automatically when you login on tty1:

if [ “$(tty)” = “/dev/tty1” -o “$(tty)” = “/dev/vc/1” ] ; then
startxfce4
fi

ijungia restart, shutdown: —with-ck-launch
prisilogina su shutdown,restart ir po logout issilogina ir konsolej: startxfce4 —with-ck-launch && exit

================ ================
==================
FREECAD

  1. pacman -S bash
  2. pacman -S fakeroot
  3. pacman -S patch

“whereis libarchive”
and then create the link (as root) in the same path via
ln /path/libarchive.so /path/libarchive.so.12

opencascade

  1. pacman -S automake
  2. pacman -S autoconf
  3. pacman -S libtool

========== WI-FI =====
sudiegiam wicd-gtk

  1. pacman -S wicd-gtk
    ijungiam, kad startuotu servisas
  2. systemctl enable wicd.service

========== xfce4 plugin ===

  1. pacman -S git
  2. cd ~
  3. mkdir Projects
  4. git clone git://git.xfce.org/panel-plugins/xfce4-sample-plugin xfce4-sample-plugin
  5. cd xfce4-sample-plugin
  6. make

pries make sudiegiam

  1. pacman -S make

sudiegiam xfce development tools, nes kitaip neleis kompiliuoti

  1. pacman -S xfce4-dev-tools
  1. pacman -S autoconf
  2. pacman -S libtool
  3. ./autogen.sh —prefix=/usr
  4. make
  5. su -c ‘make install’

restartuojam xfce panele (neprireike)

  1. xfce4-panel -r

=================
================ ================
Setup the virtualbox to use 2 adapters. The first adapter is set to NAT (that will give you the internet connection). The second adapter is set to host only. Start the virtual machine and assign a static IP for the second adapter in Ubuntu (for instance 192.168.56.56). The host Windows will have 192.168.56.1 as IP for the internal network (VirtualBox Host-Only Network is the name in network connections in Windows). What this will give you is being able to access the apache server on ubuntu, from windows, by going to 192.168.56.56. Also, Ubuntu will have internet access, since the first adapter (set to NAT) will take care of that. Now, to make the connection available both ways (accessing the windows host from the ubuntu guest) there’s still one more step to be performed. Windows will automatically add the virtualbox host-only network to the list of public networks and that cannot be changed. This entails that the firewall will prevent proper access. To overcome this and not make any security breaches in your setup, go to the windows firewall section, in control panel. Click on advanced settings. In the page that pops up, click on inbound rules (left column), then on new rule (right column). Chose custom rule, set the rule to allow all programs, and any protocol. For the scope, add in the first box (local IP addresses) 192.168.56.1, and in the second box (remote IP) 192.168.56.56. Click next, select allow the connection, next, check all profiles, next, give it a name and save. That’s it, now you have 2 way communication, with apache/any other service available as well as internet. The final step is to setup a share. Do not use the shared folders feature in virtualbox, it’s quite buggy especially with windows 7 (and 64 bit). Instead use samba shares – fast and efficient. Follow this link for how to set that up: https://wiki.ubuntu.com/MountWindowsSharesPermanently

Clone this wiki locally