Vhcs Romania

Modificare partitie /tmp cand este prea mica - valabil pentru cei care folosesc cpanel si au probleme cu logurile

service chkservd stop

service httpd stop

service mysql stop

service postgresql stop

service exim stop

umount /tmp

daca primit cu busy incearcati sa vedeti ce alte procese aditionale foloseste tmp:

lsof | grep /tmp

umount /var/tmp

umount /tmp

stergeti “512000 si puneti cat doriti dvs  ex “5112000″ in — /scripts/securetmp la tmpdsksize

5112000 = este egal cu 5 GB

rm /usr/tmpDSK

/scripts/securetmp dati “y” la tot ce va cere

cd /tmp

ln -s /var/lib/mysql/mysql.sock

service postgresql start

service mysql start

service httpd start

service chkservd start

service exim start

/etc/init.d/cpanel start

si cam asta a fost tot :)

Optimizare VPS Minim 512 MB RAM
Posted by admin in Linux on 07 5th, 2009| icon3No Comments »

Optimizare VPS cu minim 512 MB

nano /etc/my.cnf

si introduceti urmatoarele lini:

[mysqld]
max_connections = 800
key_buffer = 36M
myisam_sort_buffer_size = 64M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 3M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

Optimizare VPS cu minim 256 MB

nano /etc/my.cnf

si introduceti urmatoarele lini:

[mysqld]
max_connections = 400
key_buffer = 16M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1000
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 32M
sort_buffer = 32M
read_buffer = 16M
write_buffer = 16M

salvati , apoi /etc/init.d/mysql restart ;)

have fun!

Instalezi Cstrike si ai eroare

Enter ‘yes’ to accept this agreement, ‘no’ to decline: yes
sh: uncompress: command not found

solutia este:

ln -s /usr/bin/gunzip /usr/bin/uncompress

Lamp in CentOS
Posted by admin in Linux on 01 21st, 2009| icon3No Comments »

Cum sa faci LAMP din CentOS?

Solutia este urmatoarea:

yum -y install httpd httpd-devel
yum -y install mysql mysql-server mysql-devel
yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-cli php-curl
chkconfig httpd on
chkconfig mysqld on
/etc/init.d/httpd restart
/etc/init.d/mysqld start

pentru ca nu este bine sa lasa mysql fara parola la root urmatorul pass este pentru setarea parolei.
/usr/bin/mysqladmin password PAROLA TA

Optional:
yum -y install phpmyadmin

Lamp Debian Sau Ubuntu!
Posted by admin in Linux on 01 20th, 2009| icon3No Comments »

Cum sa instalezi Php + Mysql + Apache pe Ubuntu/Debian?

apt-get update

apt-get -y install apache2 php5 libapache2-mod-php5  php5-cli  

apt-get -y install mysql-server mysql-client php5-mysql

Optional

apt-get install phpmyadmin

apoi http://server-ip/phpmyadmin

Daca ai un server Linux/Virtual etc… si vrei sa stii la ce port este serverul connectat?

Solutia este:

ethtool eth0
rezultatul fiind:

[root@Server]-[~]# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: umbg
        Wake-on: g
        Current message level: 0×00000007 (7)
        Link detected: yes
[root@Server]-[~]#

Gentoo eroare la emerge program?
Posted by admin in Linux on 01 17th, 2009| icon3No Comments »

Cand ai probleme cu gentoo genul de problema cand folosesti emerge sa instalezi ceva dai peste erroare:

!!! ARCH is not set… Are you missing the /etc/make.profile symlink?

Solutia pentru rezolvare este:

folosim urmatoarea comanda: emerge –sync (asteptati ca dureaza 10-30 minute depinde de sistem)

apoi dati urmatoare comanda:

suse / # emerge make

!!! Your current profile is deprecated and not supported anymore.
!!! Please upgrade to the following profile if possible:
        default/linux/x86/vserver

To upgrade do the following steps:
# cd /etc/
# rm make.profile
# ln -s ../usr/portage/profiles/default/linux/x86/vserver make.profile

Daca vedeti mai sus gentoo va oferim automat metoda de rezolvare la problema deci aceasta fiind:

cd /etc/
rm make.profile
ln -s ../usr/portage/profiles/default/linux/x86/vserver make.profile

si cam asta e :)

Php Hack?
Posted by admin in Linux on 01 16th, 2009| icon3No Comments »

Cum sa dezactivezi php shell?

editeaza php.ini si la ;disable_functions =  apasa enter si adauga urmatoarea linie

disable_functions = “dl,shell_exec,passthru,system,exec,popen,proc_get_status,proc_nice,proc_open,proc_terminate,proc_close,exec”

Nu Protejeaza foarte mult dar este suficient.

Cum sa faci linuxul mai Colorat?
Posted by admin in Linux on 01 16th, 2009| icon3No Comments »

Te-ai saturat sa ai root@locahost negru?

Solutia este:

Pentru fedora adauga in /etc/profile la ultima linie:

albastru@albastru usor :

PS1=”[\[\033[0;36m\]\u\[\033[0;37m\]@\[\033[0;36m\]\h\[\033[0;37m\]]-[\[\033[1;36m\]\w\[\033[1;37m\]\[\033[0;37m\]]\\$\[\033[0m\] “

verde@verde usor:

PS1=”[\[\033[32;40m\]\u\[\033[0;37m\]@\[\033[32;40m\]\h\[\033[0;37m\]]-[\[\033[32;40m\]\w\[\033[32;40m\]\[\033[0;37m\]]\\$\[\033[0m\]“

PS1=’\[\033[1;34m\]\[\033)0\016\]\[\]lq\[\017\033(B\](\[\033[1;37m\]\u\[\033[1;34m\]@\[\033[1;37m\]Root\[\033[1;34m\])(\[\033[1;37m\]\T\[\033[1;34m\])\n\[\033)0\016\]\[\]mq\[\017\033(B\](\[\033[1;37m\]\w\[\033[1;34m\])\[\033[1;37m\]->\[\033[0m\] ‘

Pentru Debian/Ubuntu va trebui sa adaugati in /root/.bashrc una din linile de mai sus care vi se pare mai usoara :)

 

 

comenzi pentru dezarhivare in linux
Posted by admin in Linux on 01 16th, 2009| icon3No Comments »

cred ca de multe ori te-ai instalnit de arhiva .bz2 si nu stiai ce sa ii faci? mai jos ai solutia pentru toate tipurile de arhive.

*.tgz use tar -zxvf
*.tar.bz2 use tar -jxvf
*.tar.bzip2 use tar -jxvf
*.zip use unzip
*.tar use tar -xvf
*.bz2 use bunzip2 -d -v
*.gz use gunzip -d -v
*.arj use unarj
*.lha use lha x
*.ace use unace
*.rar use rar x
*.cab use cabextract
*.Z use uncompress
*.zoo use zoo -extract
*.chm use chmextract
*.xpi use unzip
*.jar use jar xvf
*.deb use ar xv
*.lzo use lzop -x
*.7z use 7z x

« Previous Entries