مشکل locate

نوشته شده در موضوع سیستم عامل, لینوکس در ۱۳ شهریور ۱۳۹۰

شاید شما هم با خطای

locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory

مواجه شده باشین ، راه حل این موضوع تایپ دستور updatedb و بروز رسانی دیتابیس locate هست

Text searching in linux with grep

نوشته شده در موضوع سیستم عامل, لینوکس در ۰۶ مرداد ۱۳۹۰

Ever have to go through a HUGE sql backup file looking for something specific, but realizing it’s impossible to open files that are 30Gigs without it draining all the ram, and taking super long to open? Grep can save your day in situations like this. Or how about If you need to find a specific string in a file – and you don’t know what file it’s in, grep can also save your day. Then there’s searching for strings in specific command outputs, it works there too!

Making a PHP Site on Linux Work with a Microsoft SQL Server Database

نوشته شده در موضوع SQL Server ODBC, سیستم عامل, لینوکس, پایگاه داده, پی اچ پی در ۰۴ مرداد ۱۳۹۰

A recent project at my current employer called for creating a new web frontend to an existing MSSQL database. My boss, having created a sophisticated MySQL and PHP-driven black diamond web site in PHP was enthused about the prospects of further web development with PHP. He suggested trying to get PHP on a Linux box to connect to a MSSQL database server.

An attempt at this task made months before ended in frustration. This time, after nibbling away at the task for a couple of days on a standard Red Hat system, success was had. Here’s how.

Similar to Windows, one method of connecting to a MSSQL database is through an ODBC DSN (open database connection, data source name). The ODBC DSN specifies a MSSQL driver to make the connection to the database. Recent versions of Red Hat include the utility for creating the ODBC DSN, but not the driver.

The driver chosen and discussed in this article is a FreeTDS driver. TDS (tabular datastream) is a protocol used by Sybase and MSSQL. This driver enables the Linux machine to connect to the MSSQL server.

Once the driver is installed, you can configure an ODBC connection on your Linux machine to use the driver, which then allows a connection to MSSQL. Start by downloading and saving the FreeTDS driver.


				

نحوه بروز رسانی Directadmin

نوشته شده در موضوع دایرکت آدمین در ۰۷ تیر ۱۳۹۰

cd /usr/local/directadmin
wget --no-check-certificate -O update.tar.gz 'https://www.directadmin.com/cgi-bin/daupdate?uid=123&lid=1234'
tar xvzf update.tar.gz
./directadmin p
cd scripts
./update.sh
/etc/init.d/directadmin restart

نحوه نصب Python بر روی Linux

نوشته شده در موضوع برنامه نویسی, دایرکت آدمین, لینوکس در ۰۵ خرداد ۱۳۹۰

$ wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
$ tar xzf Python-2.7.tgz
$ cd Python-2.7
$ ./configure --with-pth --with-dec-threads --with-signal-module --prefix=/opt/python-2.7
$ make
# make install

buy viagra