How to turn your home ubuntu pc into a lamp web server
Carter Sullivan
Published Mar 29, 2026
Introduction: Turn an Old Computer Into a Web Server!
By z2daj Follow
wondering what to do with that network cable and that old computer you have collecting dust in your basement? well here’s a little something that might be of some use to you.
Step 1: Prepare the Computer
i know, i know, but i know that there might be those who view this instructable who don’t have an old computer.
anyway on to prepping the computer. your computer should have:
-at least 64MB of RAM (not too hard to get passed that these days)
-an intel or AMD processor (still not too hard)
-a cd-rom drive (still not hard)
-at least 600MB of space (you’re going to want more than that since this is a server!)
-and the ability to boot from a CD
-an ethernet port
all in all, most of these requirements are easy to accomplish. since we will be using server edition for this install, this computer won’t necessarily need 4GB RAM and a 500GB hard drive, though it would be nice.
Step 2: Get the Operating System
the operating system that we will be using is Ubuntu Server Edition 8.04. There are ways to achieve similar results with the desktop edition, but the GUI will take up a lot of memory and processing power.
you can download a cd image from this link:
make sure you choose “Server Edition” and select a mirror near you.
to burn the image, download an image burning software like MagicISO, or DVD Decrypter
or you could request free cds, but that takes time. 3-4 weeks to be exact.
Step 3: Install the Operating System
now here comes the fun part, make sure that your computer is hooked up to a router and has a live internet connection during this install, it will automatically detect and configure your network settings.
all you need to do really is put the cd of Ubuntu Server into the optical drive and boot from the cd in BIOS. it’s different for all computers but you can normally access BIOS from the first boot-up screen (aka the first thing that pops onto the monitor once you press the power button) and pressing F12 or Delete on the keyboard
a few pictures were not taken, such as keyboard layout and proxy information, you should know what to put here. (proxy is blank for me)
look at the pics to see all the steps taken in the install.
after the installation of software, it will spit the cd back out, congratulations! you have just installed Ubuntu Server!
Step 4: Webmin
now here comes the boring part. since Ubuntu Server doesn’t have a GUI (graphical user interface), everything is text-based. so, in order to have some good control over what goes on with your server, install Webmin (a web-based GUI).
once you log in with the username and password you set up, input these commands:
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl
sudo dpkg -i webmin_1.430_all.deb
and you now have webmin installed!
access webmin by typing this into your browser address bar:
and now you can log in!
Step 5: Port Forwarding
now here is what you need to do in order to access your website from anywhere that has internet
open up your router’s homepage by typing in the router’s IP address (default is 192.168.1.1)
log in with user the username and pass (default is admin for both username and pass if you haven’t changed it, consult router’s documentation or google otherwise)
now go to the tab that says “Applications or Gaming” or “Port Forwarding” or something like that.
there will be a table-like form, you enter the applications name, the port-to-port forwarding, the protocol, and then your server’s IP. for example: HTTP 80 80 TCP 192.168.1.xxx
enter these values:
HTTP 80 80 TCP serverIP
FTP 21 21 TCP/UDP serverIP
SSH 22 22 TCP serverIP
enable these forwards and then click “Save Settings” or “Save”
Step 6: Get a Free Domain Name
time to get a free domain name for your server. as of right now, your server IP address is your website, and who wants to keep remembering that?
a good free domain site is called
they use your internet IP as a domain name. just make a new account and follow the on-screen instructions. it is really easy to set up
Step 7: Test Out Your Website!
whatever you assigned as your domain name at no-ip.com, enter that into your browser
you should see a It works! message in your browser window.
if not, try your server’s IP address, if that doesn’t work, then you must of done something wrong with the port forwarding.
Step 8: Permissions
now i know what you’re thinking, how are you going to update your website if you can’t access your server? here is the answer.
go your server once again and execute these commands:
sudo chown yourusername:www-data /var/www
sudo chmod 775 /var/www
you have just changed the folder “/var/www” ‘s permissions (/var/www is the root folder of your website).
now go to your main computer whether it’s windows or mac, i haven’t tried it on a mac but on windows this works fine. download a program called “WinSCP” and install it on your computer.
enter your domain name in the host name form and your server username and password in the username and password form
it should connect you to your server, and you should be able to see all the files on your server. go up a few directories until you see the var folder, enter the var folder and then the www folder
you can now copy new website material into those folders to update your website to make it cooler and more complex.
to remotely execute commands, use PuTTY, an SSH client program, google it and download it to your computer as well
Step 9: Other Thoughts.
this is one of many ways to configure an old computer to turn it into a webserver.
another Instructable which helped me get started a few moths ago was made by CalcProgrammer1
if there is anything that i have missed, please feel free to comment
also, if everything works as it should, you have no need of a monitor or a keyboard anymore, which means that you can configure this computer to turn on automatically in BIOS at a given time, so essentially, you can store this server in a closet and not have to access it physically anymore. how great is that?!
I’m creating a webpage in Ubuntu, in which simple files such as .txt can be uploaded. Now, I want to transform my laptop into an Ubuntu web server, through which any other Ubuntu or Windows user can access that specific web page through Ethernet connection.
How can I make my laptop having Ubuntu into such a web server?
How can I access that web page from another Ubuntu or Windows user via Ethernet? What are the necessary configurations or settings required for that?
3 Answers 3
Installing the apache2 package in Ubuntu is all you need to host files, and most likely the easiest solution since it is available in the repositories and comes with basic configuration.
After installing the package, a directory will be created at /var/www . Now each time someone tries accessing your browser from a browser will be welcomed by the index page of that directory.
By default, it contains an “It Works!” message, and it’s located at
If you remove that file, the browser will instead show a listing of files in that folder.
Thus each file you need to let other computers see in your browser should be located inside that directory.
It can be reached by
Note: By default, and for security reasons, the /var/www directory is not writable for any user. Check this question and answers for more details on that: How to avoid using sudo when working in /var/www?
After installing Apache, you stop or start the service by typing one of the following respectively:
Of course, this isn’t all you can do with Apache, but as solution for your problem there isn’t more that needs be done.
Có một máy tính Linux mà bạn muốn đưa vào làm việc? Có thể bạn không thoải mái với phiên bản dòng lệnh Ubuntu Server Edition. Đây là cách giữ máy tính để bàn Ubuntu tiêu chuẩn và thêm các khả năng phục vụ web cho nó.
Cho dù bạn không thoải mái với hệ thống chỉ có dòng lệnh, bạn đang sử dụng máy tính để bàn Ubuntu cho những thứ khác hoặc bạn chỉ cần cài đặt nó cho một vài ứng dụng cụ thể, bạn có thể thêm Apache, MySQL và PHP vào bất kỳ máy tính để bàn tiêu chuẩn nào cài đặt Ubuntu rất nhanh chóng và dễ dàng.
Lệnh đơn giản
Hãy bắt đầu cài đặt bằng cách sử dụng một lệnh rất thông minh:
sudo apt-get cài đặt đèn máy chủ ^
Nó sẽ KHÔNG hoạt động mà không có dấu mũ ở cuối. Khi bạn đã nhập xong, bạn sẽ thấy nó tự động chọn tất cả các gói cần thiết và sẽ yêu cầu bạn xác nhận lượng dữ liệu lớn của Lốc để được tải xuống.
Chỉ cần ngồi lại và để nó làm điều đó cho đến khi bạn thấy một màn hình màu xanh bật lên.
Nhập mật khẩu cho tài khoản root MySQL, đây là những gì bạn sẽ cần để tạo người dùng khác và quản lý cơ sở dữ liệu, sau đó nhấn Enter để tiếp tục. Bạn sẽ được nhắc nhập lại mật khẩu của mình, vì vậy hãy làm điều đó và nhấn Enter lần nữa.
Đó là để cài đặt!
Kiểm tra Apache và PHP
Hãy thử nghiệm Apache để xem nó có phục vụ đúng không. Mở trình duyệt và điều hướng URL sau:
Bạn sẽ thấy một cái gì đó như thế này xuất hiện nếu mọi thứ được cài đặt chính xác:
Tiếp theo, chúng tôi sẽ kiểm tra xem PHP có hoạt động không. Trong terminal, nhập lệnh sau để tạo tài liệu mới:
Sau đó, sao chép mã sau đây:
Nhấp chuột phải vào thiết bị đầu cuối của bạn và nhấn dán.
Nhấn CTRL + O để xóa ghi ra hoặc lưu tệp, sau đó nhấn CTRL + X để thoát.
Tiếp theo, khởi động lại Apache bằng lệnh sau:
sudo dịch vụ apache2 khởi động lại
Và tải lên trang sau trong trình duyệt web của bạn:
Và bạn sẽ thấy một cái gì đó như thế này:
Kiểm tra địa chỉ liên kết MySQL
MySQL có một địa chỉ liên kết phải phù hợp với hệ thống của bạn. Để kiểm tra địa chỉ liên kết của hệ thống của bạn, chúng tôi có thể sử dụng lệnh nhanh:
mèo / etc / host | grep localhost
Đó là một đường ống của người Viking hoặc một thân cây có tên ở giữa, được chia sẻ với phím \. Bạn sẽ nhận được một vài kết quả, một trong số đó sẽ hiển thị cho bạn một địa chỉ IP.
Bạn có thể thấy từ ảnh chụp màn hình ở trên rằng địa chỉ liên kết của tôi là 127.0.0.1.
Tiếp theo, hãy mở tệp cấu hình MySQL để xem những gì được liệt kê ở đó.
Cuộn xuống cho đến khi bạn thấy một dòng bắt đầu với tên địa chỉ liên kết ràng buộc giống như bên dưới.
Như bạn có thể thấy, địa chỉ liên kết là như nhau, vì vậy chúng tôi tốt. Nếu bạn khác, chỉ cần thay đổi nó để phù hợp với những gì bạn tìm thấy ở trên.
Cài đặt phpMyAdmin
Nếu bạn không quen với MySQL và các lệnh của nó, thì bạn có thể gặp một số khó khăn khi quản lý cơ sở dữ liệu và bảng. phpMyAdmin giúp bạn giải quyết điều đó bằng cách cung cấp giao diện PHP cho quản trị MySQL. Thật dễ dàng để cài đặt và thực sự có thể có ích, vì vậy hãy đến với nó.
sudo apt-get cài đặt phpmyadmin
Nếu lệnh này không hoạt động, bạn có thể cần phải kích hoạt kho bổ sung.
Bạn sẽ nhận được một màn hình xanh khác xuất hiện yêu cầu bạn chọn máy chủ web nào để cấu hình. Hãy chắc chắn rằng khối màu đỏ nằm cạnh bên apache2 và hãy ĐÚNG để nhấn vào thanh Space. Điều này sẽ đánh dấu nó bằng dấu hoa thị, và sau đó bạn có thể nhấn Enter.
Bạn sẽ được hỏi liệu phpmyadmin có nên cấu hình cơ sở dữ liệu mặc định để sử dụng riêng không. Chọn Có.
Tiếp theo, bạn sẽ được yêu cầu nhập mật khẩu của tài khoản quản trị viên được sử dụng để tạo cơ sở dữ liệu và người dùng này. Vì chúng tôi chưa tạo bất kỳ người dùng MySQL nào khác, hãy nhập mật khẩu gốc MySQL của bạn.
Cuối cùng, bạn sẽ tạo một mật khẩu để sử dụng với phpmyadmin và bạn sẽ phải xác nhận lại mật khẩu.
Khi bạn đã hoàn tất, khởi động lại Apache.
Bạn có thể đăng nhập vào phpMyAdmin bằng cách truy cập URL sau:
Sử dụng tên gốc root, làm tên người dùng và nhập mật khẩu MySQL gốc.
Có nhiều hơn một vài mật khẩu quan trọng ở đây và bạn sẽ muốn sử dụng cùng một mật khẩu với tài khoản gốc của mình. Nếu bạn chọn thực hiện việc này, hãy chắc chắn rằng đó là mật khẩu rất an toàn, thứ gì đó có các lớp ký tự hỗn hợp và độ dài tốt. Hãy nhớ rằng, bạn đang cấp cho người khác quyền truy cập vào máy tính của mình bằng cách cài đặt phần mềm này, vì vậy hãy thận trọng.
Nếu đây là lần đầu tiên bạn chơi với máy chủ web, bạn có thể tự hỏi các tệp bạn muốn lưu trữ sẽ đi đâu. Chúng nằm trong / var / www / là mặc định và sẽ cần các đặc quyền nâng cao để truy cập vào thư mục đó. Một ý tưởng là gắn một phân vùng riêng đến điểm đó chỉ được sử dụng để phục vụ các công cụ web. Kiểm tra bài viết khác của chúng tôi, Linux fstab là gì và nó hoạt động như thế nào?, Để có thêm một số thông tin cho điều đó.
Và, bây giờ bạn đã có máy chủ web của riêng mình, tại sao không tìm hiểu Cách Lưu trữ, Tìm kiếm và Xem Thống kê Tweet của bạn với ThinkUp?
This tutorial is going to show you how to install LAMP stack on Ubuntu 20.04 LTS. A software stack is a set of software tools bundled together. LAMP stands for Linux, Apache, MariaDB/MySQL and PHP, all of which are open source and free to use. It is the most common software stack that powers dynamic websites and web applications. Linux is the operating system; Apache is the web server; MariaDB/MySQL is the database server and PHP is the server-side scripting language responsible for generating dynamic web pages.
Prerequisites
To follow this tutorial, you need an Ubuntu 20.04 OS running on your local computer or on a remote server.
Step 1: Update Software Packages
Before we install the LAMP stack, it’s a good idea to update repository and software packages. Run the following commands on your Ubuntu 20.04 OS.
Step 2: Install Apache Web Server
Enter the following command to install Apache Web server. The apache2-utils package will install some useful utilities like Apache HTTP server benchmarking tool (ab).
After it’s installed, Apache should be automatically started. Check its status with systemctl .
Hint: If the above command doesn’t quit immediately, you can press Q key to gain back control of the terminal.
If it’s not running, use systemctl to start it.
It’s also a good idea to enable Apache to automatically start at system boot time.
Check Apache version:
Now type in the public IP address of your Ubuntu 20.04 server in the browser address bar. You should see the “It works!” Web page, which means Apache Web server is running properly. If you are installing LAMP on your local Ubuntu 20.04 computer, then type 127.0.0.1 or localhost in the browser address bar.
If the connection is refused or failed to complete, there might be a firewall preventing incoming requests to TCP port 80. If you are using iptables firewall, then you need to run the following command to open TCP port 80.
If you are using UFW firewall, then run this command to open TCP port 80.
Now we need to set www-data (Apache user) as the owner of document root (otherwise known as web root). By default it’s owned by the root user.
By default, Apache uses the system hostname as its global ServerName . If the system hostname can’t be resolved in DNS, then you will probably see the following error after running sudo apache2ctl -t command.
To solve this problem, we can set a global ServerName in Apache. Use the Nano command-line text editor to create a new configuration file.
Add the following line in this file.
Save and close the file. To save a file in Nano text editor, press Ctrl+O , then press Enter to confirm. To exit, press Ctrl+X . Then enable this config file.
Reload Apache for the change to take effect.
Now if you run the sudo apache2ctl -t command again, you won’t see the above error message.
Step 3: Install MariaDB Database Server
MariaDB is a drop-in replacement for MySQL. It is developed by former members of MySQL team who are concerned that Oracle might turn MySQL into a closed-source product. Enter the following command to install MariaDB on Ubuntu 20.04.
After it’s installed, MariaDB server should be automatically started. Use systemctl to check its status.
If it’s not running, start it with this command:
To enable MariaDB to automatically start at boot time, run
Now run the post-installation security script.
When it asks you to enter MariaDB root password, press Enter key as the root password isn’t set yet. Then enter y to set the root password for MariaDB server.
Next, you can press Enter to answer all remaining questions, which will remove anonymous user, disable remote root login and remove test database. This step is a basic requirement for MariaDB database security. (Notice that Y is capitalized, which means it is the default answer. )
By default, the MariaDB package on Ubuntu uses unix_socket to authenticate user login, which basically means you can use username and password of the OS to log into MariaDB console. So you can run the following command to login without providing MariaDB root password.
Check MariaDB server version information.
As you can see, we have installed MariaDB 10.3.22.
Step 4: Install PHP7.4
At the the time of this writing, PHP7.4 is the latest stable version of PHP and has a minor performance edge over PHP7.3. Enter the following command to install PHP7.4 and some common PHP modules.
Enable the Apache php7.4 module then restart Apache Web server.
Check PHP version information.
To test PHP scripts with Apache server, we need to create a info.php file in the document root directory.
Paste the following PHP code into the file.
To save a file in Nano text editor, press Ctrl+O , then press Enter to confirm. To exit, press Ctrl+X . Now in the browser address bar, enter server-ip-address/info.php . Replace server-ip-address with your actual IP. If you follow this tutorial on your local computer, then type 127.0.0.1/info.php or localhost/info.php .
You should see your server’s PHP information. This means PHP scripts can run properly with Apache web server.
How to Run PHP-FPM with Apache
There are basically two ways to run PHP code with Apache web server:
- Apache PHP module
- PHP-FPM.
In the above steps, the Apache PHP7.4 module is used to handle PHP code, which is usually fine. But in some cases, you need to run PHP code with PHP-FPM instead. Here’s how.
Today I am starting a web server setup series. In this series of articles, I’ll teach you how you can setup a web server or turn your own computer into a web server. I’ll also teach you how you can manage your web server, increase server security and guard it against specific types of attacks.
I published an article in 2016 in which I talked about turning a personal computer or laptop into a web server. It worked for almost all and so many people appreciated it. But that was just for fun. One can not start his/her own web hosting business following that article. In this series, I’ll show you how one can even provide web hosting services right from home and believe me, it’s not going to be tough.
What you should know for this series
What is better than Linux for managing web servers? Obviously nothing. But for some, it may be the only difficult thing in this series to understand the commands as all other stuff is easy. But do not worry just a very little knowledge will be enough for setting up a web server but you’ll need to learn Linux to securely manage your servers.
Few related terms that you should know –
IP Address
To better understand how we set up our own web server, it’s important to know what IP Addresses are. Let’s understand IP Address again in that same old fashion but it works. Like each house in our country has an address. If we invite somebody home and he does not know where our home is, we tell them the physical address of our home. Right? Devices talk to each other in the same manner. Each device has an address which is IP Address.
For example, when we type the request is sent to IP address of the machine which is hosting facebook.com.
If you read what I told above about IP addresses, then you might be asking who the hell tell which domain name belongs to which IP Address. Well, that’s where the DNS comes in.
The DNS has all the information about the specific domain you type. But it’s difficult for one DNS to store and deliver millions of requests at the same time. So we have got many DNS servers divided into regions and extensions. So we may have a DNS taking care of .com extension and another for .org and so on. This way the problem gets resolved. So now see you in the next article.
Am I correct that Ubuntu desktop and server are the same os but that desktop runs X and lacks things that a server might have like dhcp server, mysqld, apache, etc.? And that if I add those items it would in fact be a server with X instead of just the command line that is given with the server?
EDIT: Is this pretty much the same with all linux distros? I like Fedora, but I only saw Fedora Desktop. I can update it to become server, right?
15 Answers 15
The differences are just in what’s bundled as a default packaging to make things easier. In reality the difference between a server and workstation are just the purpose they’re used for; Linux is Linux in either case (indeed Windows NT variants were largely just differences in packaged tools/dll’s and some registry hacks to enforce licensing differences for how much you paid for your license. the kernel was the same and the base OS was the same).
In other words, Ubuntu Server and Ubuntu Desktop are two sides to the same coin. Server was just meant to run by default with some packages to make it easier to set up a LAMP server or file server by default while desktop looks nicer and has office tools/GUI/etc. for desktop users.
As everyone stated, you just need to apt-get the correct packages to make your Ubuntu Desktop “become” an Ubuntu Server.
However, there are differences in the installation process when you opt for the Server edition. For instance it allows you to install Ubuntu on a LVM volume, which the Desktop CD doesn’t support.
That’s correct. The default install of a desktop installs the ubuntu-desktop meta-package, which pulls in the normal GUI interface stuff. It also includes metapackages ubuntu-minimal and ubuntu-standard , which together comprise the basic Linux utilities.
Play around with the program tasksel if you would like to deal with server stuff; also note that Ubuntu has a separate server install CD if you wish to use that.
Correct. Its basically a package thing.
I know of several folks who install SERVER version then add on the desktop GUI for ease of use.
Play around with it. have fun. 🙂
Note: I’m not recommending one way or another. I personally like my servers to run with as little as possible. Less moving parts usually means less that can break.
The best answer is correct, but when I was googling this I expected to find an instruction of how to remove ‘desktop’ packages (gnome, xserver, etc) from my Ubuntu installation. I’ve found that I can use tasksel to remove ubuntu-desktop packages:
I did some mess with acpid and got the following error:
in the systemctl status acpid output. I’ve fixed this with just:
You can use tasksel for something like that.
That will install all the needed packages for the given task.
Even if you are using Ubuntu desktop 86_64X you can convert this into a sever by installing
You can see here the basic Ubuntu server is disabled or not installed. You can install it by pressing the spacebar and hit enter.
If you want to add more just issue the command tasksel
dmityugov is correct, but further to that, the kernels have different compile time options for things like raid, ethernet bridging, routing, etc.
For Ubuntu, yes. the difference is only the default packages.
for Fedora. is there a ‘Fedora server’? RHEL is a different thing, only remotely related to Fedora.
Yes, you can basically install all the different software that you want (eg apache , mysql , etc)
Yes Ubuntu desktop can become server by installing following packages
LAMP server (Linux, Apache2, MySQL, PHP), Mail server & OpenSSH server
Execute this command in terminal to install above packages (don’t forget ^) :
Yes, you are correct to say that basically they are both the same. However, I can mention at least 2 reasons why people create desktop and server version of an OS:
- Security: Server versions are designed out of the box to be more secure than desktop. Unnecessary services will not be available and users have final decision of what will be installed there. So they (should) know the potential vulnerabilities their server have.
- Performance: Not just because unnecessary services are not installed, but because the build will be optimized for performance. For example the kernel might be compiled with different option compared to desktop versions.
To take an extreme example, I don’t think people will want to run a production web site on Windows 7 instead of Windows Server 2008 even though it’s capable of doing that. But with Windows, I can see that there’s monetary incentive to do that. Windows 7 is less expensive compared to Windows Server 2008. With Linux, I believe using server version is a lot easier rather than using desktop version and then optimizing it to match a server version.
Got some older computer equipment lying around? Don’t throw away those old PCs just yet. Whether you’re cleaning out or upgrading the computers in the office or at home, you should be able to find something to do with them.
As we’ll discuss, you can use them for experimentation, routing, security, file or Internet serving, and more. Use these five suggestions to make one of the projects your late-night endeavor on the weekend or your new project at work.
#1 Install Ubuntu or other distribution to experiment with Linux
If you haven’t already, you could discover the world of free and open source computing by fiddling around with Linux. Within an hour or so, you can download and install Ubuntu, or one of the other thousands of distributions (distros) onto your old PC. You can even test it out before installing anything to your hard drive, using the live CD mode of some distros.
Ubuntu has become very popular, especially for Linux newbies. “Ubuntu” is an ancient African word, meaning “humanity to others,” hence its philosophy and mission to better the computing world. You can read more about this distro and download Ubuntu from its site. (See also: Discovering Ubuntu as a Windows User.) Other distributions can be found at DistroWatch.com.
Once you boot into a desktop version of Linux, you’ll see that, though it looks different from Windows, it still has the same main features. There’s still a start menu–usually better organized than in Windows–and icons on the desktop. Average users should be fine typing up documents, browsing the Web, and doing other basic tasks.
The biggest advantage is that you’ll now have access to hundreds of thousands of totally free applications. Some are small projects, however some rival that of their commercial counterpart, such as OpenOffice.org and Microsoft Office. Most distros are actually loaded with all the day-to-day software you’ll need: an office suite, e-mail client and calendar, Web browser, photo editor, and more.
For additional applications, you can use the Package Manager to search for and install other software that’s listed in the distro’s repositories; or download programs directly from a developer’s site and build them manually.
Linux is actually the operating system for many computer and networking devices. The rest of the ideas in this article also use Linux-based software.
#2 Make it a router with RouterOS or ZeroShell
Advanced networking features, such as those found in Cisco equipment, can be at your fingertips with little or no cost. Linux-based operating systems can convert your old PC into a multi-purpose LAN server. Use it to replace your off-the-shelf router by running the firewall for your network and sharing the Internet access (with NAT). You might even connect your offices together using the VPN server and client, offer public access by configuring the captive portal, or use balancing and fail-over for redundancy. The features and solutions are essentially endless.
Two popular projects you should look into are RouterOS and ZeroShell. ZeroShell is free and can be run from the CD with the configuration saved to a hard or flash drive. After minimal configuration at the console, you can administer it via a Web browser on a remote computer. RouterOS has been around longer and is more established. It installs directly onto a drive and has multiple configuration interfaces, including Web-based and a custom GUI application.
(For help with ZeroShell, see this tutorial series at our sister site, LinuxPlanet.)
#3 Make it a LAN file server with FreeNAS
If you do a lot of file sharing on your network, you might have looked into using network attached storage (NAS) rather than creating basic shares with Windows. You may have also noticed that NAS enclosures (basically small computers) don’t run cheap, and then you have to buy the hard drives too. However, you can create your own NAS enclosure by installing a FreeBSD-based NAS server, FreeNAS, on your old PC.
Using an NAS server means you don’t have to worry about other PCs being on in order to access Windows shares. Using FreeNAS gives you a central storage place that’s always accessible. It also provides better and easier control over shares. It can store user details and authenticate users. If using Windows shares, you’d have to duplicate every user account on all the computers for similar protection of shares.
Like other NAS servers, FreeNAS gives you recycle bin support. If you delete a file from a Windows share, it’s gone forever. However, if you delete a file from a FreeNAS share, it will go into the trash can, where you can later permanently delete it or recover it.
FreeNAS supports many different sharing protocols: CIFS (SMB/samba) for Windows, NFS for Linux/Uniux, and AFP for Mac OS X. Plus it supports FTP, RSYNC, and iSCSI. It even has an iTunes/DAAP server, so you can share files among your iPods. It also features a built-in BitTorrent server.
#4 Run Web, E-mail, FTP, and other Servers with Linux
Though Web hosting prices can be very reasonable, you might find it interesting to host your own Web site. It might also be useful when developing an Intranet or when working with special applications. You could host other services, such as an e-mail server with a POP3 and SMTP server, file access with an FTP server, or database access using a MySQL server.
The two major Web servers, the Linux-based Apache HTTP server and Microsoft’s IIS (available in professional editions of Windows) server, are actually free to use.
When installing Apache, you can either install just the Web server application (and other components separately, as needed) or install a Web server software distribution or package. When using Apache, it’s best to install a package of servers. Apache2Triad is a great package for Windows. If using Linux, you might want to include LAMP when installing Ubuntu Server Edition.
(For more details, see the Server Room DIY series at our sister site, ServerWatch.)
#5 Turn it into a hotspot with ZoneCD
Would you like to offer wireless Internet access to your visitors or neighbors, but don’t want to spend hundreds on a hotspot gateway? Well, you don’t have to; you can have a Wi-Fi hotspot up and running within an hour using your old gear. One solution is ZoneCD from PublicIP.
ZoneCD is a Linux-based live CD that provides Wi-Fi authentication and Web content filtering. It boots directly from the disc and there are no changes made to the hard drive. It requires only 128MB of RAM, a bootable CD-ROM drive, and a floppy drive or USB thumb drive to store the configuration. Two Ethernet cards are also needed. One plugs into the Internet and the other into a wireless router or access point (AP).
Hello, before I begin explaining my question I just want to say that I don’t really know most of what I’m talking about and may not use the correct terminology.
I recently got a desktop from a relative, and since I have never used any distro of Linux before (excluding Raspbian) I figured I would install Ubuntu Desktop on it just to see what it was like. Today I decided I want to turn it into a home server, which I have never done before. I plan on running a TS3 server on it, as well as maybe a web server and an SQL server if I can figure out how. From what I understand, it is better to use Ubuntu Server because it comes with PHP and Apache and all of that, but I am rather intimidated by the command line style. I feel like having a GUI would be less scary, since I know nothing about any of this.
Is it simple to just install LAMP on Ubuntu Desktop or should I just grow a pair and learn how to use Ubuntu Server? Also, are there any significant uses for a home server that I can’t do on Ubuntu as opposed to Windows Server? I understand that the common opinion on the Internet (and especially here) is that Ubuntu server is inherently better than Windows Server.
Edit: Oops, I just noticed the "which distro" thread. Not sure if this would really fit there though.
The short, short, short answer is: Yes. You can use Ubuntu Desktop as a server. And yes, you can install LAMP in your Ubuntu Desktop environment. It will dutifully hand out web pages to anyone who hits the IP address of your system.
There is a much longer answer to this, and I feel like I will get lost in the weeds trying to detail it out. But to try and keep it simple, there is nothing special that makes a server a server. All a server is, is a computer that runs applications such as Apache and MySQL, and waits for client computers to connect to it (or in the case of some software, goes out and touches client computers).
To your computer, whether you’re running Apache or Unreal Tournament, it doesn’t care. It’s just executing code. In fact, that might be a good example right there. Unreal Tournament, when you play against computer opponents, it’s just you and the computer. When you host a game to play against your friends, your computer as the host is considered the server.
Does that make sense? Or am I just making things more confusing?
I don’t think this is a "which distro" question, as the difference between server and non-server installs is a bit broader than that.
Archangel Mychael is right in that there’s no fundamental, core difference. You can install the same software in either place, and you can put a full desktop environment on a server install if you want to. BUT please be aware that a desktop-targeted distro might be set up quite differently from a server-targeted distro, by default at least, in some important ways.
If you’re going to expose a box to the unwashed masses on the Internet, you’re going to want good protection. Strong firewall rules, minimal network-facing services running, etc. But a desktop user sitting behind a NAT/router might find that inconvenient — such a user might want things to "just work." The desktop installation might have a more permissive firewall policy and more stuff running following installation, which wouldn’t necessarily be desirable for a server.
So you can make a desktop installation run server software, but it might not be optimal (or safe for external access) unless you really know what you’re doing and tighten it up from its defaults. However, if you’re setting this up as a personal server that will live behind your NAT box and never be accessed from outside your local network, then yeah, just set up the software you need on the existing desktop installation.
(And if you’re going to make a externally accessible box, please also don’t assume that just selecting a server-oriented distro is always good enough for plug-n-play. It’s not. The defaults may be more sane for that kind of environment, but there’s still a lot to know about security, so be careful.)
There are a few options during install that aren’t available if you start with the Desktop installer (like installing to LVM, or an mdraid array – though they may have added LVM at some point since I stopped paying attention to the desktop installer, not sure) but aside from that, there really ISN’T any difference between Desktop and Server.
Do a Server install and then do apt-get install ubuntu-desktop and poof, you’ve got a desktop. (But it’s still a server.)
Do a Desktop install and then do apt-get remove ubuntu-desktop; apt-get autoremove and poof, you’re almost as lean on install as you would have been installing from the Server disc to start with.
TL;DR do what makes you happy, for a hobbyist project. If you ever get pretty advanced, you may find yourself always installing from the Server media and then tacking on a desktop if you want a desktop – but that’s not something you "should" do, it’s something you can do if you eventually discover it makes more sense for you to do it that way.
Have you ever wanted to customize your Ubuntu PC as it installs? With the official minimal installer you can. Ubuntu Minimal is a lesser-known version of the popular Linux-based operating system. If you go to Ubuntu.com, you won’t see a download for it. This is because the company behind Ubuntu doesn’t really push their alternative installer. Still, with each release the Minimal installer receives the latest Ubuntu packages and you can use it to build a custom Ubuntu version.
SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.
To get everything going, download the ISO file. Then check out our tutorial on burning ISO images, and burn the Ubuntu install image on a CD/DVD or USB drive. When the minimal installer has finished burning, you’ll need to boot it up on your PC. This is done by changing the boot order on the BIOS of your PC. As you load it up, change it so that it loads the USB stick (or CD/DVD) before anything else. This will ensure that the Ubuntu installer boots up correctly.
Note: keep in mind that each PC is different. For some PCs, pressing the F2 key loads the BIOS area. Other times DEL or ESC works. Accessing the BIOS requires a special key combination. To figure this out, refer to your computer’s system manual.
Using The Minimal Installer
The Ubuntu Minimal installation tool is a lot different from the traditional Ubiquity installer. Instead of loading the Ubuntu desktop environment, you’ll be taken to an ncurses tool where you build an Ubuntu installation slowly. The first step is to choose your language. Look through the installer, select the language (if the installer didn’t auto-detect it), and press the enter key. Next, select your country and press enter to continue once again.
On the next page, Ubuntu will ask you to set your keyboard layout. This kind of thing is usually auto-detected, so press the enter key to move to the next step.
After selecting language, country, keyboard layout, etc., the installer will ask you to set up a host-name. The host-name is a nickname you give your Linux PC. This nickname will be seen by other PC’s on the network, so use that to your advantage. Erase the default “ubuntu” host-name, enter a new one and press the enter key.
Setting up the default user for Ubuntu is the next step. Enter the full name for the user, as well as the your desired user name and password into the fields. When the system finishes making the new user, Ubuntu will asks if you’d like to “encrypt your home directory”. Select yes if you’d like extra security. Otherwise, select “no” to continue on.
The next step in the installation process is to partition the disk. There are several options to choose from: guided – use entire disk, guided – use LVM, guided – encrypted LVM, and manual.
Not looking to set up an entire custom partition setup? Select the first option “guided – use entire disk”. Otherwise, select manual to set up your own partition layout. Don’t select LVM unless you actually know what LVM means.
With the partition method selected, Ubuntu will take some time and create the necessary modifications to your hard drive so that the rest of the operating system can install. Be patient. When the base finishes installing, the first part of the installation process is complete.
Customizing Your Ubuntu Installation
After the base system installs, the next step is to customize your installation with the “software chooser”. The software chooser is a big window that opens up, that the user can go through and select individual items to install.
Ubuntu Minimal lets the user turn this installation into a server, by selecting several of the server options, such as “samba server”, “LAMP server”, “DNS server” and etc. Alternatively, users can install the meta desktop package for any of the individual Ubuntu flavors. What does this mean?
For example, going through the software chooser to select “Lubuntu Desktop” means that Ubuntu Minimal will take all of the Lubuntu packages, and turn this installation into a Lubuntu PC. Programs, loading screen, everything.
Flavors in the installer include: Lubuntu, Kubuntu, Xubuntu, Ubuntu Budgie, Ubuntu Mate, Vanilla Gnome Ubuntu, traditional Ubuntu and other options.
To turn your installation into a specific flavor of Ubuntu, use the arrow keys on your keyboard and find the option you’d like, and press the spacebar to check the box. Keep in mind that the installer will let you install multiple things. This means if you want both Lubuntu and Kubuntu desktops on the same PC, you can select and install them.
Finishing Up
After selecting the software, Ubuntu will download it and install it on your PC. Since none of these packages are on the ISO itself, everything has to download from the internet. When the downloading completes, the installer will show a complete message, and prompt you to reboot. On log-in your new, custom Ubuntu is ready to go!