Ramin Hossaini (blog)

1Jun/100

Ubuntu: Installing Apache, PHP 5, and MySQL 5

Apache

sudo apt-get install apache2

Locations:

  • HTML directory: /var/www
  • Apache2 conf: /etc/apache2/apache2.conf

PHP 5

Install PHP, and also enable the PHP and Rewrite module in Apache:

sudo apt-get install php5
sudo a2enmod php5
sudo a2enmod rewrite

Locations:

  • php.ini: /etc/php5/apache2/php.ini

MySQL 5

sudo apt-get install mysql-server
sudo apt-get install php5-mysql

Restart Apache

sudo /etc/init.d/apache2 restart
4Nov/091

Search through files for a string (Linux)

To search a directory recursively for specific text or a string, use:

find . -exec grep "string to find" '{}' \; -print
Tagged as: 1 Comment
Page 1 of 11
Bear