Hey guys Chester here and I will be doing a how-to install Wordpress on a VPS.
What you'll learn:
Install: Nano (text editor)
VSFTPD (ftp server)
LAMP (software bundle)
LAMP stands for (L)inux (A)pache (M)ySQL (P)HP
This tutorial assumes that you already have basic knowledge about Ubuntu commands.
I will be using an Ubuntu 12.04 64-bit Minimal Template OS
So first, do an update!
sudo apt-get update
Once you've finished updating, we're going to install nano, which is a text editor program.
sudo apt-get install nano
Now that we have nano, let's go and install VSFTPD so that we can use an FTP client to connect, upload, or download files to and from our VPS.
sudo apt-get install vsftpd
Once you've installed that, it will automatically run using the default settings. To stop it, do:
sudo service vsftpd stop
Now that's VSFTPD is stopped, we can continue on editing the config file.
sudo nano /etc/vsftpd.conf
Ok so change these lines:
anonymous_enable=NO^This prevents anonymous users from getting into our FTP.
local_enable=YES^This allows local users to connect.
write_enable=YES^This makes it possible for use to make files or directories via FTP.
connect_from_port_20=NO^Port 20 need to turned off, makes vsftpd run less privileged.
Now do "Ctrl+O" and "Ctrl+X" to save and quit.
Ok so let's move on to making a user for vsftpd.
/var/www is the default directory for LAMP. Replace "ftpuser" with your desired username.
sudo useradd -d /var/www -s /usr/sbin/nologin ftpuser
Now we need to set a password for "ftpuser." To do that:
sudo passwd ftpuser
Ok so now give ftpuser the permission:
sudo chown -R ftpuser /var/www
Now that we're done with that, we need to make a userlist for vsftpd to recognize users.
sudo nano /etc/vsftpd.userlistThis will make a file called "vsftpd.userlist" in the directory "/etc/"
You will notice that the file is empty, go and add your username in there.
ftpuserThen do "Ctrl+O" then "Ctrl+X."
Now go back to the vsftpd config file
sudo nano /etc/vsftpd.confand press Page Down until you reach the bottom. Now copy this:
# the list of users to give access userlist_file=/etc/vsftpd.userlist # this list is on userlist_enable=YES # It is not a list of users to deny ftp access userlist_deny=NOAnd paste it. To do that, right click.
Ok so we now have to configure the shells:
sudo nano /etc/shellsPress Page Down again and copy this:
/usr/sbin/nologinand paste it.
We're done with the configuring stuff so now let's make a user group:
sudo addgroup ftpusersand add ftpuser to that:
sudo usermod -Gftpusers ftpuser
Give yourself a pat on the back because we're done! (With the ftp part)
SOURCE: Noob2Geek (not allowed to post links)
Ok now to install LAMP
sudo apt-get install lamp-server^
Eventually, it will ask you for the MySQL "root" user password.
It takes some time for it to install it.
Now, let's go and install PHPMyAdmin
sudo apt-get install phpmyadmin
Soon, a screen will pop up. Just press SPACE and ENTER to select Apache and continue with the installation.
Another screen will pop up, just press ENTER to select Yes then it will ask for some passwords.
After that, installation is done! Next is making a MySQL database and user for Wordpress.
<Your VPS' IP>/phpmyadminand login.
Click the Databases Tab and fill in the text box with the database name you want Wordpress to use then click Create. Now go and click the Previlages tab. Go and find the "Add a new user" link and click it. Fill in the text boxes and choose local for the host. Then scroll down and check the "Grant all previlages" and click Check All below it then click Create User.
Now we can focus on getting Wordpress into our server.
Go back to putty or whatever SSH client you use and type:
cd /var/wwwThis will send us to the main directory where we upload our files.
Now if you do
lsYou will see that there's a file call "index.html" we need to get rid of that.
Next, we need to download the latest Wordpress files. Go to Wordpress' website and find the link for latest.zip
After that unzips, it will extract a folder named wordpress. Now if you go to
<Your VPS' IP>/wordpressYou'll see the Wordpress installation. But if you want it on the root directory, you can do
mv <file1> <file2> <file3> <folder1> <folder2 <folder3> /var/www
Then continue on with the installation! That's it for this tutorial! If I missed anything, please feel free to tell me! If there's an easier way of doing something, go ahead and post it here!