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..