Skip to main content

Posts

Showing posts from 2013

about systemd: how to change default runlevel (previously using inittab)

systemd does not use /etc/inittab file to change the default runlevel. systemd uses symlinks to point to the default runlevel. You have to delete the existing symlink first before creating a new one. # rm /etc/systemd/system/default.target example to switch to runlevel 3 : # ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target next example if you want to switch to run level 5 : # ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target another options that may apply : poweroff.target --> runlevel 0 rescue.target    --> runlevel 1 multi.user.target --> runlevel 2,3,4 graphical.target --> runlevel 5 reboot.target --> runlevel 6 source: http://fedoraproject.org/wiki/Systemd

about rdesktop commands

basic usage to access the remote server $ rdesktop (serveraddr) example to access the computer on 192.168.1.1 $ rdesktop 192.168.1.1 to enable full screen mode $ rdesktop -f 192.168.1.1 to set spesific windows size $ rdesktop -g 800x600 192.168.1.1 (some common screen resolution can be use: 800x600, 1024x768, 1280x1024) sharing files to share a local directory with windows os remote server $ rdesktop -r disk:(sharename)=(path) (serveraddr) example to access the remote server on 192.168.1.1 and the sharing directory /home/vadya/pub/ using network share name "sharing" $ rdesktop -r disk:sharing=/home/vadya/pub 192.168.1.1 optimizing speed enabling compression (-z) and disabling mouse events (-m) will reduce network bandwidth and can make the connection much more responsive.  $ rdesktop -z -m 192.168.1.1 using a smaller color palette helps reduce network bandwidth $ rdesktop -a 16 192.168.1.1 source: http://wiki.rrc.uic.edu/wiki/RRC-SCS:_Using_rd...

openfire: instant messaging server

Openfire is a powerful instant messaging (IM) and chat server that implements the XMPP protocol. This document will guide you through installing Openfire. For a full list of features and more information, please visit the Openfire website: http://www.igniterealtime.org/projects/openfire/ A. INSTALLATIONS first download the binary package from : http://www.igniterealtime.org/openfire-3.8.1-1.i386.rpm then r un it using your package manager to install Openfire to /opt/openfire (as root): rpm -ivh openfire_3_0_0.rpm Note: if you are using the .tar.gz build, it does not contain a bundled Java runtime (JRE). Therefore, you must have JDK or JRE 1.5.0 (Java 5) or later installed on your system. You can check your java version by typing "java -version" at the command line and (if necessary) upgrade your Java installation by visiting http://java.sun.com. B. SETUP the database In the Openfire setup tool, use the following values: driver: com.mysql.jdbc...

sysVinit versus systemd

here are examples of the systemctl version of a few common chkconfig and service commands. 1. to list processes # chkconfig --list # systemctl list-units 2. to enable a service # chkconfig (servicename) on # systemctl enable (servicename).service 3. to disable a service # chkconfig (servicename) off # systemctl disable(servicename).service 4. to start a service # service (servicename) start # systemctl start (servicename).service 5. to stop a service # service (servicename) stop # systemctl stop (servicename).service 6. to see the status of a service # service (servicename) status # systemctl status (servicename).service or # systemctl is-active (servicename).service source: http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet

how to create guest headless VMs

create VMs in guest headless mode guest headless is a term to create virtual guest by using the linux terminal (CLI). the computer server facilitates installation through command lines, and guest installation process will be done by remote application (ssh). here are the steps how to create fedora 18 (for example) virtual machine using image file (iso).  1. creating guest name $ VBoxManage createvm --name "fedora 18" --register 2. allocating amounts of RAM and networking type $ VBoxManage modifyvm "fedora 18" --ostype fedora --memory 1024 --acpi on --pae on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 3. create amount of hard disk capacity $ VBoxManage createhd --filename fedora18.vdi --size 10000 4. selecting hard disk device type $ VBoxManage storagectl "fedora18" --name "IDE Controller" --add ide 5. connecting fedora18.vdi file to hard disk device type $ VBoxManage storageattach "fedora 18" --storagectl ...

What is Network Address Translation?

Network Address Translation Network Address Translation (NAT) is the process where a network device, usually a firewall, assigns a public address to a computer (or group of computers) inside a private network. The main use of NAT is to limit the number of public IP addresses an organization or company must use, for both economy and security purposes. The most common form of network translation involves a large private network using addresses in a private range (10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, or 192.168.0 0 to 192.168.255.255). The private addressing scheme works well for computers that only have to access resources inside the network, like workstations needing access to file servers and printers. Routers inside the private network can route traffic between private addresses with no trouble. However, to access resources outside the network, like the Internet, these computers have to have a public address in order for responses to their requ...

CentOS 6.4 Released

March 12th 2013 The CentOS team is pleased to announce the immediate availability of CentOS 6.4 for i386 and x86_64 architectures. CentOS 6.4 is based on the upstream release EL 6.4 and includes packages from all variants. All upstream repositories have been combined into one, to make it easier for end users to work with. There are some very important changes to this release compared with the previous versions of CentOS and we highly recommend reading this announcement along with the Release Notes . Especially take a look at the "Known Issues" section. There is also a minimal install CD that will get you a very small base install that you can add to. Download link: i386 | x86_64

how to install gui on base server configuration installation of enterprise linux

this is tutorial how to install desktop environment on base server configuration installation of enterprise linux installation desktop environment (gnome) install several group packages below : # yum groupinstall “Base” # yum groupinstall “X Window System” # yum groupinstall “Desktop” # yum groupinstall “General Purpose Desktop” to install web browser application (mozilla firefox)  : # yum groupinstall “Internet Browser” to install office and mail client applications (openoffice.org, evolution)  : # yum groupinstall “Office Suite and Productivity” notes : *enterprise linux distribution on the example is Oracle Linux Server 6.0. *group package 'Office Suite and Productivity' is not available on DVD repository OLS 6.0.  *for fedora install group package “X Window System” and “GNOME Desktop Environment” only.

about gigabyte NIC onboard not detected on enterprise linux distribution

on several gigabyte motherboard, onboard network interface card  will not be detected on enterprise linux distribution (e.g. scientific linux, oracle linux server, etc). alternatively you must supply add-on card. or if you insist to use the onboard card, you must install the unofficial nic driver. this is tutorial how to install driver for onboard network interface card GIGABYTE first of all prepare your system. make sure it has package group "Development Tools" installed. if it has not, install it # yum groupinstall “Development Tools” download the source code : https://www.dropbox.com/s/na91bu4az4p9827/AR81Family-linux-v1.0.1.14.tar.gz extract the source code : # tar zxvf AR81Family-linux1.0.1.14.tar.gz the extraction process will make the new directory "AR81Family*", change to the directory # cd AR81Family* compile the source by type on terminal : # make then, # make install wait until the compiling process finish. next make the new scrip...

how to install and uninstall vmware player

this is tutorial to install and uninstall vmware player first install group package called Development Tools to your linux system # yum groupinstall “Development Tools” then obtain a copy vmware bundle package from  www.vmware.com   change the permission of the package # chmod 755 VMware-Player-4.0.2-591240.i386.bundle to install it simply type on terminal # ./VMware-Player-4.0.2-591240.i386.bundle or if you decide to uninstall it, simply  type # vmware-installer -u vmware-player

how to install oracle virtualbox 4.*

Install VirtualBox 4.0.8 on Fedora 15/14, CentOS/Red Hat (RHEL) 5.6/6 Virtualbox-logo-smallOracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software. VirtualBox supports a large number of guest operating systems: Windows 3.x, Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows 7, DOS, Linux (2.4 and 2.6), Solaris, OpenSolaris, OpenBSD. This guide shows howto install VirtualBox 4.0 (currently 4.1.2) on Fedora 15, Fedora 14, Fedora 13, Fedora 12, CentOS 5.6, Red Hat (RHEL) 5.6 and Red Hat (RHEL) 6. This howto uses Virtual Box yum repositories. 1. Change to root User su - ## OR ## sudo -i 2. Install Fedora or RHEL Repo Files cd /etc/yum.repos.d/ ## Fedora 15/14/13/12 and RHE...

how to create local repository

this is tutorial how to create local repository using dvd-iso file   first, create mount point directory where iso file to be mounted ex. # mkdir /mnt/iso/ then mounting your iso file to mount point directory using the syntax # mount -o loop file.iso mountdir ex. # mount -o loop linux.iso /mnt/iso/ create configuration file for yum # vim /etc/yum.repos.d/local.repo [local-repo] name=local-repo baseurl=file:///mnt/iso/ gpgcheck=0 enabled=1 check the yum configuration by typing # yum clean all # yum list packagename ex. # yum list nmap

Reminder: Fedora 16 end of life on 2013-02-12

Reminder: Fedora 16 end of life on 2013-02-12 Fedora 16 will reach end of life on 2013-02-12, and no further updates will be pushed out after that time. Additionally, with the recent release of Fedora 18, no new packages will be added to the Fedora 16 collection. http://lists.fedoraproject.org/pipermail/announce/2013-January/003138.html

about getsebool and setsebool

The setsebool is used to set SELinux boolean value i.e. various configurations can be enabled or disabled using this tool. In other words, the setsebool command switches on and off the protection of SELinux. Type getsebool -a to see all such options which can be enabled or disabled at run time: e.g. # getsebool -a The following should give you a complete listing of all the vsftpd switches: e.g.  # getsebool -a | grep ftp  For example, if httpd_disable_trans set to 1, it will disable SELinux protection for  Apache web server. To disable it, enter:  # setsebool -P httpd_can_network_connect=1 To enable it, enter:    # setsebool -P httpd_can_network_connect=0

how to reset root password

this is the tutorial how to reset your root password. it can be applied to redhat enterprise linux-based (oracle linux, centos, scilinux, fedora ). 1. restart your system, wait until it boot-up. press 'esc' to enter the GRUB menu 2. select from GRUB menu your linux kernel, it usually like this "kernel-vmlinuz-*" , press 'e' to edit 3. edit the at last line (it usually like this "rhgb linux quiet"), change it with :     rhgb linux single     or,     rhgb linux quiet 1 (this two lines above works well with fedora), or     rhgb linux single init=/bin/bash (use this line if the previous doesn't work, especially with enterprise-based distribution) press 'enter' then 4. back to the GRUB menu, choose the kernel and press 'b' to boot 5. wait for the system to boot-up and if the change succeed it will bring the system to login directly as root user 6. type command 'passwd' to enter your new root password note: ...

about crontab

syntax : crontab -u (username) {-e | -l | -r } -u : user executes crontab -e : edit crontab list -l : show contab list -r : remove crontab making crontab m  h  dom  mon  dow  command m : minute, 0 - 59, * h : hour, 0 -23, * dom : day of month, 1 - 31 mon : month, 1 - 12 dow :day of week, 0 - 6 (where 0=sunday, 1=monday) command examples : 30  *  *  * * /etc/backup.sh

about sshd settings

ssh (secure shell) - service name : sshd - log file /var/log/secure* /var/log/audit/audit.log - default configuration files and ssh ports /etc/ssh/sshd_config     --> openssh server configuration file /etc/ssh/ssh_config     --> openssh client configuration file ~/.ssh/     --> user ssh configuration directory ~/.ssh/authorized_keys    ---> lists public key (RSA or DSA) that can be used to log into the user's account /etc/nologin     --> if the file exists, sshd refuses to let anyone except root log in /etc/hosts.allow   /etc/hosts.deny     --> these two file are access control list that should be enforced by tcp-wrappers defined here - ssh default port    ---> tcp:22 - examples of using tcp wrappers for sshd allow ssh only from 192.168.1.2 172.16.23.12 put the line in /etc/hosts.allow sshd : 192.168.1.2 17...

how to install oracle linux from usb stick

here are tutorial making usb flashdisk as a media to install oracle linux to your pc If you want to install Oracle Linux from a USB drive, keep in mind that not all hardware supports USB device booting.Also, during the boot process you may have to instruct your BIOS to boot from that specific USB device. Finally, keep in mind that this method of installation is not officially sanctioned by Oracle support. Prerequisites 1. The first thing you will need is an ISO image of Oracle Linux. The quickest way to obtain an ISO image is from the Oracle Software Delivery Cloud 2. You will need a desktop or server system running Oracle Linux in order to prepare your USB drive. 3. You will also need to download this script to create the bootable USB drive. 4. Your Oracle Linux system will also need the package syslinux installed. You can install syslinux using yum with the following command: # yum install syslinux Marking Partition One as Bootable Once your prerequisites are in order...

mariadb yum repository

# MariaDB 5.5 repository list - created 2013-01-24 12:38 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/rhel6-x86 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 # MariaDB 5.5 repository list - created 2013-01-24 12:38 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/centos6-x86 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 # MariaDB 5.5 repository list - created 2013-01-24 12:38 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/fedora16-x86 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1

selinux not allowing vsftpd accessing homedir

enabling selinux policy for ftp access check the current status of selinux policy : # getenforce check the ftp policy status : # getsebool -a | grep ftp which usually returns the following output : allow_ftpd_anon_write –> off allow_ftpd_full_access –> off allow_ftpd_use_cifs –> off allow_ftpd_use_nfs –> off allow_tftp_anon_write –> off ftp_home_dir --> off                               (change that to on)                                                                    ...

chromium yum fedora repository

# Place this file in your /etc/yum.repos.d/ directory [fedora-chromium-stable] name=Builds of the "stable" tag of the Chromium Web Browser baseurl=http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-$releasever/$basearch/ enabled=1 skip_if_unavailable=1 gpgcheck=0 [fedora-chromium-stable-source] name=Builds of the "stable" tag of the Chromium Web Browser - Source baseurl=http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-$releasever/SRPMS enabled=0 skip_if_unavailable=1 gpgcheck=0

how to create registered user on mail server

create user to access mail server # useradd -s /sbin/nologin username # passwd username example: # useradd -s /sbin/nologin belogix # passwd belogix the user created can access to mail server account, but cannot access the system using registered username. source: http://www.cyberciti.biz/tips/howto-linux-shell-restricting-access.html