Search This Blog

Thursday, June 24, 2010

Install Apache, PHP and MySQL(all in one shot), on Ubuntu server...

This will help you make setup an Ubuntu server and make it work as LAMP(L-Linux, A-Apache, M-MySQL and P-PHP). So, follow the steps:

1. For PHP5, install apache, mysql and php5 alongside the necessary modules with following single line command.

root@localhost:~# apt-get install apache2 php5 libapache2-mod-php5


root@localhost:~# apt-get install mysql-server mysql-client libapache2-mod-auth-mysql php5-mysql


2. For PHP4...

root@localhost:~# apt-get install apache2 php4 libapache2-mod-php4


root@localhost:~# apt-get install mysql-server mysql-client libapache2-mod-auth-mysql php4-mysql


..............Done!!!

Tuesday, June 1, 2010

Add script to run at bootup in Ubuntu...

Steps as follows:
1. First of all, give your script-file executable permissions.
user@localhost:~$ chmod +x script-file.sh


2. Move your script-file to /etc/init.d directory.
user@localhost:~$ sudo mv script-file.sh /etc/init.d


3. Update Init script links, by running following command
user@localhost:~$ sudo update-rc.d script-file.sh defaults

Remember, these steps would help you run a script on bootup, NOT AT LOGIN.

When you append, your commands in ".bashrc" file. In this case, the commands will be executed when that particular user is logged in.

There is difference.

..............Done!!!