First open fstab using nano, or your chosen editor:
nano -w /etc/fstab

Next append the following like to the fstab file you just opened:
none /tmp tmpfs nodev,nosuid,noexec 0 0

If you opened using nano you can now close using ctrl+x and then answering “y” to save.
To apply the changes we now need to simply remount:
mount -o remount /tmp

Its always a good idea to test it worked so run the following command:
df -h

Within the output you should see something like:
none 4.1G 0 4.1MG 3% /tmp

There is also a /var/tmp dir that needs to be secured.
So firstly make a backup (don’t skip this step, you need the files in a bit)
mv /var/tmp /var/tmpfiles

We can now make a link to map /tmp to /var/tmp
ln -s /tmp /var/tmp

Restore the files from the backup you made before
cp /var/tmpfiles/* /tmp/

Restore the files from the backup you made before, and make sure that the files in tmpfiles are now in tmp.
ls /var/tmpfiles
ls /var/tmp

If it looks ok, you can remove the tmpfiles directory.
Rm -rf /var/tmpfiles

1 sitemiz var, uzerinde calisan basit php mysql script ile randevu kaydi aliyoruz.
Ama cogu zaman alamiyoruz cunku yogun oldugu zamanlarda anlik 1000 – 1200 request geliyor.
apache dayanmiyor, mysql sapitiyor. sonucta site erisilmez oluyor. apacheyi, phpyi tweak etmek , mysqli tweak etmek sorunu cozmuyor. Sorunun cozumu kuvvetli bir vps ve dogru duzgun hafif ve hizli bir php,mysql altyapisi.
Ubuntu 10.10 ustunde nginx ve php-fpm olabilir — Olamaz — cunku php kodumuz php 5.3 uyumlu degil. O zaman debian lenny? Default olarak php5.2 var? Olabilir ancak Php-FPM default repo larda yok? Derleriz. Bosver standart disina cikma. Ok.
Sonuc: Debian lenny, nginx, php 5.2 (spawn-cgi(lighthttpd)) mysql. Monitor etmek icin nginx destekli Munin. Ok kuruluma basla…

1-debian lenny vpsimizi hazir edelim, guncel edelim.
2-mysql kuralim
aptitude install mysql-server mysql-client
3-nginx kuralim,calistiralim
aptitude install nginx
/etc/init.d/nginx start
4-php 5 kuralim
aptitude install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

nano /etc/php5/cgi/php.ini

en altina ekle

cgi.fix_pathinfo = 1

Debian Lenny icin FastCGI daemon paketi yok o yuzden lighttpd icindeki spawn-fcgi programini kullanicaz.

aptitude install lighttpd

hata vericek port80 kullanimda diye onemli degil kapat gitsin

update-rc.d -f lighttpd remove

Php FasCGI daemonu calistiralim

/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid

bunu /etc/rc.local icine ekleyelim ayni sekilde ki reboot ettigimizdede calissin

nano /etc/rc.local ve ekle yukaridaki satiri

php isimiz bitti

5- nginx i konfigure edelim

nano /etc/nginx/nginx.conf

onemli 3 ayarimiz var

worker_processes 5;
worker_connections 4096;
keepalive_timeout 2;

defaut nginx sitemizi konfigure edelim

server {
listen 80;
server_name _;

access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/nginx-default;
index index.php index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
location /nginx_status {
stub_status on;
access_log off;
allow x.x.x.x;
allow 127.0.0.1;
allow x.x.x.x;
deny all;
}
}

NOT: burada munin ile daha sonra monitor edecegimizden nginixi uygun status kayitlarinida simdiden ekledik. Hazir olsun.
Nginx ayari bitti yeniden baslatim bir tanede info.php atip durumuna bakalim.

nano /var/www/nginx-default/info.php ve ekle

sonra

/etc/init.d/nginx restart

son olarak duruma bakalim , hersey hazir
http://ip.ad.re.si/info.php
http://ip.ad.re.si/nginx_status

6- phpmyadmin kuralim lazim olur
apt-get install phpmyadmin

repodan gelen phpmyadmin sorunsuz sekilde calissin nginximizde
cd /var/www/nginx-default/
ln -s /usr/share/phpmyadmin phpmyadmin

7- MySQL imizi azicik tweak edelim
asagidaki my.cnf gayet guzel is goruyor.

# The MySQL server
[mysqld]
wait_timeout=60
connect_timeout=10
interactive_timeout=120

port = 3306
socket = /var/run/mysqld/mysqld.sock
skip-locking
key_buffer = 384M
key_buffer_size=64M
max_allowed_packet = 1M
table_cache = 1024
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 128M
query_cache_limit = 2M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

8- munin kuralim

apt-get install munin munin-node
/etc/init.d/munin-node restart
cd /var/www/nginx-default/
ln -s /var/www/munin monitoring

http://ip.ad.re.si/monitoring
altinda munin hazir calisiyor. 15 20 dakka beklemek gerek dogru duzgun grafikler icin sadece 🙂

9- munin nginx monitoring ayarlarini yapalim
https://github.com/perusio/nginx-munin adresine gidilir download diyip munin nginx plugin paketi indirilir. kurulumun istedigi nginx status isini halletmistik o zaman:
paketin icindekileri /etc/munin/plugins altina atalim
sonra

nano /etc/munin/plugin-conf.d/munin-node

icine an alta yaz

[nginx_status]
env.url=http://ip.ad.re.si/nginx_status nginx_status

[nginx_connection_request]
env.url=http://ip.ad.re.si/nginx_status nginx_status

[nginx_request]
env.url=http://ip.ad.re.si/nginx_status nginx_status

kaydet cik

/etc/init.d/munin-node restart

diyip bastan calistir munini oldu bitti
http://ip.ad.re.si/monitoring altinda nginx lerimizde geldi.

Gule gule kullanalim olsun da bitsin masallah.

sudo chmod -R 644 * ; sudo chmod -R ugo+X *

veya


find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

!!! EK EK EK !!! 30/12/2010

toptan /home altindaki tum kullanicilar icin uygula:

cd /home
for E in `/bin/ls`; do chmod -R 644 $E/public_html/* ; chmod -R ugo+X $E/public_html/* ; done

!!! EK EK EK !!! 21 – 01 – 2022

find /home/mgo/imap/megaotomarket.com/akdem/Maildir -type f -exec chmod 660 {} ; -exec chown mgo:mail {} ;

Type the following command to install ntp
# yum install ntp

Turn on service
# chkconfig ntpd on

Synchronize the system clock with 0.pool.ntp.org server:
# ntpdate pool.ntp.org

Start the NTP:
# /etc/init.d/ntpd start


nano /etc/network/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1


/etc/init.d/networking restart


nano /etc/hosts


127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


echo server1.example.com > /etc/hostname
/etc/init.d/hostname.sh start

hostname
hostname -f

Both should show server1.example.com.

bu mevzu biraz karisik, sonrasi icin fikir olmasi acisindan yaziyorum buraya. Unutmayayim , Metin’e de cok tesekkur edeyim her gordugumde.
sirket icinde windows 2003 ustunde exchange kosmakta.Domain ise exim4 ustunde directadmin linux da.
yapmak istedigimiz exim 2003 sirket icinden disari gonderilen mailleri exim 587 submission port ile auth ederek relay etsin.
daha onceki kurulum port 25 ustunde pop before smtp ile auth ediyorduk. Port 25 kullanmak istemiyoruz.

cozum: smarthost ile olmuyor 🙂

exchange de degisiklik yapip smtp connector kurup calistirip sistemi geciriyoruz buna

sonra

[15:40:06] ­smtp virtual connector yeterli değil bu iş için
[15:41:00] ­sonrasında routing groups / connectors kısmında yeni smtp connector oluşturmak gerekli
[15:41:32] ­local bridgehead olarak da smtp virtual connectoru seciyosun
[15:41:47] ­bu 1.
[15:41:53] ­2. nokta ise
[15:42:00] ­virtual smtp connectorde
[15:42:28] ­587 portunu sadece delivey\outbound connections
[15:42:35] ­kısmındaki tcp port bölümüne yazıyosun
[15:43:02] ­general\advanced menüsü default kalacak
[15:43:05] ­yani 25..

yazdigim gibi fikir olsun…

soru:

how to find which ips are in use ?

Hello

I’ve got a 3 host cluster proxmox system running with 12 openvz installations.
Each openvz vm have 3-5 ip addresses each.
I can find them by entering each vm and clicking network tab.
But checking all 12 vm’s take time.
Is there an easy way to manage ips given to each vm?

I mean how can I easily list all used ips in my proxmox cluster system and which ip belongs to which vm id ?

CEVAP:

The command I needed is “vzlist”
1 single command:

Code:
vzlist -o hostname,ctid,ip

gives me the exact result I needed.

more info:

http://download.swsoft.com/virtuozzo/virtuozzo4.0/docs/en/win/VzWindowsReference/4549.htm

http://download.swsoft.com/virtuozzo/virtuozzo4.0/docs/en/win/VzWindowsReference/4615.htm

pek cok bilgisayar var bunlarin hepsi bilgileri sayiyor linux rdesktop remote desktop mstsc windows uzaktan erisim 🙂 tag bunlar.. ok.
Konu su

bilgisayarlarimin bazilarinda masa ustu olarak linux kullaniyorum.
ubuntu, fedora , centos aklima ne gelirse
en son zenwalk kullaniyorum. Cok guzel cok hizli ancak RDP baglantilarimin performansindan hic memnun olamadim
bugun biraz arastirma yaparken rdesktop ile bir kac switch kullanarak performansimi yukseltebildim.

daha sonra icin referans olmasi icin yaziyim burayada:

dagitim zenwalk
desktop: xfce
rdp client: rdesktop (xfce icinden cikan)
switchleri: shukko[~]$ rdesktop -z -x m win.dows.mak.ina -g 1280×800

aciklamasi: -z : compression aciyor
-x baglanti cinsini belirliyor: -x l = lan , -x m = modem , -x b = broadband
-g masaustu cozunurluk.

su an performansimdan memnunum 🙂

ek: birde screen colour depth varmis
-a colour depth
son olarak komutum bu olsun:

shukko[~]$ rdesktop -z -x m win.pc -g 1280×800 -a 16

Your aim

You want to use Linux and OpenSSH to automize your tasks. Therefore you need an automatic login from host A / user a to Host B / user b. You don’t want to enter any passwords, because you want to call ssh from a within a shell script.
How to do it

First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase:

A note from one of our readers: Depending on your version of SSH you might also have to do the following changes:

* Put the public key in .ssh/authorized_keys2
* Change the permissions of .ssh to 700
* Change the permissions of .ssh/authorized_keys2 to 640

a@A:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A

Now use ssh to create a directory ~/.ssh as user b on B. (The directory may already exist, which is fine):


a@A:~> ssh b@B mkdir -p .ssh
b@B's password:

Finally append a’s new public key to b@B:.ssh/authorized_keys and enter b’s password one last time:


a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
b@B's password:

From now on you can log into B as b from A as a without password:


a@A:~> ssh b@B hostname
B