Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sirusdas/9b8e21708dd2c05ea06d54fd1144ab42 to your computer and use it in GitHub Desktop.
Save sirusdas/9b8e21708dd2c05ea06d54fd1144ab42 to your computer and use it in GitHub Desktop.
Ubuntu Install Apache2, Mysql, PhpMyAdmin and Php

Doing shits without xampp or lampp For Php use goole For Apache 2 use google. For Mysql Use Google. For PhpMyAdmin use google.

Once this are done! You may need to do this codes below

sudo a2enmod rewrite
cd /etc/apache2/sites-availabe
sudo vim 000-default.conf

Inside 000-default.conf

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /media/Workspace
    <Directory /media/Workspace>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
  
</VirtualHost>

Start/Stop/Restart Apache2/mysql use

/etc/init.d/apache2 start
or 
sudo systemctl restart apache2

Install PhpMyAdmin

sudo apt-get update
sudo apt-get install phpmyadmin php-mbstring php-gettext

If I cannot access phpMyAdmin?

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf

else refer this link https://www.digitalocean.com/community/questions/i-cannot-access-phpmyadmin-on-ubuntu-14-04

Changing the MySQL root user password

mysqladmin -u root -p'OLDPASSWORD' password NEWPASSWORD
or
mysql> use mysql;
mysql> update user set authentication_string=password('NEWPASSWORD') where user='root';
mysql> flush privileges;
mysql> quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment