How to linux burn ISO images to Cds

[root@kgc ~]# cdrecord -scanbus
scsibus1:
1,0,0    100) ‘HL-DT-ST’ ‘DVD   ‘ ‘A101’ Removable CD-ROM
1,1,0    101) *
1,2,0    102) *
1,3,0    103) *
1,4,0    104) *
1,5,0    105) *
1,6,0    106) *
1,7,0    107) *
[root@kgc ~]# cdrecord -v -dao dev=1,0,0 /media/iso/install-cd.iso
TOC Type: 1 = CD-ROM
scsidev: ‘1,0,0’
Track 01:  642 of  642 MB written (fifo 100%) [buf  70%]  24.4x.
Track 01: Total bytes read/written: 673939456/673939456 (329072 sectors).
Writing  time:  282.118s
Average write speed  15.6x.
Min drive buffer fill was 68%
Fixating…
wodim: fifo was 0 times empty and 9943 times full, min fill was 93%.
[root@kgc ~]# eject

ok, that’s all.

Vino Vnc Server Install on Centos 6.3

[root@kgcentos ~]# yum groupinstall Desktop
[root@kgcentos ~]# netstat -patun | grep vino
tcp 0 0 :::5901 :::* LISTEN 14983/vino-server
[root@kgcentos ~]# vino-preferencesvino
In this dialog the following configuration options are available:
* Allow others to view your desktop – Activates remote desktop access for viewing purposes.
* Allow other users to control your desktop – Allows users accessing your remote desktop to control the desktop. In other words the remote user can do anything to your desktop that they want using their mouse and keyboard as if they were sitting physically at the local system.
* You must confirm each access to this machine – When selected, this option causes a dialog to appear warning you of an attempt by a remote user to connect and prompting you to confirm or deny the connection. If you are likely to want to log in remotely you will need to turn this off since you will most likely not be at the local system to accept your own connection.
* Require the user to enter this password – Specifies a password which must be entered by the remote user to access your desktop. It is strongly advised that you select this option and specify a password.
* Configure network automatically to accept connections – Instructs the system to automatically accept remote desktop connections. This is the setting that you will want to activate before leaving your desk to travel knowing you will need remote access while you are away.
* Always display icon – Causes the remote desktop icon to appear in the Notification area of the top status bar when remote desktop access is enabled (even when a remote user is not connected).
vncviewer localhost:5900
* Only display an icon when there someone is connected – Displays an icon on the Notification area of the top status bar when a user is remotely connected to the desktop.
* Never display an icon – The Notification icon is never displayed regardless of the current state of the remote desktop system.
* Finally this screen specifies the command to run on the remote system to access the desktop. Once you have configured Remote Desktop access you are almost ready to try connecting.
[root@kgcentos ~]# ssh root@otherhost
[root@otherhost ~]# vncviewer kgcentos:5901 OR to use windows vnc-viewer

vnc

Ok. i am going to tell about vnc-server’s install-configuration and use, that’s all.

Trend Micro Smart Protection Server Password Reset

This documents only Redhat base to Trend Micro Smart Protection Server’s.

All Redhat Systems as Single user mode will use us.

Firstly while system start Grub menu show press anykey on keyboard.
Use the arrows to select the boot entry you want to modify.
Press e to edit the entry.
Use the arrows to go to rescue system kernel line.
Press a or e to append this entry.
At the end of the line add the word single or the number 1.
Press Enter to accept the changes.
Press b to boot this kernel.

After the system is turned on.
Once you get the # prompt execute passwd command to set new root password.
Next and end step, Reboot the system in normal mode and login as root or admin with new password.

for example;

# passwd root
new password: ****
valid password: ****

Ok. Thats all

the use to rpmforge install ffmpeg on Centos 6.3

###Firstly install rpmforge

##################################rpmforge-install
rpm –import http://apt.sw.be/RPM-GPG-KEY.dag.txt
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
##################################rpmforge-install

###Then install ffmpeg use yum
yum install ffmpeg

Thats all

Write service and add startup on Centos 6.3

For example rsyncd daemon;

####Firstly create service under init.d

nano /etc/init.d/rsyncd
##################################rsync –daemon
#!/bin/bash

# Source function library.
. /etc/rc.d/init.d/functions

[ -f /usr/bin/rsync ] || exit 0

case “$1” in
restart)
action “Stopping rsyncd: ” killall rsync
action “Starting rsyncd: ” /usr/bin/rsync –daemon
;;
start)
action “Starting rsyncd: ” /usr/bin/rsync –daemon
;;
stop)
action “Stopping rsyncd: ” killall rsync
;;
*)
echo “Usage: rsyncd {start|stop}”
exit 1
esac
exit 0
##################################rsyncd.conf

####Secondly modify rsyncd.conf

nano /etc/rsyncd.conf
##################################rsyncd.conf
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock


path = /home/kgc
comment = yaz kis
uid = nobody
gid = nobody
read only = no
list = yes
dont compress = *.*

path = /home/kgc/mevsimler
comment = manzaralar
uid = nobody
gid = nobody
read only = no
list = yes
dont compress = *.*
##################################rsyncd.conf

####Thirtly be startup auto start rsyncd daemon

nano /etc/rc.local
##################################rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/init.d/rsyncd start
##################################rc.local

VSFTPD Install on Centos 6.3

##################################SeLinux
getenforce
setenforce 0
nano /etc/selinux/config
reboot
##################################SeLinux
yum install vsftpd ftp
chkconfig –levels 23 vsftpd on
useradd -m -d /home/video kgc
passwd sifre1

nano /etc/vsftpd/vsftpd.conf
##################################VSFTPD.CONF
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd’s
# capabilities.
#
# Allow anonymous FTP? (Beware – allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd’s)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages – messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using “root” for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING – changing this filename affects /etc/logrotate.d/vsftpd.log
xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command “SIZE /big/file” in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the “-R” option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as “ncftp” and “mirror” assume
# the presence of the “-R” option, so there is a strong case for enabling it.
ls_recurse_enable=YES
#
# When “listen” directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=NO

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
##################################VSFTPD.CONF

service vsftpd restart

netstat -patun | grep ftp
netstat -patun | grep vsftpd
tail -f /var/log/xferlog

LAMP (Linux, Apache, MySQL, PHP) Install on Centos 6.3

#######################################LAMP INSTALL
yum install mysql mysql-server
chkconfig –levels 23 mysqld on
/etc/init.d/mysqld start

mysql_secure_installation
#################################mysql_secure
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] <– Y
New password: <– sifre1
Re-enter new password: <– sifre1
Password updated successfully!
Reloading privilege tables..
… Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] <– Y
… Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <– n
… Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] <– n
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <– Y
… Success!

Cleaning up…

All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

#################################mysql_secure

yum install httpd
chkconfig –levels 23 httpd on
/etc/init.d/httpd start

yum install php
/etc/init.d/httpd restart

yum install nano
nano /var/www/html/info.php
##################################info.php

##################################info.php
yum search php
yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc
yum install php-pecl-apc

/etc/init.d/httpd restart
#######################################LAMP INSTALL

linux cli mail send

How to use Mail command;

Firstly, postfix, sendmail such as mail programs installed on system. for test ;

# mail -s “test” user@domain.com

you can writed and enter. if you recive mail everythings ok. else you can check services.

for check service;

# service sendmail status
# service sendmail restart

we can contiune, by th way command’s arguments below;

-s subject (The subject of the mail)
-c email-address (Mark a copy to this “email-address”, or CC)
-b email-address (Mark a blind carbon copy to this “email-address”, or BCC)

Shortly mail command tutorial;

# history | mail -s “zimbra disk extend operation” user@domain.com
# echo “mail body text” | mail -s “zimbra disk extend operation” user@domain.com
# echo “mail body text” | mail -s “zimbra disk extend operation” -c cc@domain.com -b bcc@domain.com user@domain.com
# mail -s “zimbra disk extend operation” user@domain.com /tmp/kgc_nagios_status.log

BashScript as use;
#!/bin/bash
cat /proc/loadavg >> /tmp/kgc_nagios_status.log
mail -s “nagios server status” user@domain.com < /tmp/kgc_nagios_status.log

ok, thats all for now.

Kasım Gökhan Coşkun
Voluntary Open Source
kgcoskun.com
twitter.com/kgcoskun

Guest Linux /OS .VDI extend for Windows VirtualBox

Windows Virtual Box da kurulu Centos OS için .VDI Disk Büyütme işlemi

İlk olarak Windows üzerinden VirtualBox da kullanılan VM’in disk bilgisini aşağıdaki komutu kullanarak görebilirsiniz.
Disk Info
C:\Program Files\Oracle\VirtualBox>VBoxManage showhdinfo “X:\KGC-VM\centos 6.3\opt.vdi”

UUID:                 f09c5998-611d-4098-8dbb-2af50aa444a1

Accessible:           yes

Logical size:         8000 MBytes

Current size on disk: 18 MBytes

Type:                 normal (base)

Storage format:       VDI

Format variant:       dynamic default

In use by VMs:        centos 6.3 (UUID: 99dcb451-9251-4f50-a952-15ff02c1eee6)

Location:             X:\KGC-VM\centos 6.3\opt.vdi

Guest OS olarak Centos 6.3 kullanmıştım. Centos üzerinden disk bilgilerini görelim.
 centos_ext4_1
VirtualBox içindeki .VDI disk’i  “VBoxManage modifyhd” komut ve referansı ile Extend ediyoruz.
.VDI disk extend
C:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd “X:\KGC-VM\centos 6.3\opt.vdi” –resize 15000
Disk Info
C:\Program Files\Oracle\VirtualBox>VBoxManage showhdinfo “X:\KGC-VM\centos 6.3\opt.vdi”

UUID:                 f09c5998-611d-4098-8dbb-2af50aa444a1

Accessible:           yes

Logical size:         15000 MBytes

Current size on disk: 18 MBytes

Type:                 normal (base)

Storage format:       VDI

Format variant:       dynamic default

In use by VMs:        centos 6.3 (UUID: 99dcb451-9251-4f50-a952-15ff02c1eee6)

Location:             X:\KGC-VM\centos 6.3\opt.vdi

Extend işleminden sonra Centos üzerinden tekrar disk bilgilerini görelim
 centos_ext4_2
Bu işlemler sonrası Centosu “Shutdown” ediyoruz ve Live Gparted .iso’ sunu kullanarak boot ediyoruz ve aşağıdaki işlemleri uygulamaya devam ediyoruz.
GParted gibi Live olarak çalışabilen *Nix sistem ile VM makine boot edilir. Ardından GParted ekrenı üzerinden Extend edilecek Disk Seçilir ve Üzerine Sağ Tıklanarak “Boyutlandır/Taşı” seçilir.
GParted
 gparted_0
Genişletirken yeni boyutu Toplam Boyut olarak girilmeli Örn. 5 GB Part 10 GB olacaksa son hali yani 15 GB olarak yeni boyutu yazılır. Ardındaki ve Önündeki boş alanları da mutlaka dikkate alınmalıdır. Bu boş alanın nereden kesileceğini gösterir.
 gparted_1
 gparted_3
İşlem bittikten sonra mutlaka Apply denilmelidir.
 gparted_4
Kasım Gökhan Coşkun
Voluntary Open Source
kgcoskun.com
twitter.com/kgcoskun
Takip Et

Her yeni yazı için posta kutunuza gönderim alın.