## page was renamed from Slackware64 <> = Slackware64 = 64 bit version of Slackware == Installation of Slackware64 14.0 in VirtualBox == Physical machine: HP EliteBook 8470p core i5 Virtual machine: * Memory 6GB //4GB * Disc 64 GB * Video memory 128 MB * Settings * System * Processor * Enable PAE/NX:true * Nr Processors: 3 #2 * Acceleration * Enable VT-x/AMD-V: true * Enable nested paging: true * General * Advanced * Mini-Toolbar: disabled # Ctrl+F Steps: * Boot from DVD ISO of Slackware64 * Choose keyboard pt-latin1 * Login with root * cfdisk * new, primary, size 64719 * new, primary, size 4002.97 * Set sda1 as bootable * type sda1, 83, Linux * type sda1, 82, Linux swap * write, yes, quit * setup, addswap, sda2 * check bad blocks? no * select sda1, format quick, ext4 filesystem * Install from CD or DVD, auto, /dev/sr0 * All packages, full * skip USB bootstick * Simple LILO, frame buffer 1024x768x64K * UTF-8 console? yes * MBR LILO destination * Mouse imps2 * Gpm? No * Network? no * Services, rc.fuse, rc.inetd, rc.messagebus, rc.syslog, rc.sshd * Custom screen fonts? no * Hardware clock set to UTC * Timezone: Europe/Lisbon * xinitrc.wmaker * Root pass? yes * Reboot * In Virtualbox export the virtual machine as a OVA file == Portuguese console keyboard == Create the file /etc/rc.d/rc.keymap: {{{#!highlight sh #!/bin/sh # Load the keyboard map. More maps are in /usr/share/kbd/keymaps. if [ -x /usr/bin/loadkeys ]; then /usr/bin/loadkeys pt-latin1.map fi }}} == Enable login by KDM == Edit the file /etc/inittab and change the initlevel from 3 to 4 {{{ id:4:initdefault }}} Edit the file /etc/kde/kdm/Xsetup and add the line {{{ setxkbmap pt xrandr --output VGA-1 --mode 1366x768 }}} == Change VESA frame buffer resolution to 1280x960 == Edit the file /etc/lilo.conf {{{ vga = 844 }}} Run lilo -C /etc/lilo.conf to update LILO config on the MBR. == xterm with Zenburn look and font size 14 == Create file ~/.Xresources: {{{ xterm*foreground: rgb:F6/F3/E8 xterm*background: rgb:40/40/40 xterm*font: *-fixed-*-*-*-14-* }}} Reload the definitions with xrdb ~/.Xresources == X configuration for 1280x960 == DontZap as true disables the Ctrl+Alt+Backspace (Hard reset X). {{{ Section "Module" Load "dbe" # Double buffer extension SubSection "extmod" Option "omit xfree86-dga" # don't initialise the DGA extension EndSubSection Load "type1" Load "freetype" Load "glx" EndSection Section "Files" FontPath "/usr/share/fonts/local/" FontPath "/usr/share/fonts/misc/" FontPath "/usr/share/fonts/OTF/" FontPath "/usr/share/fonts/TTF/" FontPath "/usr/share/fonts/Type1/" FontPath "/usr/share/fonts/CID/" FontPath "/usr/share/fonts/Speedo/" FontPath "/usr/share/fonts/75dpi/:unscaled" FontPath "/usr/share/fonts/100dpi/:unscaled" FontPath "/usr/share/fonts/75dpi/" FontPath "/usr/share/fonts/100dpi/" FontPath "/usr/share/fonts/cyrillic/" EndSection Section "ServerFlags" EndSection Section "InputDevice" Identifier "Keyboard1" Driver "kbd" EndSection Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "PS/2" Option "Device" "/dev/mouse" EndSection Section "Monitor" Identifier "My Monitor" HorizSync 31.5 - 50.0 VertRefresh 40-90 EndSection Section "Device" Identifier "VESA Framebuffer" Driver "vesa" EndSection Section "Screen" Identifier "Screen 1" Device "VESA Framebuffer" Monitor "My Monitor" DefaultDepth 24 Subsection "Display" Depth 8 Modes "1152x864" "1024x768" "800x600" "640x480" EndSubsection Subsection "Display" Depth 16 Modes "1152x864" "1024x768" "800x600" "640x480" EndSubsection Subsection "Display" Depth 24 Modes "1280x960" "1152x864" "1024x768" "800x600" "640x480" EndSubsection Subsection "Display" Depth 32 Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480" EndSubsection EndSection Section "ServerLayout" Identifier "Simple Layout" Screen "Screen 1" InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection Section "ServerFlags" Option "DontZap" "true" EndSection }}} == Enable network DHCP client eth0 == Edit the file /etc/rc.d/rc.inet1.conf {{{#!highlight sh # Config information for eth0: IPADDR[0]="" NETMASK[0]="" USE_DHCP[0]="yes" DHCP_HOSTNAME[0]="" }}} == VirtualBox port forward == * Network * NAT * Port forwarding * Rule1 * TCP * Host port 2222 * Guest port 22 == Java installation == * Get from Oracle jdk-6u39-linux-x64.bin * mv jdk-6u39-linux-x64.bin /usr/java * ./jdk-6u39-linux-x64.bin # run it * Change /etc/profile {{{#!highlight bash export JAVA_HOME="/usr/java/jdk1.6.0_39" PATH="(...):JAVA_HOME/bin" }}} Get also http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-x64.tar.gz {{{#!highlight sh cp jdk-7u60-linux-x64.tar.gz /usr/java cd /usr/java tar xvzf jdk-7u60-linux-x64.tar.gz }}} == Tomcat installation == {{{#!highlight sh mkdir -p /usr/local/tomcat wget http://mirrors.fe.up.pt/pub/apache/tomcat/tomcat-7/v7.0.54/bin/apache-tomcat-7.0.54.tar.gz tar xvzf apache-tomcat-7.0.54.tar.gz useradd tomcat chown tomcat * -R chgrp users * -R }}} Edit /usr/local/tomcat/conf/tomcat-users.xml {{{#!highlight xml }}} Start and stop tomcat with user tomcat: * /usr/local/tomcat/bin/startup.sh * /usr/local/tomcat/bin/shutdown.sh == JBoss 5.1.0 == {{{#!highlight sh adduser jboss # pass 12345678 cd /usr/local/ unzip jboss-5.1.0.GA.zip # ln -s jboss-5.1.0.GA jboss cp jboss_init_redhat.sh /etc/init.d mv /etc/init.d/jboss_init_redhat.sh /etc/init.d/jboss ln -s /usr/java/jdk1.6.0_39 /usr/local/jdk chmod 755 /etc/init.d/jboss cd /usr/local/jboss chown jboss * -R chgrp users * -R /etc/init.d/jboss start # as root, JBoss should run in jboss user context /etc/init.d/jboss stop # as root, JBoss should run in jboss user context }}} Default runlevels (2 3 4 5): {{{#!highlight sh ln -s /etc/init.d/jboss /etc/rc2.d/S99jboss ln -s /etc/init.d/jboss /etc/rc2.d/K10jboss ln -s /etc/init.d/jboss /etc/rc3.d/S99jboss ln -s /etc/init.d/jboss /etc/rc3.d/K10jboss ln -s /etc/init.d/jboss /etc/rc4.d/S99jboss ln -s /etc/init.d/jboss /etc/rc4.d/K10jboss ln -s /etc/init.d/jboss /etc/rc5.d/S99jboss ln -s /etc/init.d/jboss /etc/rc5.d/K10jboss }}} In the file /etc/init.d/jboss change JBOSS_CONF from default to all == Glassfish 4.0 == {{{#!highlight sh mkdir -p /opt/appsrv wget http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip unzip glassfish-4.0.zip cd glassfish-4.0 chown vitor *- R chgrp users *- R nano bin/asadmin }}} {{{#!highlight bash AS_INSTALL=`dirname "$0"`/../glassfish AS_INSTALL_LIB="$AS_INSTALL/lib" . "${AS_INSTALL}/config/asenv.conf" AS_JAVA=/usr/java/jdk1.7.0_60 JAVA_HOME==/usr/java/jdk1.7.0_60 #Depends upon Java from ../config/asenv.conf if [ ${AS_JAVA} ]; then JAVA=${AS_JAVA}/bin/java fi exec "$JAVA" -jar "$AS_INSTALL_LIB/client/appserver-cli.jar" "$@" }}} * bin/asadmin start-domain # if first time set the admin pass * Access http://localhost:4848 == Mysql == {{{#!highlight bash chmod 755 /etc/rc.d/rc.mysqld mysql_install_db --user=mysql chown -R mysql.mysql /var/lib/mysql /etc/rc.d/rc.mysqld start mysql_secure_installation # set root password: Y # Remove anonymous users: Y # Disallow root login remotely? [Y/n] Y # Remove test database and access to it? [Y/n] Y # Reload privilege tables now? [Y/n] Y mysql -p show databases; exit }}} == Bash settings == File ~/.bashrc {{{#!highlight bash alias ls='ls --color' #PS1="\D{%Y-%m-%d}T\A \u@\H:\w \r\n\$" #PS1="\e[0;33m\]\D{%Y-%m-%d}T\A\[\e[m\]\r\n\e[0;32m\]\u@\H:\w\$\[\e[m\] " PS1="\e[0;33m\]\D{%Y-%m-%d}T\A\[\e[m\] \e[0;32m\]\u@\H:\w\r\n\$\[\e[m\] " export PATH="/home/vitor/narwhal/bin:$PATH" }}} * source ~/.bashrc == VirtualBox guest additions == * Insert guest additions CD image {{{#!highlight bash mount /dev/sr0 /mnt/cdrom cd /mnt/cdrom ./VBoxLinuxAdditions.run }}} Avoids mouse jumping around on X. Also when using the guest VM, press Ctrl+I to disable mouse integration, to avoid mouse jumping around. == Apache Maven installation == {{{#!highlight bash cd /usr/local wget http://archive.apache.org/dist/maven/binaries/apache-maven-3.2.1-bin.tar.gz tar xvzf apache-maven-3.2.1-bin.tar.gz ln -s apache-maven-3.2.1-bin maven # Add /usr/local/maven/bin to PATH on /etc/profile or ~./bashrc }}} == Change display to 1600x900x32 == Run VBoxManage in the host * VBoxManage setextradata "Slack64v14" "CustomVideoMode1" "1600x900x32" Change /etc/lilo.conf vga=864 Change /etc/X11/xorg.org to have "1600x900" in the several modes. * Modes "1600x900" "1152x864" "1024x768" "800x600" "640x480" == Netbeans 7.4 == [[Java/Netbeans]] == Squirrel == [[Squirrel]] == Thunderbird == Move the local folder to ~/ThunderbirdMail. == vi == [[vim]] Zenburn == Emacs == [[Emacs]] Zenburn == Multilib 32-bit == http://www.slackware.com/~alien/multilib/ As root: * lftp -c 'open http://slackware.com/~alien/multilib/ ; mirror -c -e 14.1' * cd 14.1 * upgradepkg --reinstall --install-new *.t?z * upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z Reboot == Skype installation == {{{#!highlight sh wget http://download.skype.com/linux/skype-4.3.0.37.tar.bz2 mkdir /usr/local/skype cp skype-4.3.0.37.tar.bz2 /usr/local/skype/ cd /usr/local/skype/ tar xvif skype-4.3.0.37.tar.bz2 cd /usr/local/skype/skype-4.3.0.37 mv * ../ cd .. rmdir skype-4.3.0.37 chmod 755 skype # I agree }}} == Apply portuguese keyboard on connecting a keyboard == Sometimes a USB keyboard can disconnect and connect on it's own, and loose the settings. Check the file to see if the settings are applied '''/var/log/Xorg.0.log''' '''/etc/X11/xorg.conf.d/keyboard.conf''' {{{ Section "InputClass" Identifier "Keyboard Defaults" MatchIsKeyboard "yes" #MatchProduct "keyboard" Option "XkbLayout" "pt" EndSection }}} == Install the VM in a Lenovo Thinkpad L440 Core i5 == === Init with runlevel 1 === Linux init=/bin/bash root=/dev/sda1 rw === Changes in display === Run VBoxManage in the host * VBoxManage setextradata "Slack64v14" "CustomVideoMode1" "1366x768x32" /etc/X11/xorg.conf {{{ Section "Module" Load "dbe" # Double buffer extension SubSection "extmod" Option "omit xfree86-dga" # don't initialise the DGA extension EndSubSection Load "type1" Load "freetype" Load "glx" EndSection Section "Files" FontPath "/usr/share/fonts/local/" FontPath "/usr/share/fonts/misc/" FontPath "/usr/share/fonts/OTF/" FontPath "/usr/share/fonts/TTF/" FontPath "/usr/share/fonts/Type1/" FontPath "/usr/share/fonts/CID/" FontPath "/usr/share/fonts/Speedo/" FontPath "/usr/share/fonts/75dpi/:unscaled" FontPath "/usr/share/fonts/100dpi/:unscaled" FontPath "/usr/share/fonts/75dpi/" FontPath "/usr/share/fonts/100dpi/" FontPath "/usr/share/fonts/cyrillic/" EndSection Section "ServerFlags" EndSection Section "InputDevice" Identifier "Keyboard1" Driver "kbd" EndSection Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "PS/2" Option "Device" "/dev/mouse" EndSection Section "InputClass" Identifier "Mouse1" MatchIsPointer "on" Option "Emulate3Buttons" "on" EndSection Section "Monitor" Identifier "My Monitor" HorizSync 31.5 - 50.0 VertRefresh 40-90 EndSection Section "Device" Identifier "VESA Framebuffer" Driver "vboxvideo" EndSection Section "Screen" Identifier "Screen 1" Device "VESA Framebuffer" Monitor "My Monitor" DefaultDepth 24 Subsection "Display" Depth 8 Modes "1366x768" "1024x768" "800x600" "640x480" EndSubsection Subsection "Display" Depth 16 Modes "1366x768" "1024x768" "800x600" "640x480" EndSubsection Subsection "Display" Depth 24 Modes "1366x768" "1024x768" "800x600" "640x480" EndSubsection Subsection "Display" Depth 32 Modes "1366x768" "1024x768" "800x600" "640x480" EndSubsection EndSection Section "ServerLayout" Identifier "Simple Layout" Screen "Screen 1" InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection Section "ServerFlags" Option "DontZap" "true" EndSection }}} === Changes in sound settings === * Change from Host audio driver from Null to Windows Direct Sound * Audio controller: ICH AC97 === Pidgin-sipe build === {{{#!highlight sh cd /tmp wget http://slackbuilds.org/slackbuilds/14.1/network/pidgin-sipe.tar.gz tar xvzf pidgin-sipe.tar.gz cd pidgin-sipe wget http://downloads.sourceforge.net/sipe/pidgin-sipe-1.13.3.tar.bz2 su ./pidgin-sipe.SlackBuild installpkg /tmp/pidgin-sipe-1.13.3-x86_64-2_SBo.tgz # [[attachment:pidgin-sipe-1.13.3-x86_64-2_SBo.tgz]] }}} === Local DNS === * chattr -i /etc/resolv.conf * nano /etc/resolv.conf {{{ domain bitarus.allowed.org nameserver 127.0.0.1 }}} * chattr +i /etc/resolv.conf Named/bind configuration in /etc/named.conf {{{ options { directory "/var/named"; // Google DNS servers forwarders{8.8.8.8;8.8.4.4;}; }; // a caching only nameserver config zone "." IN { type hint; file "caching-example/named.root"; }; zone "localhost" IN { type master; file "caching-example/localhost.zone"; allow-update { none; }; }; zone "0.0.127.in-addr.arpa" IN { type master; file "caching-example/named.local"; allow-update { none; }; }; logging { channel my_named_channel { file "/tmp/named.log"; // syslog info; // Set the severity to dynamic to see all the debug messages. severity dynamic; print-time yes; print-severity yes; print-category yes; }; category queries { my_named_channel; }; category client { my_named_channel; }; category default { default_syslog; }; }; }}} Start/stop with /etc/rc.d/rc.bind start /etc/rc.d/rc.bind stop == Portable VirtualBox == http://www.vbox.me/ Portable-VirtualBox is a free and open source software tool that lets you run any operating system from a usb stick without separate installation. VirtualBox needs several kernel drivers installed and needs to start several services: if the drivers and services are not already installed you’ll need administrator rights to run Portable-VirtualBox. == Packages updates Slackware64 14.1 == * Check patches/packages and patches/PACKAGES.TXT for the desired Slackware version. * URL for Slackware 14.1 ftp://ftp.slackware.com/pub/slackware/slackware64-14.1/patches/ Get packages to be updated {{{#!highlight sh mkdir -p ~/Downloads/slack6414_1patches cd ~/Downloads/slack6414_1patches wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.1/patches/PACKAGES.TXT cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/out.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/out.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | xargs -i wget ftp://ftp.slackware.com/pub/slackware/slackware64-14.1/patches/packages/{}.txz mv * ~/Downloads/slack6414_1patches }}} == Packages updates Slackware64 14.2 == * Check patches/packages and patches/PACKAGES.TXT for the desired Slackware version. * URL for Slackware64 14.2 ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/ Get packages to be updated {{{#!highlight sh # as root URL_PATCHES=ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/patches/ PATCHES_FOLDER=~/Downloads/slack14_2_64patches mkdir -p $PATCHES_FOLDER cd $PATCHES_FOLDER rm PACKAGES.TXT* wget $URL_PATCHES/PACKAGES.TXT head PACKAGES.TXT cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/outpatches.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/outpatches.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | sed "s/'//g" | xargs -i wget $URL_PATCHES/packages/{}.txz # should only have the missing patches to install cd /tmp/packages ls *.txz | xargs -i upgradepkg {} mv * $PATCHES_FOLDER }}} == Update kernel == {{{#!highlight sh function get_packages { cd /tmp/packages BASE=http://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/slackware64-14.2/patches/packages/linux-4.4.172 wget $BASE/kernel-firmware-20190118_a8b75ca-noarch-1.txz wget $BASE/kernel-generic-4.4.172-x86_64-1.txz wget $BASE/kernel-headers-4.4.172-x86-1.txz wget $BASE/kernel-huge-4.4.172-x86_64-1.txz wget $BASE/kernel-modules-4.4.172-x86_64-1.txz wget $BASE/kernel-source-4.4.172-noarch-1.txz } function update { cp /etc/lilo.conf /etc/lilo.conf.old20190305 ls /boot cd /tmp/packages upgradepkg kernel-*.txz # uname -a says Linux c850d 4.4.14 #1 SMP /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.172 | bash ls /boot cat /etc/lilo.conf | grep image echo "Check content, image should have kernel 4.4.172" read echo "Going to execute lilo" lilo mv *.txz /root/Downloads/slack14_2_64patches } get_packages #update }}} == LVM + virtualbox == * Logical Volume Manager * https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) * http://www.unixwerk.eu/linux/slack/lvm2root.html {{{#!highlight sh wget http://ftp.slackware.com/pub/slackware-iso/slackware64-14.2-iso/slackware64-14.2-install-dvd.iso # http://www.slackware.com/~alien/archive/13.1/README_LVM.TXT # virtualbox # Slack64LVM # new linux other linxu 64-bit # 512 RAM # VDI fixed size 10GB # start # select slackware64-14.2-install-dvd.iso # start # boot: # 1, select keyboard # qwerty/pt.map # 1 # root # create 2 partitions ... fdisk /dev/sda # n p 1 +512M # n p 2 +9.5G # t 2 L 8e # w # LVM stuff pvcreate /dev/sda2 vgcreate sysvg /dev/sda2 lvcreate -L 9G -n root sysvg pvscan # setup # target # /dev/sysvg/root # quick format, ext 4 # /dev/sda1 # quick format, ext4 # mount point /boot # fstab # /dev/sysvg/root for the root directory (/) # /dev/sda1 for /boot # mount point /boot # install from dvd # auto # package A N # full # skip simple ok # no utf8 # mbr # imps2 # no gpm # configure net, yes # hostname darkstar example.org dhcp yes # inetd ssh syslog messagebus # no custom fonts # utc no hw clock # no reboot chroot /mnt $( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r ) # /boot/initrd.gz cat /etc/lilo.conf | grep -v "#" vi /etc/lilo.conf image = /boot/vmlinuz-generic # comment root # root= initrd=/boot/initrd.gz label=Linuxtest lilo exit reboot # login df -h # used 959M ping www.sapo.pt # Install guest additions mount /dev/sr0 /mnt/cdrom cd /mnt/cdrom ./VBoxLinuxAdditions.run reboot }}} == Packages updates Slackware64 15.0 == {{{#!highlight sh sudo bash URL_PATCHES=ftp://ftp.slackware.com/pub/slackware/slackware64-15.0/patches/ PATCHES_FOLDER=~/Downloads/slack15_0_64patches mkdir -p $PATCHES_FOLDER cd $PATCHES_FOLDER rm PACKAGES.TXT* wget $URL_PATCHES/PACKAGES.TXT head PACKAGES.TXT cat PACKAGES.TXT | grep "PACKAGE NAME" | awk '//{print $3}'| sed 's/.txz//g' | xargs -i ls /var/log/packages/{} &> /tmp/outpatches.txt ;mkdir -p /tmp/packages;cd /tmp/packages; cat /tmp/outpatches.txt | grep cannot | awk '//{print $4}' | sed 's/\/var\/log\/packages\///g' | sed 's/://g' | sed "s/'//g" | xargs -i wget $URL_PATCHES/packages/{}.txz cd /tmp/packages ls *.txz | xargs -i /sbin/upgradepkg {} mv * $PATCHES_FOLDER exit }}} == Slackpkg update kernel 5.15.139 == {{{#!highlight sh slackpkg update slackpkg upgrade-all /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 5.15.139 mkinitrd -c -k 5.15.139 -f ext4 -r /dev/sda5 -m usb-storage:ums-realtek:ehci-hcd:ehci-pci:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz /sbin/mkinitrd -c -k 5.15.139 -f ext4 -r /dev/sda5 -m usb-storage:ums-realtek:ehci-hcd:ehci-pci:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz /sbin/lilo reboot uname -a }}}