24 Ağustos 2012 Cuma

-----

I don't know, if I am alive or not..
----

Maybe you are looking for an answer or a reason to continue breathing..

Trust me it is not that easy to find out. You can not reach it with some stupid clicks..

If you feel like the oxygen you breathe is a waste than dont stop..

But you know that you have the right to live as you wish, like any other creature on this planet..

But the pain inside your chest...

I know..

It will be ok.

Believe me, it will be ok.

You just need, some time and some sunsets to watch..

Just, breathe the earth.

You know that you will survive, dont you...

Take your time..

4 Ağustos 2012 Cumartesi

Asterisk and AMI

ERROR[5534]: utils.c:1211 ast_careful_fwrite: fwrite() returned error: Broken pipe

When ever i used the php script to send commands to asterisk, i got this error..

"The Big Problem"!! was the timeout value i used;

Solution:

This line;
$this->socket = @fsockopen("127.0.0.1","5038", $errno, $errstr, 1);
is changed into this;
$this->socket = @fsockopen("127.0.0.1","5038", $errno, $errstr, 30);

Problem solved..

3 Ağustos 2012 Cuma

Centos 6 and Asterisk

----------------Errors----------------

No DAHDI found. Unable to open /dev/dahdi/ctl: No such file or directory

DAHDI Tools Version - 2.1.0.2
Notice: Configuration file is /etc/dahdi/system.conf
line 0: Unable to open master device '/dev/dahdi/ctl'


---------------Solution---------------
Try using Atrpms by doing

wget http://packages.atrpms.net/RPM-GPG-KEY.atrpms
rpm --import RPM-GPG-KEY.atrpms

After that;
yum install dahdi-linux

31 Temmuz 2012 Salı

Mysql

mysql -p

28 Temmuz 2012 Cumartesi

yum install asterisk-voicemail

Centos 6 and Asterisk

Asterisk can be installed with Add/Remove Software. But when I did so and started it with the command;

service asterisk start

I wanted to use the Graphical User Interface of Asterisk and surprisingly!! dumped into trouble again..

Asterisk Gui also can be loaded by add/remove. Time to configure..

1) /etc/asterisk/http.conf

enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes
redirect = / /static/config/index.html


2) /etc/asterisk/manager.conf

[general]
enabled = yes
webenabled = yes


[administrator]
secret = password
allow=0.0.0.0/0.0.0.0
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

3) From wiki.asterisk ;
chown -R asterisk:asterisk /etc/asterisk/ /var/lib/asterisk /usr/share/asterisk
chmod 644 /etc/asterisk/*

and

ls /var/lib/asterisk/static-http/config && rm -rf /usr/share/asterisk/static-http && ln -s /var/lib/asterisk/static-http /usr/share/asterisk/static-http
And finally got asterisk's web interface..

27 Temmuz 2012 Cuma

Centos Php Mcrypt

First get the epel repository. To do this go to the page fedoraproject.org and choose the epel-release under the header "How can I use these extra packages?".

After that, download the package to a location you like. Open command line, get into the directory that you just placed the new rpm.

rpm -i epel-release*.rpm

This will add the epel repository. Next step is to let yum install what we need..

yum install php-mcrypt

And restart your apache..

This has done the trick in my centos..

26 Temmuz 2012 Perşembe

vsftpd and centos 6 configuration..

I didnt want to use home directory because i would be uploading files to var/www/html folder. But i wanted to lock the user to his/her home directory at the same time. Solution:

1) vsftp.conf configuration
local_enable=YES
wite_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
than save the file..

2) Create a folder in your home dir
mkdir /home/umut/www

3) Bind the real www to the one in your home dir.
mount --bind /var/www/html/ /home/umut/www

{
if you want to (and possibly want to..) create a permanent binding add a line under the /etc/fstab;

/var/www/html  /home/umut/www    none    bind    0       0
}

4) If you have selinux;
setsebool -P ftp_home_dir=1

5)  Restart vsftpd
service vsftpd restart

6) If there are writing problems in www than right click on the /var/www/html and select "user data" in selinux area..

for further information:
http://www.ducea.com/2006/07/27/allowing-ftp-access-to-files-outside-the-home-directory-chroot/

Linux..

When using terminal as the root, if you want to switch between users;

su user_name

is enough. Than use whoami..

Linux how to find which yum package to install..

If you are sure about the location of the executable, than you can make yum, search the packages that uses the same executable.

yum provides /usr/sbin/semanage

My output:
 ......
base                                                     | 3.7 kB     00:00    
extras                                                   | 3.0 kB     00:00    
updates                                                  | 3.5 kB     00:00    
policycoreutils-python-2.0.83-19.24.el6.i686 : SELinux policy core python.....

So after finding out the package, now it is time to install it..

yum -y install policycoreutils-python

25 Temmuz 2012 Çarşamba

vsftpd centos6

Kullanıcının kendi home klasörü altında bağlanmasını değilde, başka bir dizine bağlanmasını istiyorsanız, etc altındaki passwd dosyasında kullanıcının ev dizinini değiştirin..
Directory list yapamıyorsanız muhtemelen hata SELinuxtadır. Kapatın gitsin..
Ama tabii en güzeli kapatmadan halletmek bu işi.

setsebool -P ftp_home_dir=1

24 Temmuz 2012 Salı

----

service mysqld start
service mysqld stop

Centos ve Apache

Apache kurulumundan sonra /etc/httpd/conf altında yer alan httpd.conf dosyasında yapılması gereken ayarlar;
ServerName 192.168.2.4:80

Neredeyse bir gündür sayfaları görüntüleyememe sorunu ile uğraşıyordum. Yetki hatası. Aslında ne basitmiş. html klasörü üzerinde sağ tık ve Permissions altından önce "Read from all httpd scripts and the daemon" ve  sonra "Apply Permissions to Enclosed Files"..

Apachenin komut satırından kontrolü için apachectl scriptini kullanın.
apachectl configtest
apachectl start

Linux..

ifconfig eth0 192.168.2.1 netmask 255.255.255.0
komutu ile adres ataması
route add default gw 192.168.2.1
komutu ile de default gateway yapılandırması yapılabilir..

http://www.cyberciti.biz/faq/rhel-centos-configure-persistent-dhcp-client/
adresinde ise DHCP client olarak otomatik yapılandırılma anlatılmış..

Linux..

file /sbin/init
komutu ile linux sürümünüz 32 bit mi yoksa 64 bit mi öğrenebilirsiniz..

23 Temmuz 2012 Pazartesi

Vi

Editörden çıkmak için : koyduktan sonra q ve enter yapın.
Kaydederek çıkmak içinse q yerine x kullanın.

Linux Mount Usb

Linuxta komut istemi ile usb diskinizi kullanmak için;
Öncelikle
fdisk -l komutu ile sürücünün adını öğrenin.
Sonrasında sürücü içeriğinin bağlanacağı bir klasör yaratın;
mkdir /mnt/sda1
Ve Mount işlemini gerçekleştirin;
mount /dev/sda1 /mnt/sda1

Evet artık cd /mnt/sda1 komutunu verip ardından ls komutunu vererek flash sürücünüzün içeriğine erişebilirsiniz..

19 Temmuz 2012 Perşembe

---

Eskiden kitapların yapraklarını kıvırmaya dayanamazdım. Sanki ayıp olacakmış gibi gelirdi yazılanlara.
Şimdi ne oldu da, büyük büyük katlar oldum kenarlarını acaba??

18 Temmuz 2012 Çarşamba

The Amazing Spider Man

Bir şans Ankarada bulunurken izledim bu filmi. Imax salonunda izlemiş olmamdan mıdır bilmiyorum ama, farklı ellerden çıkma önceki örümcek adamlara göre çok daha keyif aldığım bir film olmuş. Bu yarı adam, yarı böcek tiplemesini içinde barındıran tüm filmler içerisinde en tepeye koyacağım yapıt budur..

17 Temmuz 2012 Salı

---


Eskiden okulda şeyi söylerdik;

Ordaaa, bir köy var uzakta,
o köööy bizim köyümüzdür,
Gitmesekteeee,
Kalmasaktaaa,
o köööy bizim köyümüzdüüüür!!

Deniz e gidemiyor olmam da durumu değiştirmiyor yani..

4 Temmuz 2012 Çarşamba

----

Yazdığım koddaki hatayı tam olarak 8 saatte buldum.
Bakalım hatayı düzeltmek ne kadara mal olacak...
Bazen bu işten nefret ediyorum..

25 Şubat 2012 Cumartesi

----

Bu geceki son telefon görüşmemin üzerine, eve yine topallayarak geldim.
Doktor bu şeyin bende bağımlılık yapacağını, bu nedenle artık vurmayacağını söyledi..

24 Şubat 2012 Cuma

Yalnızlık..

Öyle bir şey ki,
Olmadığında özlem duyarsın,
Biraz nefes alabilsem dersin.
Oysa gerçekten yalnız kalınca..
Alıştığın her ses zihninde at koşturur,
Sen ise, bir o yana bir bu yana boş bakışlarla dolanır durursun.

Ne ararsın?
Duyduğun soluğun sahipleri nerede?

Gördüğün gündüz düşleri dönecek mi hiç gerçeğe?

Alışınca insan, yalnız kalmamaya hiç;
Özler yalnızlığı.

Oysa yalnızlık;
Ne koyudur!
Ne karanlık!
Ne korkutucu!

Yine de,
mecbursa insan,
dost eyler kendini,
kendine..

Sokakta kendi kendine konuşarak yürüyenlere, deliymiş gibi bakmayın.
Onlar yalnızdır sadece..

----

Hayat bazen öyle bir hal alır ki; bir yandan kusarken, bir yandan yürümeye devam edersin..

23 Şubat 2012 Perşembe

Atasözü..

Azönce bir arkadaşım atasözü gibi bir laf etti;

Boynuna tasmayı taktıktan sonra, kimin köpeği olduğunun bir önemi yok..

Kendisini saygıyla anıyorum..

22 Şubat 2012 Çarşamba

Öğüt..

Kol kırılır, yen içinde kalır!

Atalarımız gerçekten biliyorlar bu işi. Unutmamalı, herkesin senden başka en az bir dostu daha vardır kıyıda köşede. Sonra iş, kulaktan kulağa oyununa döner..

Kol kırılır, yen içinde kalır!

26 Ocak 2012 Perşembe

In Time..

- Ne kadar vaktimiz var
- Bir gün...Bir günde bir sürü şey yapabilirsin..

In Time..


Filmi az önce izledim. Hani Justin Timberlake falan var ya, pek bir hevesle izlemeye başlamıştım aslında. Ama ne diyebilirim, filmde ciddi olarak beğendiğim tek şey renklerin kullanımı oldu ve sonunda böööle yavanmış gibi bir his oluştu içimde..
Havada kalmış. Sadece boş zaman varsa izlenir bence.
Sonuç olarak çok zorda kalmazsam bir daha izlemem sanırım..