Tools you need to prepare
- A computer with at least 1GHz CPU, 4GB RAM and 60G hard disk (considering the running speed of your website which will be hosted in the server, a high performance computer is recommended)
- An USB flash disk with at least 2GB (all data on this flash disk will be erased).
- Connect the computer to the Internet with LAN
OK, let’s start
- Download Ubuntu 14.04 LTS desktop version (64bit) from http://www.ubuntu.com/download/desktop, it’s an ISO format file and the file size is about 1GB.
- Download UltraISO from https://www.ezbsystems.com/ultraiso/
- Install UltraISo, and then run it
- In UltraISO, locate the local file to the download directory of Ubuntu, then double click the Ubuntu ISO file.
- Plug your USB flash disk to your computer
- Choose Bootable -> Write Disk Image from the main menu, check if the destination disk is correct, set “Write Method” to “USB-HDD+”., then click Write.
- After finish, pull off the USB flash disk, and plug it to the computer to which you want to create the server.
- Turn on the server, press F12 (or F9, F10, different mainboards vary, pay attention to the message at boot time) to choose boot device.
- Select start menu to boot from “USB-HDD+”, then start to install Ubuntu by following the on-screen steps, you need to input admin password during the installation, remember it.
- After installation, enter the admin password to login Ubuntu, and then you can see the desktop, press Ctrl + Alt + T, call out the terminal.
- Input “sudo apt-get update”, then press Enter, it will ask you the admin password, just input it, similarly hereinafter.
- Input “sudo apt-get install openssh-server”, then press Enter.
- Input “sudo service ssh start”, then press Enter.
- Input “sudo gedit /etc/ssh/sshd_config”, in the editor window, add a “#” in the begin of this line “PermitRootLogin without-password” to rem it, and then add a line “PermitRootLogin yes” in the bottom, then press Ctrl + S to save the file, and press Alt + F4 to exit editor.
- Ok, now the SSH service is installed successfully, you are able to use a SSH client to control the server in another computer, both Windows and Linux system.
- Then let’s install Apache now, input “sudo apt-get install apache2” in the terminal then press Enter.
- Open the firefox browser, type “locahost” in the address bar then press Enter, you should see the Apache default page.
- Then back to the termianl to continute to install PHP5, input “sudo apt-get install php5”, then press Enter.
- Input “sudo apt-get install mysql-server” and press Enter to install MySQL.
- Input “sudo apt-get install phpmyadmin” and press Enter to install PhpMyAdmin, during the installation it will ask you the destionation webservice and root password, select “apache2” and give it a root password, considering security, you should not use the password same with the system admin password.
- Input “sudo chmod 777 /var/www” and press Enter to modify the permission of the web root directory.
- Input “sudo ln -s /usr/share/phpmyadmin /var/www/html/” and create a shortcut url of the PhpMyAdmin.
- Type “locahost/phpmyadmin” in firefox’s address bar then press Enter, you should see the interface of PhpMyAdmin.
- OK, all parts of LAMP system are ok, but we still need a ftp service to modify our files, so come back to the terminal, input “sudo apt-get update” then press Enter to update the software packages.
- Input “sudo apt-get install vsftpd” then press Enter to install vsftpd service.
- Input “sudo service vsftpd start” then press Enter to start the ftp service.
- Now we should create a ftp user, input “sudo useradd -d /var/www/html -s /bin/bash ftpuser”. Notice the “ftpuser” here is the account name of the ftp user, you can change it to your own.
- Input “sudo passwd ftpuser” then press Enter, then input a new password twice to create a password for ftp account.
- Input “sudo gedit /etc/vsftpd.conf” then press Enter, then in the editor, delete the “#” in the begin of the line “local_enable=YES”, and add 4 lines in the bottom:
userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/allowed_users
seccomp_sandbox=NO - Then press Ctrl + S to save, and press Alt + F4 to close editor.
- Input “sudo gedit /etc/allowed_users” then press Enter, make sure that “ftpuser” is in it, if not, add it.
- Input “sudo gedit /etc/ftpusers” then press Enter, make sure that “ftpuser” is NOT in it (account here CANNOT login ftp).
- Input “sudo service vsftpd restart” then press Enter to restart the ftp service.
- Ok, all over now, you can use a ftp client to connect to the service with the account and password you created.
Notice: All articles are original by ComputerBlog.com.au, please make sure the original URL will be kept in reproduction.
Post Footer automatically generated by wp-posturl plugin for wordpress.
(13)