Thursday, February 2, 2012

easyapache with /

Custom Configure Flags

Custom configure flags (also known as “raw opts”) are lines of data that advanced users can add to a specific file on the server in order to customize the configuration of Apache or PHP builds.

To add custom configure flags, you must know the version of Apache and PHP to which you need to add the flag. EasyApache allows you to specify any configure option supported by Apache and/or PHP. Simply place the option in the appropriate file; the files are as follows:

For Apache 1.3.x — /var/cpanel/easy/apache/rawopts/Apache1
For Apache 2.0.x — /var/cpanel/easy/apache/rawopts/Apache2
For Apache 2.2.x — /var/cpanel/easy/apache/rawopts/Apache2_2
For all PHP 4.x versions — /var/cpanel/easy/apache/rawopts/all_php4
For all PHP 5.x versions — /var/cpanel/easy/apache/rawopts/all_php5
For Mod_suPHP — /var/cpanel/easy/apache/rawopts/all_suphp
For a specific PHP Version — /var/cpanel/easy/apache/rawopts/PHP-X.X.X

To add a custom flag:

Create the file that corresponds to the version of Apache or PHP for which you would like to add a custom configure flag.
In the file, enter the flag you wish to add.
The file will be parsed, and the options properly formatted before EasyApache adds them to the data structure.
See the example below for more information about formatting your custom flags.
Save the changes you have made to the file.

Remember: Enter only one item per line.




This will result in the following being added to the configuration file:

--with-flag --path-to-flag=/usr/bin/flag --my-option

*************************** For mssql ***************************************


1-. Download freetds ->
2-. tar -zxvf freetds-stable-tgz
3-. cd freetds-*
4-. ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld

Note: tdsver=8.0 if you use SQL 2000, tdsver=7.0 if you use SQL 7.0

5-. make
6-. make install
7-. /usr/local/freetds/bin/tsql -S -U

Note: For default User SQL is sa and the it have not password
For example: /usr/local/freetds/bin/tsql -S -U sa

8-. Add the next text in freetds.conf ( /usr/local/freetds/etc )
host =
port = 1433
tds version = 8.0

Note: If you use SQL 2000 then tds version = 8.0
if you use SQL 7.0 then tds version = 7.0

9-. Add the following line in the file /etc/ and run ldconfig -v:

10- Recompile PHP with --with-mssql=/usr/local/freetds flag.

Wednesday, February 1, 2012

Apply patch in linux

Apply a Patch in Linux using "patch"

use something like: patch -p1 < patchfile.diff