Monday, August 27, 2012

Install LAMP and Wordpress on Ubuntu 12.04


Install LAMP

Open terminal and Type the command :install it   first  with
sudo apt-get install tasksel
Now to install LAMP, type the taskel command in terminal :
sudo  tasksel
And select LAMP Server:
During the installation  you  will be  asked  to insert the  mysql root  password
Create info.php file:
<?php
phpinfo();
?>
and save to /var/www
restart apache2 ,
#sudo /etc/init.d/apache2 restart
Now open browser and type :
http://ip/info.php or http://localhost/info.php
PHP is installed.
To full manage  your  lamp Server database, install  phpmyadmin
sudo  apt-get  install  phpmyadmin
To login  to phpmyadmin, open browser and type :
http://ip/phpmyadmin   or http://localhost/phpmyadmin


Install Wordpress

1. Create a new database for your new site in phpmyadmin and create new user with full privileges.
2. Create your site folder in /var/www
3. Download latest version of Wordpress from wordpress.org and extract it into your new site folder

4. Open wp-config-sample.php file, make the following changes and save the file as wp-config.php:

define('DB_NAME', 'YourDatabaseName');/** MySQL database username */define(‘DB_USER’, ‘root’);/** MySQL database password */define(‘DB_PASSWORD’, ‘YOUR MYSQL PASSWORD’);/** MySQL hostname */define(‘DB_HOST’, ‘localhost’);Get credentials from: https://api.wordpress.org/secret-key/1.1/salt/and replace default lines with the lines from link.



No comments: