Search this site

Wednesday, January 29, 2014

Power Saver in Ubuntu

After I move to ubuntu 13.10 from windows 7
I have some problem
one of them is power saver in ubuntu
If my windows can stay 3 hour with battery only then my ubuntu only 1 hour

One of my friends tell me to install power top
it is a software for linux to save your power

sudo apt-get install powertop

And run in terminal

sudo powertop

you can choose which process you want to save

Sunday, January 26, 2014

Apache can't restart

When I restart apache, I get this message:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
The solution is

  • sudo nano /etc/apache2/httpd.conf or apache2.conf
  • Add: ServerName localhost
  • And restart apache: sudo /etc/init.d/apache2 restart

Source: link

Installing apache, PHP5, and MySQL in ubuntu

Well, this blog will be my own note for something like this.
I hope this also help someone who still don't know how to install it.

Step:
1. sudo su (must be root)
2. Installing MySQL

  • apt-get install mysql-server mysql-client
  • To check: type mysql in terminal

3. Installing Apache2

  • apt-get install apache2
  • To check: go to your browser and open your IP for example localhost (if you using xampp) or http://192.168.0.100 
  • Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the/etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d. 

4. Installing PHP5

  • apt-get install php5 libapache2-mod-php5
  • After that restart apache
  • /etc/init.d/apache2 restart 
  • To check: go to /var/www and make info.php like this

phpinfo();
?>

  •  And open it with your browser IP/info.php or http://192.168.0.100/info.php

5. MySQL support PHP5

  • we need MySQL for PHP5 support
  • apt-cache search php5
  • pick anything you need
  • apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
  • After that restart apache again
  • /etc/init.d/apache2 restart
  • To check: reopen info.php and it will show some new module

6. Install phpmyadmin

  • to help us to manage mysql
  • apt-get install phpmyadmin
  • To check: go to your browser, open your IP/phpmyadmin or http://192.168.0.100/phpmyadmin

Source: link