How to install ubuntu on ubuntu server
How to install ubuntu on ubuntu server
Ubuntu Documentation
Caveat
As you may already have guessed following this instruction may break your system and you are on your own to fix it again. apt-get install linux-image-686
Scenario
This instruction describes how to install Ubuntu on a dedicated server over ssh. I assume that your provider provides you with a rescue system from which you can boot and prepare your system. An Online replacement is possible, but it is some more work and a lot more risky if things go bad (the basic idea is to temporarily disable your swap and install a transitional system on it).
Preparing the Hard Disk
Partitioning
Use fdisk to partition your hard disk.
Remember to set the root partition bootable!
For the rest of this instruction we assume the following partition layout.
Creating File Systems
Below is how we get our / populated with ext3.
And the same for our swap partition.
The Base System
Mounting Root
Getting Debootstrap
Debootstrap is a collection of scripts that we will use in the next step to set up a base system. We need an appropriate version of debootstrap from http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/ to make this work.
Make sure that binutils is installed on your system.
On an apt based system we can use dpkg to install it.
If your current system is rpm based, use alien to install it or find a rpm on the web (http://azhrarn.underhanded.org/debootstrap-0.2.23-1.i386.rpm).
If your system is neither, this might work.
Installing the Base System
(arch may be different for you, e.g. amd64, hppa, ia64, powerpc, or sparc)
Basic Configuration
Set the Hostname
Change HOSTNAME to whatever suits your environment.
fstab
Put the following in fstab:
Networking
Make sure to use your network details instead.
Make sure to use your hostname and domain.
You need a valid resolv.conf with at least one valid nameserver, e.g.:
Enter the new environment
Before we chroot into the new environment we need to mount /proc and /dev
Change the root password
Create a user and switch shadow password on
Installing Packages
Installing OpenSSH Server
Install a Kernel
Choose the right kernel for your architecture. I go with:
Reboot
Finishing
After the reboot ssh in again.
Generate locales
Install some more packages
References
An other instruction from the Ubuntu Installation Guide is somewhat outdated and has shortcomings related to the bootloader installation.
Installation/OverSSH (последним исправлял пользователь andrew-woodhead666 2011-05-31 16:43:31)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
How to Install a GUI on Ubuntu
Use code KB4KDO0L9 to receive a 10% recurring discount on any server.
Are you planning to use the Ubuntu server for your business? It is one of the most popular open-source Linux-based operating systems in the world. It’s easy to use, and a vast open-source application ecosystem supports it. Linux-based servers are not only used for running tasks in the background; you can use them for running rich, graphical applications too. For that, you would need to install a GUI (graphical user interface) on your server.
In this quick tutorial, we’ll take you through the steps on how to install a GUI on Ubuntu.
System Requirements
Here are the system requirements and system resources you would need for this tutorial:
Although the requirements depend on the expected traffic flow to your website, we have documented whatever bare minimum you would need to get started on the Ubuntu System Requirements page.
For upgrading, check ServerMania’s range of offerings, and for hosting Ubuntu 20.04 on a ServerMania server, see Hosting Ubuntu on ServerMania.
Configure Ubuntu 20.04
Step 1: Log into Ubuntu Server
Log in using your root password for the Ubuntu instance using the following command:
Alternatively, you can use SSH (secure shell) keys to perform a passwordless login. As a best practice, do not use the root user for performing administrative tasks. Create another user.
Step 2: Update & upgrade apt-get packages
Update and upgrade the apt-get package manager using the following command:
sudo apt-get update && sudo apt-get upgrade
Running this command makes sure that you have the latest packages and repositories updated in your package manager.
Install a Display Manager (Desktop Environment)
In the Linux ecosystem, you need a software called the display manager, enabling you to see the Ubuntu server GUI login screen for your chosen Linux OS.
Once you log into the desktop using the display manager, the display manager turns control over to the window manager, where GNOME, KDE, etc., comes into the picture.
Step 1: Using sudo apt-get install to Install LightDM
First, let’s install one of the most widely used display managers called LightDM using the following command:
sudo apt-get install lightdm
Similar to LightDM, there are many other options you can choose from, such as GDM, SDDM, LDM, and so on.
Your choice of a DM (display manager) should consider the resources that will be consumed by it, the flexibility in configuration that’s possible, and the extent of community support for issues and bug fixes.
Step 2: Starting the LightDM service
Once LightDM is installed on your system, you can run the following command to start the LightDM service to handle the display controls over to the window manager.
sudo systemctl start lightdm
Install Ubuntu Server GUI
Step 1: Install Tasksel
You have to choose whether to install GUI (graphical user interface) just using apt or apt-get or to use a more advanced tool called tasksel, enabling you to do the installation quicker by installing multiple packages in one coordinated process separate tasks. We’ll be using tasksel for the installation:
sudo apt-get install tasksel
And if you’re using apt instead of apt-get, you can use the following command:
sudo apt install tasksel
Step 2: Install Desktop Environment
Once tasksel manager is installed, you can go ahead with the installation of one of the many available desktop environments; in our case, we’ll install GNOME Desktop, which is the default environment for Ubuntu server, using the following command:
sudo tasksel install ubuntu-desktop
You can also run the following command and select the software to install from a predefined collection of software:
When prompted, choose Ubuntu desktop to install the chosen desktop environment.
Use the space key to choose the desktop environment to be installed; hit the tab key to move the focus from the list of software to the OK button at the bottom, and hit enter.
If everything went right, doing this should trigger a reboot, and you will see a login screen generated by LightDM, our chosen display manager (desktop environment).
Alternatively, you can also run the following sudo apt-get command to install ubuntu-desktop without using tasksel:
sudo apt-get install ubuntu-desktop
You can use the aforementioned apt-get command for installing any of the popular desktop environments.
Step 3: Install multiple GUIs
Installing more than one GUI is straightforward to install more than one GUI on the Ubuntu server.
You can choose to switch between different GUIs by pressing the F1 key; doing that will toggle between GUI sessions. Apart from the GNOME, there are several other well-maintained GUIs that you can choose from, such as Xfce core server desktop, Xubuntu core server desktop, Lubuntu core server desktop, Cinnamon core server desktop, Budgie core server desktop, Mate core server desktop, KDE core server desktop, Kubuntu core server desktop, and so on.
Changing the GUI on Ubuntu doesn’t change the installation process by a lot if you’re using tasksel. For example, if you want to install Xubuntu GUI, you can do that using the following command:
sudo tasksel install xubuntu-desktop
Notice that this command is the same as the command you ran to install the GNOME desktop, except that you’re now installing Xubuntu-desktop instead of ubuntu-desktop.
Some of the similar commands to install different GUIs are listed below:
sudo tasksel install lubuntu coresudo tasksel install ubuntu mate
Note that multiple GUIs are completely optional.
Step 4: Reboot
Once you’re done with the installation, you must reboot your system to pick up that the interface has changed.
If, however, your system doesn’t prompt a GUI and still returns you to the command-line interface for any reason, please run the following command to set the default interface on your system once and for all.
sudo systemctl set-default graphical.target
This command will ensure that your Ubuntu system defaults to the newly installed graphical target for the GUI.
Remote Access to GUI
It’s an everyday use case to access your Ubuntu machine remotely. If you want to do that, you’ll need to install a remote desktop application like Xrdp. You can use the following command to do that:
sudo apt-get install xrdp
After installing the remote desktop application, you would need to add it to the ssl-cert group. You can do that by running the following command:
sudo adduser xrdp ssl-cert
Now, you should be good to remotely connect to your freshly installed Ubuntu desktop with a GUI using port 3389.
Conclusion
In this tutorial, you learned how to install a GUI on an Ubuntu operating system. Having a rich interface opens a world of possibilities in the open-source world with many applications for business users, developers, accountants, and others. After completing the install GUI procedure on your Ubuntu operating system, you will have the best of both worlds – the CLI and the GUI.
COMPLETE DIGITAL SERVER SOLUTIONS FOR ALL
Bare Metal Dedicated Servers
A single tenant, physical server allowing you full access to its resources.
Professional Hybrid Servers
Virtualized server platform hosted on enterprise-grade physical servers.
Scalable Cloud Servers
High-performance and highly-available infrastructure.
Managed Colocation
Our next-generation data center facilities.
How to Install Ubuntu 20.04 Server
Ubuntu Server 20.04, also named Focal Fossa, has been released by Canonical and it’s now ready for installation. This article will walk you through the process of installing Ubuntu 20.04 Server Edition with Long Time Support on your machine.
If you’re looking for a fresh desktop installation or server up-gradation, then read our previous articles: Installation of Ubuntu 20.04 Desktop and How to Upgrade to Ubuntu 20.04.
Download Ubuntu 20.04 ISO Image
Use the following link to download the Ubuntu 20.04 live server install ISO image, which is provided only for 64-bit systems.
After downloading the ISO image, you need to create a bootable DVD using Rufus tool or a bootable USB drive using the Unetbootin LiveUSB Creator.
Install Ubuntu 20.04 Server Edition
Once the system has booted, you will land on the installer welcome interface shown in the following screenshot asking you to select the installation language. Press Enter to continue.
Select Ubuntu Installation Language
2. Next, select your keyboard layout and press Enter to proceed.
Select Ubuntu Keyboard Layout
3. If your system is connected to a network, it should receive an IP address from your DHCP server. Press Done to continue.
Ubuntu Network Connection
4. Based on your network set up, if you need a proxy server to connect to the internet, enter its details here. Otherwise, leave it empty and press Done.
Configure Proxy
5. Next, you need to configure the Ubuntu archive mirror. The installer will select it automatically based on your country. Press Done to proceed.
Configure Ubuntu Archive Mirror
6. Now its time to configure your storage. You need to create the storage layout as explained below. For this guide, we will show how to do this manually, therefore, go to Use an entire disk and then select check the option Set up this disk as an LVM group.
Note that the installer will create the root partition (with a small size by default), then you can manually edit its sizes and also create a swap partition.
Guided Storage Configuration
The following screenshot shows the default file system summary. Our test machine has a total of 80 GB hard disk capacity.
Storage Configuration Summary
Creating/Editing Root Partition Size
7. Next, under USED DEVICES, scroll to the root partition and press enter to get partitioning options. Select Edit as shown in the following screenshot, and press Enter.
Select Root Partition
8. Then edit the partition size as shown in the following screenshot. For example, set it to 50GB and scroll down or use tab to go to Save and press Enter.
Set Root Partition Size
9. Now the root partition should have a size amounting to what you specified while editing it, as highlighted in the following screenshot.
Root Partition Summary
Note: If you do not want to create a separate /home partition, skip the next step, head over to create a swap partition.
Creating a Separate /home Partition
10. Next, you need to create a home partition for storing user files. Under AVAILABLE DEVICES, select the LVM volume group and press Enter. In the partitioning options, scroll down to Create Logical Volume.
Create Home Partition
11. Next, enter the home partition size. Set it appropriately so that you leave some space for a swap partition/area. Under Format, select ext4 and Mount should be /home as highlighted in the following screenshot. Then scroll down to Create and press Enter.
Set Home Partition Size
The /home file system has been created successfully.
Home Partition Summary
Creating a Swap Partition
12. Now you need to create a swap partition. Under AVAILABLE DEVICES, select the LVM volume group and press Enter. In the partitioning options, scroll down to Create Logical Volume.
Create Swap Partition
13. Then edit the partition size and set the Format field to swap as highlighted in the following screenshot and press Enter.
Set Swap Partition Size
File System Partition Summary
15. Confirm the action by selecting Continue and press Enter.
Confirm Partition Changes to Disk
16. Now create a user profile by mentioning your name, server’s name, username, and a secure and strong password. Then scroll to Done and press Enter.
Create New User
17. Next, the installer will prompt you to install the OpenSSH package for remote access. Use space to choose that option. Then scroll down to Done and press Enter.
Install SSH Server
18. If you want to install some snaps, select them from the provided list. Use the space bar to select a snap. Then go to Done and press Enter.
Choose Snaps to Install
19. The installation process should now start as shown in the following screenshot. Once it is done, press Enter to reboot the system.
Installing Ubuntu System
Installation Complete
20. After a reboot, you can now log into your new Ubuntu 20.04 LTS server as shown in the following screenshot.
Log into New Ubuntu 20.04 Server
That’s all friends! You have successfully installed Ubuntu 20.04 LTS server edition on your machine. You can leave a comment concerning this guide via the feedback form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Using the installer
This document explains how to use the installer in general terms. There is another document that contains documentation for each screen of the installer.
Getting the installer
You can download the server installer for amd64 from https://ubuntu.com/download/server and other architectures from http://cdimage.ubuntu.com/releases/20.04/release/.
Installer images are made (approximately) daily and are available from http://cdimage.ubuntu.com/ubuntu-server/focal/daily-live/current/. These are not tested as extensively as the images from release day, but they contain the latest packages and installer so fewer updates will be required during or after installation.
Installer UI generalities
In general, the installer can be used with the up and down arrow and space or enter keys and a little typing. Tab and shift-tab move the focus down and up respectively. Home / End / Page Up / Page Down can be used to navigate through long lists more quickly in the usual way.
Running the installer over serial
By default, the installer runs on the first virtual terminal, tty1. This is what is displayed on any connected monitor by default. Clearly though, servers do not always have a monitor. Some out-of-band management systems provide a remote virtual terminal, but some times it is necessary to run the installer on the serial port. To do this, the kernel command line needs to have an appropriate console specified on it – a common value is console=ttyS0 but this is not something that can be generically documented.
When running on serial, the installer starts in a basic mode that does using only the ASCII character set and black and white colours. If you are connecting from a terminal emulator such as gnome-terminal that supports unicode and rich colours you can switch to “rich mode” which uses unicode, colours and supports many languages.
Connecting to the installer over SSH
If the only available terminal is very basic, an alternative is to connect via SSH. If the network is up by the time the installer starts, instructions are offered on the initial screen in basic mode. Otherwise, instructions are available from the help menu once networking is configured.
In addition, connecting via SSH is assumed to be capable of displaying all unicode characters, enabling more translations to be used than can be displayed on a virtual terminal.
Help menu
The help menu is always in the top right of the screen. It contains help, both general and for the currently displayed screen, and some general actions.
Switching to a shell prompt
You can switch to a shell at any time by selecting “Enter shell” from the help menu, or pressing Control-Z or F2.
If you are accessing the installer via tty1, you can also access a shell by switching to a different virtual terminal (control-alt-arrow or control-alt-number keys move between virtual terminals).
Global keys
There are some global keys you can press at any time:
I used to apt-get install ubuntu-desktop on my Ubuntu server. Can I apt-get install ubuntu-server on my Ubuntu desktop?
I am running 12.04 x64 desktop in VirtualBox. I did find this article about how to setup and install a LAMP (Linux-Apache-MySQL-PHP) server in Ubuntu (which has details on how to install several different packages manually) but first I am going to try looking for a repository that contains a ubuntu-server package (or something like it). I don’t know if this exists but it seems like it should.
3 Answers 3
ubuntu-desktop is a meta package for installing a desktop environment (ubuntu), not the whole ubuntu system (desktop version).
I don’t know about a meta package for LAMP, but I’m quite sure that «ubuntu server» refers to a whole system, not to a package, as you can see in the Ubuntu releases’ download page.
If the goal is to have Apache, MySQL and PHP installed on your desktop, just install the Apache, MySQL and PHP packages. A ‘server’ package wouldn’t necessarily install all these for yet, and may also include some other packages you don’t want.
There are no differences between packages in the different flavours of Ubuntu. The only difference is which packages comes «preinstalled» in them. So, the package for installing MySQL is the same in all Ubuntu versions, like the desktop, server, kde etc versions.
So just install the packages for LAMP, and you turn your ordinary Desktop installation of Ubuntu to a Server one. It is not like MS Windows where you get an artificial crippled version as a Home user compared to the Professional version. In Linux distributions all version are «Professional» 😉
Not the answer you’re looking for? Browse other questions tagged 12.04 server lamp or ask your own question.
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.