LAMP - Linux Apache Mysql Php
Apache
Install Apachesudo apt-get install apache2
(Testing HTTP Server by open a web browser and enter http://localhost)
PHP
Install PHP5sudo apt-get install php5 libapache2-mod-php5
Stop/Restart Apachesudo /etc/init.d/apache2 restart
Test the installation
sudo gedit /var/www/testphp.php
(you can use vi or nano editor instead of gedit)
Save this new file.
Open a web browser and enter http://localhost/test.php
Be sure to remove the file afterwards, as it may pose a security risk.
sudo rm /var/www/test.php
MySQL
Install MySQL Serversudo apt-get install mysql-server
gksudo gedit /etc/mysql/my.cnf
MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So that the local computer gets root access as well, you’ll need to set a password for that too. The local-machine-name is the name of the computer you’re working on.
mysqladmin -u root password yourpassword mysqladmin -h root@local-machine-name -u root -p password yourpassword sudo /etc/init.d/mysql restart
MySQL Administrator
Install MySQL Administratorsudo apt-get install mysql-admin
killall gnome-panel
Run MySQL Administrator
(On ubuntu) Applications -> System Tools -> MySQL Administrator
(On Kubuntu) Applications -> Development -> MySQL Administrator
MySQL for Apache HTTP Server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
gksudo gedit /etc/php5/apache2/php.ini
extension=mysql.so
sudo /etc/init.d/apache2 restart
No comments:
Post a Comment