daha once konu ile ilgili uzun bir yazi yazmistim
bu mesajda sadece komutlar var
backup
1- serverdaki herseyi backuplamak icin
vzdump --compress --dumpdir /home/backup --stop --all

2-tek vps icin
vzdump --compress --dumpdir /home/backup --stop 102

3-use default dump dir
vzdump --compress --stop 102

4- pratikde en sik kullandigim
vzdump --compress --suspend 102

restore
1-vzdump --restore /home/vzdump-102.tgz 250

2-hostname degistir
vzctl set 250 --hostname test2.example.com --save

3- ip degistir
vzctl set 250 --ipdel 192.168.0.102 --save

vzctl set 250 --ipadd 192.168.0.250 --save

4-calistir
vzctl start 250

mkdir /usr/local/directadmin/custombuild/custom
mkdir /usr/local/directadmin/custombuild/custom/ap2
cp /usr/local/directadmin/custombuild/configure/ap2/configure.php5 /usr/local/directadmin/custombuild/custom/ap2/configure.php5

Edit ./custom/ap2/configure.php5 and add –enable-soap to the file, using the same \ syntax as you see in the file. Save it, ./build php and it worked perfectly.

gun olur lazim olur.

.org bir domainimiz var

ns1.domain.org 1.2.3.4 olarak tanimlanmis

ip adresini 3.4.5.6 olarak degistirdik

nasil kontrol edecegiz degisip degismedigini ?

su sekilde

whois -h whois.pir.org host 195.200.83.231

veya

whois -h whois.pir.org host ns1.domain.org

detayli bilgiyi pir.org whois sunucusu veriyor help komutu ile isteyince

onuda uzun uzun yazayim buraya bu olsun

[root@sioserver /]# whois -h whois.pir.org help
[Querying whois.pir.org]
[whois.pir.org]
OVERVIEW
Whois is used to look up records in the .ORG registry database. Information about domain, host, contact and registrar objects can be searched using this Whois service.

WHOIS QUERIES
For all Whois queries, you must enter a character string representing the information for which you want to search. Use the object type and interpretation control parameters to limit the search. If object type or interpretation control parameters are not specified, Whois searches for the character string in the Name field of the Domain object.

Whois queries can be either an 'exact search' or a 'partial search'.

An exact search specifies the full string to search for in the database field. An exact match between the input string and the field value is required. For example: 'publicinterestregistry.org' will only match with 'publicinterestregistry.org'.

A partial search specifies the start of the string to search for in the database field. Every record with a search field that starts with the input string will be considered a match based on the interpretation control parameter used. For example: 'publicinterestregistry%' will match with 'publicinterestregistry.org' as well as 'publicinterestregistry1.org'

By default, if multiple matches are found for a query, then a summary of all the matching results is presented including the object name and object identifier. A second query is required to retrieve the specific details of one of the matching records.

If only a single match is found, then full details will be provided. Full detail consists of the data in the matching object as well as the data in any associated objects. For example: a query that results in a domain object will include the data from the associated host and contact objects.

QUERY CONTROLS
Whois query controls fall into two categories: those that specify the type of object and those that modify the interpretation of the input or determine the type of output to provide.

Object Type Control
The following keywords restrict a search to a specific object type:

DOmain: Search only domain objects. The input string is in the
Name field.
HOst: Search only host objects. The input string is searched in
the Name field and the IP Address field.
Contact: Searches only contact objects. The input string is
searched in the ID field.
Registrar: Search only registrar objects. The input string is
searched in the Organization field. The input string is
case sentitive.

By default, if no object type control is specified, then the Name field of the Domain object is searched.
Interpretation Control
The following keywords modify the interpretation of the input or determine the level of output to provide:

ID: Search on ID field of an object. This applies to
Domain IDs, Host IDs, Contact IDs and Registrar IDs.
Full or '=': Always show detailed results, even for multiple matches.
Summary, SUM or '$': Always show summary results, even for single matches.
'%' or '...': Used as a suffix on the input, will produce all records
that start with that input string and have zero or more
additional characters.
'_': Used as a suffix on the input, will produce all records
that start with that input string and have one and only
one additional character.

By default, if no interpretation control keywords are used, the output will include full details if a single record is found and a summary if multiple matches are found.

The following further describes the use of '_', '%' and '...' wildcards with example whois queries.

Whois assumes that all characters before the wildcard compose the name portion of the query with the exception of '...'. At least one character must be entered before the wildcard.

All Object Queries:
'...': The suffixes .org or -LROR are not implied at the end of the string. This wildcard is allowed in the .org or -LROR portion of the input string.

For Example:
Assume that the following exists in the whois database:
Contact ID: C101-LROR
Host Name: dns1.publicinterestregistry.org

1) QueryHelper: whois contact summary id c101-lr
Return: Contact Name: John Dowe
Contact ID: C101-LROR
2) QueryHelper: whois host summary dns1info
Return: NOT FOUND

All Object Identifier Queries:
Interpretation control wildcards ('_' or '%') must be used as a suffix in the id portion of the query. Wildcard characters are not allowed in the -LROR portion of the input string.

If -LROR is not included in the input string, it will be implied at the end of the string. A single letter represents the object type of the identifier, where D=Domain, H=Host, C=Contact and R=Registrar. This letter must be the first character in the input string to query an object identifier.

For Example:
Assume that the following exists in the whois database:
Contact ID: C101-LROR
Domain ID: D101-LROR

1) QueryHelper: whois domain summary id d10_-lror
Return: Domain Name: PUBLICINTERESTREGISTRY.ORG
Domain ID: D101-LROR
2) QueryHelper: whois contact summary id c101-lr%
Return: NOT FOUND

Domain and Host Name Queries:
Interpretation control wildcards ('_' or '%') must be used as a suffix in the name portion of the query. Wildcard characters are not allowed in the .org portion of the input string.

If .org is not included in the input string, it will be implied at the end of the string.

For Example:
Assume that the following exists in the whois database:
Domain Name: publicinterestregistry.org
Host Name: dns1.publicinterestregistry.org

1) QueryHelper: whois domain summary afilia_
Return: Domain Name: PUBLICINTERESTREGISTRY.ORG
Domain ID: D101-LROR
2) QueryHelper: whois host summary dn_1.publicinterestregistry.org
Return: NOT FOUND
3) QueryHelper: whois host summary d%
Return: Host Name: NS1.PUBLICINTERESTREGISTRY.ORG
Host ID: H101-LROR
4) QueryHelper: whois domain summary publicinterestregistry.in%
Return: NOT FOUND

IP Address and Registrar Organization Queries:
A suffix is not implied for IP addresses or the registrar organization.

For Example:
Assume that the following exists in the whois database:
Host Name: dns1.publicinterestregistry.org
IP Address: 10.0.0.1
Registrar Organization: PIR

1) QueryHelper: whois host summary 10.0.0._
Return: Host Name: DNS1.PUBLICINTERESTREGISTRY.ORG
Host ID: H101-LROR
2) QueryHelper: whois registrar summary P_R
Return: NOT FOUND
3) QueryHelper: whois host summary 10.0.%
Return: Host Name: DNS1.PUBLICINTERESTREGISTRY.ORG
Host ID: H101-LROR
4) QueryHelper: whois registrar summary PI%
Return: Registrar Organization: PIR
Registrar ID: R101-LROR

Whois.publicinterestregistry.net only provides information for .ORG domains, hosts, contacts and registrars.

Note: The Registry database also contains host information for which it is not authoritative such as .com and .net host names. Whois.publicinterestregistry.net does not retrieve information regarding these host names. Please use whois.crsnic.net to retrieve information regarding ..com and .net host
names.

Orjinal Link: http://www.directadmin.com/forum/showthread.php?t=29483&highlight=howto+cgi
HOWTO: PHP 5 CLI to PHP 5 CGI + suPHP

I recently decided to switch from using PHP CLI to CGI mode with suPHP. Here are the steps I followed to ensure everything was working. Let me know if you spot any flaws or know of a better way of doing this.

NOTE: I am continually updating this post. It is safe to assume that all posts which mention improvements/security fixes have been included where relevant if they were posted before the last time this post was edited. (See bottom of this post for timestamp)

Ok, lets get started..

suPHP doesn’t allow the use of php_flag and php_value in .htaccess files, so find users with these setup and deal with them (or their sites will throw a 500 error)

Code:
find /home/*/domains/*/public_html -name ".htaccess" | xargs grep "php_"

Once you have dealt with those sites, suPHP should be good to go..

Edit the custombuild options file to use PHP in CGI mode

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
nano options.conf

and change

Code:
php5_cli=yes
php5_cgi=no

to

Code:
php5_cli=no
php5_cgi=yes

If you need a custom config of PHP or suPHP then you can find which config files to change using:

Code:
./build used_configs

Now we can build PHP

Code:
./build php

Ensure the new php.ini is correct.. the old one was located at /usr/local/lib/php.ini

Code:
nano /usr/local/etc/php5/cgi/php.ini

It might be worth using custombuild to secure php some more. Using secure_php disables register_globals and adds some potentially vulnerable functions to the disable_functions list in the main php.ini file. These can be overridden on an individual basis per user if need be in their individual php.ini files

Code:
./build secure_php

We need to reset ownership of files as suPHP won’t allow access to ones owned by apache (they way the CLI version of PHP works)

Code:
ls -l /home | grep '^d' | awk '{system("chown -R " $3 ":" $4 " /home/" $9 "/domains")}'

Sessions will also have wrong ownership or now be corrupt so remove those

Code:
rm -f /tmp/sess_*

Sites which have files or directories with global write access will also cause suPHP to throw an error, therefore change all files to 644 and directories to 755

Code:
find /home/*/domains/*/public_html -type f -exec chmod 0644 {} \; -print
find /home/*/domains/*/private_html -type f -exec chmod 0644 {} \; -print
find /home/*/domains/*/public_html -type d -exec chmod 0755 {} \; -print
find /home/*/domains/*/private_html -type d -exec chmod 0755 {} \; -print

perl and cgi scripts need execute permissions though

Code:
find /home/*/domains/*/public_html -name "*.pl" -exec chmod 0744 {} \; -print
find /home/*/domains/*/private_html -name "*.pl" -exec chmod 0744 {} \; -print
find /home/*/domains/*/public_html -name "*.cgi" -exec chmod 0744 {} \; -print
find /home/*/domains/*/private_html -name "*.cgi" -exec chmod 0744 {} \; -print

Make sure webmail and phpMyAdmin work by resetting their ownership and permissions also

Code:
chown -R webapps:webapps /var/www/html
find /var/www/html -type f -exec chmod 0644 {} \; -print
find /var/www/html -type d -exec chmod 0755 {} \; -print
find /var/www/html -name "*.pl" -exec chmod 0744 {} \; -print
find /var/www/html -name "*.cgi" -exec chmod 0744 {} \; -print

Now lets enable open_basedir per user, and create user’s own tmp directories to make the server more secure. (I realize that I have done this on a per user basis rather than per domain, it should be straight forward to change if you do want it per domain)

automate creation of per user php.ini for new users (make sure the chown refers to your DirectAdmin user)

Code:
touch /usr/local/directadmin/scripts/custom/user_create_post.sh
chmod 755 /usr/local/directadmin/scripts/custom/user_create_post.sh
chown diradmin:diradmin /usr/local/directadmin/scripts/custom/user_create_post.sh
nano /usr/local/directadmin/scripts/custom/user_create_post.sh

use the following shell script:

Code:
#!/bin/sh

mkdir /usr/local/directadmin/data/users/$username/php/
chown $username:$username /usr/local/directadmin/data/users/$username/php/
touch /usr/local/directadmin/data/users/$username/php/php.ini
echo "open_basedir = /home/$username/:/tmp/" >> /usr/local/directadmin/data/users/$username/php/php.ini
chown root:root /usr/local/directadmin/data/users/$username/php/php.ini
chattr +i /usr/local/directadmin/data/users/$username/php/

exit 0;

note that in the above script you may need to alter the open_basedir setting to add allowed paths (e.g. PHP’s pear modules /usr/local/php5/lib/php) depending on your server setup

in order to remove the user completely we need to release the chattr +i on the php.ini config directory first (make sure the chown refers to your DirectAdmin user)

Code:
touch /usr/local/directadmin/scripts/custom/user_destroy_pre.sh
chmod 755 /usr/local/directadmin/scripts/custom/user_destroy_pre.sh
chown diradmin:diradmin /usr/local/directadmin/scripts/custom/user_destroy_pre.sh
nano /usr/local/directadmin/scripts/custom/user_destroy_pre.sh

use the following shell script:

Code:
#!/bin/sh

chattr -i /usr/local/directadmin/data/users/$username/php/

exit 0;

create php.ini files for current users

Code:
ls -l /home | grep '^d' | awk '{system("username="$3" /usr/local/directadmin/scripts/custom/user_create_post.sh")}'

copy VirtualHost templates to custom directory so they are not overwritten when DirectAdmin updates

Code:
cp /usr/local/directadmin/data/templates/virtual_host2* /usr/local/directadmin/data/templates/custom/

change VirtualHost containers to look for php.ini override

Code:
nano /usr/local/directadmin/data/templates/custom/virtual_host2.conf
nano /usr/local/directadmin/data/templates/custom/virtual_host2_sub.conf
nano /usr/local/directadmin/data/templates/custom/virtual_host2_secure.conf
nano /usr/local/directadmin/data/templates/custom/virtual_host2_secure_sub.conf

add this after the ErrorLog

Code:
|*if SUPHP="1"|
        SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/
|*endif|

rewrite httpd configs for current users

Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

To make sure webmail and phpMyAdmin work, set open_basedir in the global php.ini which will apply to webapps.

Code:
nano /usr/local/etc/php5/cgi/php.ini

find the open_basedir line and change to:

Code:
open_basedir = /var/www/html/:/tmp/

Then change the httpd.conf file to make sure the php.ini file isn’t overridden by user’s specific php.ini files:

Code:
nano /etc/httpd/conf/httpd.conf

find the <IfModule mod_suphp.c> section within the <Directory “/var/www/html”> block and change to:

Code:
   <IfModule mod_suphp.c>
        suPHP_Engine On
        suPHP_UserGroup webapps webapps
        SetEnv PHP_INI_SCAN_DIR
   </IfModule>

That should be the lot, make sure Apache is restarted.

Code:
service httpd restart

Hopefully everything is working!

Notes
—–

If a customer wants to use cronjobs they need to add the php.ini in the cron command:

Code:
/usr/local/bin/php -c /usr/local/directadmin/data/users/accountname/php/php.ini /home/accountname/domains/domainname/public_html/filetocron.php

KONU DISI: DAKAR RALLISINE KATILMAYA KARAR VERDIM DIDANLA BERABER: HEDEF 2016 YILBASI!

BIR TANE RESIMDEKI GIBI MITSUBISHI ALIYORUZ

GARAJIMIZDA HAZIRLIYORUZ! 2016 YILBASINDA DAKAR RALLISINDEYIZ

PILOTLAR:   SHUKKO VE DIDAN



Sometimes I need to install directadmin on our vds servers, as we don’t use templates for this I was looking for an easy and faster way to install new servers.
A couple of weeks ago I found the solution and i thought I’d share it.

apt-get install gcc g++ debianutils binutils make autoconf automake vim pwgen
wget http://www.directadmin.com/setup.sh
chmod +x setup.sh
mkdir -p /usr/local/directadmin/custombuild
wget http://bugoff.be/wp-content/uploads/2010/04/options.conf -O /usr/local/directadmin/custombuild/options.conf
echo 1.2 > /root/.custombuild
./setup.sh <User ID> <License id> <servername> <eth>

This will install your directadmin server with my options.conf file, correct the options to what you want. I always install my servers using php-cgi.

Godzilla
Siz de öfkelenince ya da hırslanınca büyüyen ve hareketlerini kontrol altında tutamayanlardansınız. Ortalığı kasıp kavurmak istiyorsunuz ve gözünüz hiçbir şeyi görmüyor. Üstelik sizi sakinleştirmek de kolay olmuyor. Öylece kendi halinize bırakmak ve olayların kendiliğinden çözülmesini beklemek en iyisi. Çünkü bu halinize temas edenlerin gelecek zaman kurguları değişiyor.

1- go to Admin Panel -> Admin Settings -> Customize Httpd Configurations.
find domain
2-add
SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/
3- ssh server
cd /usr/local/directadmin/data/users/username
4- mkdir php
nano php/php.ini – ( eg: register_globals = On )
5- chown -R diradmin.diradmin php
6- service httpd restart