Is there any way to download LAMP and save it to the HDD so next time if i install a newer Ubuntu i dont have to download it again ?
I just switched to Ubuntu today, is there anyway to save the EXE like we do it in Windows ?
The error:
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree
Reading state information... Done
Package gstreamer0.10-plugins-ugly is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gstreamer0.10-plugins-ugly' has no installation candidate
sou@ubuntu:~$
sou@ubuntu:~$ sudo apt-get install apache2 mysql-server php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'apache2' has no installation candidate
E: Package 'mysql-server' has no installation candidate
E: Package 'php5' has no installation candidate
You can install the packages for a LAMP stack (the Linux part is Ubuntu; the other packages needed are Apache, MySQL and PHP). Because you're using a LAMP stack, you should become familiar with using a console since most servers do not have a GUI for administration at all. So, to install the packages Apache, MySQL and PHP, run:
The webroot is stored in
/var/www
by default, if you're doing a new installation, create a separate partition for/var/www
(choose for custom partitioning in order to get the option for it). MySQL databases are stored in/var/lib/mysql
, you can create a separate partition for it in the same way as you did for Apache.Configuration files are put in
/etc/
, so backup those:/etc/apache2/
/etc/mysql/
/etc/php5/
With those files you can setup an identical LAMP stack after a re-install.
A single command for creating a backup named "lamp-backup.tar.gz" of the config files, webroot an databases:
For the best results, stop the database before creating the backup by running
sudo stop mysql
. After the backup, the database can be started again by runningsudo start mysql
.To restore the previously made backup (on a fresh installation), run:
Do not forget to install the packages too.
Ubuntu uses packages instead of .exe files for programs. The packages are in the form of .deb files and are automatically downloaded when you install software through the software center or apt-get.
When you installed the LAMP software, you probably downloaded multiple .deb files--one for each program and library that was not already installed. So there's probably one for Apache, a few for PHP and its integration into apache, and a few for MySQL. Normally, it could be a chore to gather all these things on Windows. The reason for Ubuntu's package archive is to keep track of all these things and make sure that (1) when you install something, everything that is needed is also installed; and (2) you don't have multiple copies of the same things installed, and (3) everything is updated when there's an update.
Now, when Ubuntu's package system downloads a package to install, it caches a copy in /var/cache/apt/archives. You can look in there and copy the packages you want to save to a different drive if you wish. You can also put package files into /var/cache/apt/archives on a new install* and when you install software using software center, synaptic, or apt-get, the package will be used if it is the latest version available. I should point out that because of this caching, if you are reinstalling apache on the same install of Ubuntu, the packages will not be re-downloaded; the cached version will be used without you having to do any copying.
By the way, you can move to a new version of Ubuntu without reinstalling. The package management system comes to the rescue again. Ubuntu is made up of packages. So when you decide to go to a new version of Ubuntu, the package system downloads the newer versions of the packages that make up the system, and replaces the old version with the new versions. This leaves all your settings and user files intact.
*You need root user (equivalent of Window's Administrator user) privileges to do this. You can open a Nautilus window (equivalent of Windows Explorer) with root privileges by pressing Alt F2 and putting in
gksudo nautilus
, then pressing run and entering your password.