Skip to content

Category Archives: LAMP

LAMP is an acronym for a solution stack of free, open source software, originally coined from the first letters of Linux used for the operating system, Apache HTTP Server, MySQL (database software), and PHP or perl (scripting language), principal components to build a viable general purpose web server.

How to change mysql time zone

07-Nov-09

How to change mysql time zone Edit /etc/my.cnf and change your time zone. root@box1 [/var/lib/mysql]# cat /etc/my.cnf [mysqld_safe] timezone = Europe/London ~ [mysqld] set-variable = max_connections=500 safe-show-database Login to mysql and check the time now. root@box1 [/var/lib/mysql]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 369 [...]

How can I tunnel a local MySQL server through SSH?

06-Nov-09

Setting up the Tunnel The most common methods of setting up a tunnel are through putty or through command-line SSH. To open an SSH tunnel via the command line, run: ssh -L3307:127.0.0.1:3306 -p 22 -N -t -x user@myhost.com Connecting with MySQL You can connect to the MySQL server! You want to choose 3307 for your [...]

Find php.ini path

01-Nov-09

root@laptop:~# php -i|grep php.ini Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.ini root@laptop:~#

OpenVZ Operating system-level virtualization

31-Oct-09

Installing OpenVZ OpenVZ is operating system-level virtualization based on a modified Linux kernel that allows a physical server to run multiple isolated instances known as containers, virtual private servers (VPS), or virtual environments (VE). Installing OpenVZ on a CentOS 4 or CentOS 5 Download – http://download.openvz.org/openvz.repo Import the OpenVZ key rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ Install the [...]

Create a mysql database and User

31-Oct-09

Create a mysql database and User mysql> CREATE DATABASE database1; For creating a new user with all privileges (use only for troubleshooting), at mysql prompt type: mysql> GRANT ALL PRIVILEGES ON *.* TO ‘yourusername’@'localhost’ IDENTIFIED BY ‘yourpassword’ WITH GRANT OPTION; For creating a new user with fewer privileges (should work for most web applications) which [...]

Set mysql root password

31-Oct-09

Set mysql root password Before accessing the database by console you need to type: mysql -u root At the mysql console type: mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘yourpassword’);

Installing MYSQL with PHP4

31-Oct-09

Installing MYSQL with PHP 4 apt-get install mysql-server libapache2-mod-auth-mysql php4-mysql

Installing MYSQL with PHP 5

31-Oct-09

Installing MYSQL with PHP 5 apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Install LAMP stack in Ubuntu

30-Oct-09

Install LAMP stack in Ubuntu As of the 7.04 release +, the Ubuntu base system includes Tasksel. You can either install LAMP using tasksel or install the LAMP packages as detailed above. sudo tasksel install lamp-server To remove the LAMP stack remove the following packages: apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off [...]