Jump to content

  •  

Most Liked Content


#83 eBay Listing: Dell XPS 12 12.5" Convertible Ultrabook i7 3517U @ 1.90Ghz...

Posted by Wilson18 on 18 August 2014 - 10:24 AM

Selling a Dell XPS 12 Convertible Ultrabook

Comes in Original Packaging

Great Condition. 

 

VIEW ON EBAY

 

System works great, only selling as no longer needed - I spend all my time on my desktop and this hardly gets used. 

Feel free to ask my any questions or let me know if you want any other images.

 

Specs from Speccy:

Operating System

Windows 8.1 Pro 64-bit

CPU

Intel Core i7 3517U @ 1.90GHz

Ivy Bridge 22nm Technology

RAM

8.00GB Dual-Channel DDR3 @ 665MHz (9-9-9-24)

Motherboard

Dell Inc. 089J4R (U3E1)

Graphics

Generic PnP Monitor (1920x1080@59Hz)

Intel HD Graphics 4000 (Dell)

Storage

RealSSD mSATA 256GB (SSD)

 

Images (Click to see full size): 

 

 

Laptop Mode

laptop.JPG

Laptop Mode with Packaging

laptop_package.JPG

Transforming to Tablet Mode

transform.JPG

Tablet Mode

tablet.JPG

Tablet Mode with Packaging

tablet_package.JPG

Outer Packaging

outer.JPG

XPS Box

box.JPG

Inside the Box

inside.JPG

Below the XPS

below.JPG

Manuals

manuals.JPG


  • Wilson18 and Rolandcalm like this


#70 How to: Set up SSH Keys to log in on CentOS 6.5 from Windows

Posted by Wilson18 on 15 July 2014 - 01:37 PM

In this guide, I will be showing you how you can set up SSH Keys to in to CentOS 6.5. To do this, you will need to install Puttyon your Windows machine you would like to log in from. You can download it here. Once you have done this, we will need to log in to our server by ssh.

 

Once logged in, we need to create our keys for the root user. 

ssh-keygen

Once you do this, you will be asked to choose a filename

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):

You should leave this blank and just press the enter key.

You will now be asked to enter a password. You can use a password if you like or leave this blank to log in to the server without a password.

Once you have done this, it should look like this:

prettypicture.jpg

Next, we need to change to the location where we store the keys we have just generated and change the permissions on them. 

cd ~/.ssh; ls; chmod 700 ~/.ssh; chmod 600 ~/.ssh/*

You should see the following been outputted. 

id_rsa  id_rsa.pub

The id_rsa  file is our private key (which we will be using) and the id_rsa.pub is our public key. 

 

What we need to do now is to authorise the key so that we are allowed to use it. 

cat id_rsa.pub >> authorized_keys

One last thing we need to do is to allow us to use the ssh keys in the configuration file. To do this, we need to install nano and the open it. 

yum install -y nano; nano /etc/ssh/sshd_config

The line we need to look out for is 

#AuthorizedKeysFile     .ssh/authorized_keys

You will need to remove the # symbol. You can then save and exit the file. 

 

Finally, we need to open up our private key and make a copy of it.

nano id_rsa

When his is open, it should look something like this

key.jpg

To copy this, you will need to highlight everything and then right click. This should also paste it. Once you have this copied, you should then exit the file WITHOUT saving it. 

 

We can finally restart our ssh server

service sshd restart

Now that we have done this, we are pretty much done CentOS now and we can swap back to windows. In Windows, you will need to open Notepad.exe and paste the key in to here and save it. It doesnt really matter what you save this as at the moment. 

notepad.jpg

Next, you need to open PuTTYgen. You will need to go to Conversions and click Import Key. 

importKey.JPG

You then select the key we created in notepad. If you chose a password earlier, you will need to enter this where it says key passphrase and then confirm it below. 

savePassKey.JPG

Click the save private key button. You can save the file as whatever you would like. 

 

Now we have done this, we will need to go into PuTTY. In PuTTY, you will need to enter your username@IP address and port in the port box. You can then go into the Connection settings and in to the SSH section and click Auth.  In auth, you can select your private key using the Browse button. 

 

PuTTY.JPG

Once you have done all of this, we can go back to session and save the session so we can connect at a later date without all of this. Enter the session name and save it. If you then click open, it should connect you without having to enter your username or password. If you had a passphrase, you will need to enter that instead.

login.jpg


  • Rolandcalm and KJwbUEfpgx like this


#38 How to Create a MineCraft Server on a CentOS 6.5 VPS/Dedicated Server

Posted by Wilson18 on 14 June 2014 - 09:16 PM

 In this tutorial, I will be showing you how you can install and set up a Minecraft Server on CentOS 6.5. To do this, you will need to either have access to a VM or a Dedicated Server by ssh or be sitting in front of one. This tutorial will be based on a clean installation of CentIOS 6.5. Once you have done this and logged in as root, you will need to make sure to update  all packages on it. 

yum -y update

Now that your server is up to date, you will need to install Java, nano and screen. 

yum install -y java-1.6.0-openjdk nano screen

Now that you have done this, you should go over to minecraft.net and download the latest minecraft server.jar. The one I have is https://s3.amazonaws...erver.1.7.9.jar. We can download this by typing

wget https://s3.amazonaws.com/Minecraft.Download/versions/1.7.9/minecraft_server.1.7.9.jar

Now that we have this downloaded, we can go and create a folder to store our minecraft files in. 

mkdir minecraft

We can then transfer the file we downloaded to this folder and change its name

mv minecraft_server.1.7.9.jar minecraft/mc.jar

This will move the file to the minecraft folder and name it mc.jar. Next, we may aswell move to this directory

cd minecraft

Now we have to make sure that the file is executable.

chmod +x mc.jar

We should now just create a new session of Screen so that we can access our MC server at a later date.

screen

We are now ready to start up our minecraft server

java -Xmx1024M -Xms1024M -jar mc.jar nogui

The two occasions where 1024M comes up is the amount of memory we are providing to the server. This can be changed to whatever you like. 

 

If we ever need to close the ssh connection, next time we connect, all we have to do is type 

screen -r

To connect to our old minecraft connection and should be allowed to make any minecraft commands.


  • MiguelOl and Rolandcalm like this


#97 Login with Facebook and Twitter

Posted by Wilson18 on 24 October 2014 - 06:54 PM

Hi everyone. To make it easier for new people to Sign up and Sign in to Wilson18.com, I have added Facebook and Twitter Integration. This means that you are now able to sign up and log in via those two website. I also hope to get Google Integration enabled soon! Make sure to Share this post with your friends to get more people learning new things! As always, post if you have any suggestions for tutorials.

 

Facebook: https://facebook.com/wilson18com

Twitter: https://twitter.com/wilson18com

Google Plus: https://plus.google....735502136/posts


  • Rolandcalm likes this


#8 How to Host Multiple Sites with Apache on Ubuntu and Debian

Posted by Wilson18 on 25 May 2014 - 11:42 AM

I will be doing the following through an OpenSSH connection to the server using Putty on Windows 7. If you do the same, you will connect with your servers IP Address using port 22 with your username and password.

In order do to this next part, you will need your own domain name. If you have one already, you will need to change the DNS records to point to your server. If you do not already have one, you can easily buy one from somewhere like godaddy.

If you decide to buy your own domain, you will need to change the dns records to point to your server.
If not, you can add a domain name to your host file along with your servers IP Address. To set this up, I will be editing the hosts file to route traffic internally for site1.com and site2.com. What this means is that if I was to open up the internet and navigate to these website, instead of looking on the internet for it and doing a dns lookup, it will automatically look on to your webserver. If you already have your own working domains then you can use them.To edit the hosts file, open up the start menu and search for notepad. Then click ‘Run as Administrator’

start.jpg

Once you have notepad open, go to file and then open. Navigate to C:\Windows\System32\drivers\etc

In the window where it says Text Document (*.txt), click the drop down box and change it to All Files and then open hosts.

browse.jpg

Once the file is open you will want to add to the bottom of the document these lines:

<ServerIPAddress> site1.com
<ServerIPAddress> site2.com

so when finished it should look like this:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost

10.0.0.150 site1.com
10.0.0.150 site2.com

On the Ubuntu Server

 

Now, we need to update the packages on our server before we can install the ones we will be using. We can do this using the following command 

sudo apt-get update; sudo apt-get upgrade;

post-1-0-08161300-1401017171.jpg

Once you have done that, you will need to install two packages. One as a web server and the other as the sql server. To do this, you type the following:

sudo apt-get install apache2 mysql-server

post-1-0-49394600-1401017172.jpg

 

When installing, you may be asked if you would like to continue. You should type ‘Y’ and then click enter. Next you will be asked to choose a password for your new mysql root user.

post-1-0-17422400-1401017173.jpg

After choosing the password, you will then need to repeat it.

We will now be setting up apache2 so that we can host multiple websites. To do this, we will need to edit the apache2 configuration file. 

sudo nano /etc/apache2/sites-available/default

It should look something like this.

 

apache2-config1.png

We will need to remove all of the contents of this file. We can do so by holding down the Ctrl key + K. Next you will need to enter the below configuration.

You will then need to enter the following information into the file.

NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin youremail@domain.tld
    ServerName site1.com
    DocumentRoot /var/www/site1.com
    CustomLog /var/www/logs/site1.com.log combined
    ErrorLog /var/www/error_logs/site1.com.log
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin youremail@domain.tld
    ServerName site2.com
    DocumentRoot /var/www/site2.com
    CustomLog /var/www/logs/site2.com.log combined
    ErrorLog /var/www/error_logs/site2.com.log
</VirtualHost>

You can save this by pressing Ctrl + O and Ctrl + X to exit. 

To create a server we do mkdir followed by the location. Type in the following:

mkdir /var/www/site2.com
mkdir /var/www/error_logs/
mkdir /var/www/logs/
mkdir /var/www/site1.com

We now need to restart apache to make sure everything is okay.

sudo service apache2 restart

If you see a message like the following then it is okay.

message1.png

It is probably a good idea to create a index page in each of the directories so that you know which is which and so you can make sure it is working. You can do so with the following:

echo "<p>This is site1</p>" > /var/www/site1.com/index.php
echo "<p>This is site2</p>" > /var/www/site2.com/index.php

This way, when you go to site1.com you should see the message “This is site1″ and if you go to site two you will see “This is site2″.


  • Rolandcalm likes this


#7 How to Open Terminal in Current Folder in Ubuntu Desktop

Posted by Wilson18 on 25 May 2014 - 11:32 AM

In this tutorial I will be showing you how to enable right click on the desktop to open the terminal. We can do this by clicking in te top button on the left saying ‘Dash Home’ and typing in ‘Terminal’.

Once open, we will need to type in

sudo apt-get install nautilus-open-terminal

You will need to then enter in your password. It will then download from the server and install. You can now go to the top right and click shut down and then reboot. You should now be able to right click the desktop and open the terminal after you login.


  • Rolandcalm likes this


#57 My Limited Edition Gold Liquid Wallet

Posted by Wilson18 on 05 July 2014 - 11:05 PM

Hi Everyone!

 

I am so excited to announce that I have just received my Limited Edition Gold Liquid Wallet which I got from backing this Kickstarter! It is so much easier than having to carry around my bulky wallet along with a keyring and it is surprisingly light and nice to hold. I would highly recommend it to anyone else. If you have any questions then please ask them below and I would be happy to answer any I can. 

liquid 1.JPG

liquid 2.JPG


  • Rolandcalm likes this


#54 Sub4sub

Posted by DraxxTV on 04 July 2014 - 08:53 PM

Hi,

 

I have just starting a youtube channel called DraxxTV and I am looking to get subs. I will be posting tutorials on here so if anyone is able to sub me, I will sub back!! thanks


  • Rolandcalm likes this


#45 How to: Create Your Own Squid Private Proxy on a VPS/Dedicated Server

Posted by Wilson18 on 27 June 2014 - 11:22 AM

In this tutorial, I will be showing you how to create your own private proxy server on a CentOS VPS or Dedicated Server. This will be set up to allow a user with a username and password to access the proxy aswell as allow anyone on an IP Address without authentication.  [DISCLAIMER] - Please note, this it not normally allowed on many servers so please consult the terms of use from your provider to avoid any unwanted suspensions. 

 
To do this, we will need a clean version of CentOS 6.5 (x64 bit) and be logged in to it as root. The specs of the VPS I will be using are 2GB RAM, 2GB Burst RAM, 2GB Swap, 20GB Disk Space with 1IP. Once we have done this, we will need to update all of the different packages. 

yum -y update

Once all of the packages have been updated, we can then install Nano and Squid. Nano is the text editor I will be using and Squid is the Proxy Server. 

yum install -y nano squid

Now that squid is installed, we are just going to create a backup of the configuration file so if we go wrong, we can just restore the original file.

cp /etc/squid/squid.conf /etc/squid/squid.conf.bak

We can now go ahead and edit our squid config file. 

nano /etc/squid/squid.conf

We are now going to completely clear this file to enter our own settings in (Hold Ctrl + K Down to speed things up). We can now paste in the following. 
 
 

#A Port you would like to use to access the proxy. Change this to make it more secure. 
http_port 3128


acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12    # RFC1918 possible internal network
acl localnet src 192.168.0.0/16    # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines


acl SSL_ports port 443
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
acl Safe_ports port 70        # gopher
acl Safe_ports port 210        # wais
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280        # http-mgmt
acl Safe_ports port 488        # gss-http
acl Safe_ports port 591        # filemaker
acl Safe_ports port 777        # multiling http
acl CONNECT method CONNECT


http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid
refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern -i (/cgi-bin/|?) 0    0%    0
refresh_pattern .        0    20%    4320
#Your Personal IP to allow without authentication  (Remove this line and one below to disable this)
acl myclients src ###.##.##.###   
#Allow this IP without authentication         
http_access allow myclients                 

#If you are on a 32 bit machine, remove the 64 from /lib64/
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/squid_access  
auth_param basic childred 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl ncsaauth proxy_auth REQUIRED
http_access allow ncsaauth
forwarded_for off

#Enter your servers IP here.
acl ip1 myip ###.##.##.###     
#Enter your servers IP here.                            
tcp_outgoing_address ###.##.##.### ip1          
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all

#Allocate 3GB for Caching
cache_dir ufs /var/spool/squid 3000 16 256    
#Maximum Cache Object 1GB
maximum_object_size 1024 KB      
#Use 1GB RAM for Cache                  
cache_mem 1024 MB                                      

We can now save and exit the file. Now, we will just go and generate our cache directories 
 

squid -z

Along with this, we should also enable it to start when we boot the server so we can still use it after a reboot

chkconfig squid on

Almost there, we can now add our user for the proxy. Change admin to the username you would like to use 
 

touch /etc/squid/squid_access; htpasswd /etc/squid/squid_access admin

You should then be asked to create a password for this user.

 

Now that you have done, we are pretty much set. 

service squid start

If you would like to tail the incoming connections, you can do so like this

tail -F /var/log/squid/access.log

Once you have connected to the server, you should see lots of logs been generated. 

 

If you are not sure how to connect to this server, you can view this tutorial


  • MiguelOl likes this


#44 Get Free Hosting

Posted by Wilson18 on 26 June 2014 - 10:23 PM

As you may know, I am very interested in helping people learn new things which is why I post all of the tutorials I do. When it comes to learning things like php, I have done my best to show you how you can set up your own webserver but I know this is not possible for everyone. For those who cannot do this or would just prefer not to, I am very happy to offer out free web hosting. If you are interested in this then make sure to sign up and send me a PM with the following information: 

 

  • Firstname
  • Lastname
  • Email
  • Your Domain (Can provide a subdomain if requested)

Once you have done this, I will go ahead and set up up with a cPanel account which will provide you with:

  • 100MB of Disk Space
  • 1GB of Bandwidth
  • 1 Domain
  • 1 Subdomain
  • 1 Email
  • 1 FTP Account

 

The account created will come preset up with the Codiad Editor and can also be upgraded if needed. Please note that your account is only provided for educational purposes so please do not abuse this. If you have any questions then please leave them below. 


  • Rolandcalm likes this


#4 How to Update Packages on Ubuntu and Debian

Posted by Wilson18 on 25 May 2014 - 11:07 AM

If you have logged in as root then you should be able to proceed as described. If not, you will need to switch to the root user with the following command:

sudo su

This will then require you to enter the password. Once you have done this, you will be logged in as the root user.

Now that you have logged in as root, you can proceed with the following command to update your system:

apt-get update; apt-get upgrade

If there are any updates available, it will ask you if you would like to continue.


  • Rolandcalm likes this


#34 How to set which DNS / Nameservers to use on Ubuntu and Debian

Posted by Wilson18 on 07 June 2014 - 08:31 PM

In this Tutorial, I will be showing you how to set which dns servers to use. To do this, we will need to set up the resolv file. Depending on if you are ubuntu or debian, the config files location changes slightly. Make sure you get the right one or it wont work and may be overwritten. 

 

If you are on debian, you will need to use

nano /etc/resolv.conf

But if you are on Ubuntu, you will need to use

nano /etc/resolvconf/resolv.conf.d/base

In this file, you will be okay to delete everything. Once empty, you can set your nameservers like below.

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 192.168.1.1

If you see a comment which says about it been generated by Network Manager, it is a good idea to follow this tutorial for How to Disable Network Manager from Starting in Debian as what you enter in here will most likely be reset every time you reboot. 


  • Rolandcalm likes this


#32 How to Disable Network Manager from Starting in Debian

Posted by Wilson18 on 07 June 2014 - 07:47 PM

In this tutorial, I will be showing you how you can disable Network Manager (or any other service) from starting at startup. To do this, you will need to be in the terminal as root or with sudo permission. To do this, all you need to do is run this command

update-rc.d -f network-manager remove

This service should now no longer start up automatically and should only ever start if you tell it to. 


  • Rolandcalm likes this


#27 How to Enable root Login on Ubuntu Server

Posted by Wilson18 on 01 June 2014 - 06:23 PM

In this tutorial, I will be showing you how to enable root login on Ubuntu Server. To do this, you will need to log in to your server on your normal account. You must have permission to sudo. Once in, type

sudo su

Enter your password. 

Once switched to root, you then have to set a password for the user. 

passwd root

Enter your new password for the root user. Once you have done this, you will be able to login as root. If you then type 

exit
exit

This should then log out out of the server. You can then try and log in with root and the password you selected.


  • Rolandcalm likes this


#14 How to Install Java 7 JDK on Ubuntu

Posted by Wilson18 on 25 May 2014 - 07:24 PM

Installing the Java JDK on Ubuntu

In this tutorial, I will be showing you can install the Java JDK on Ubuntu via the terminal. This should work on all versions of Ubuntu and any Debian based operating system. The first thing you will need to do is open the Terminal and switch to the root user. This will just save time and mean you dont have to keep sudo'ing.

post-1-0-53638000-1412790448.png

Once you have the terminal open, type in the command below and then your password.

sudo su

You should now be able to run the following commands without the need to sudo. Next, you must make sure everything is up to date. you can do so by typing

apt-get update; apt-get upgrade

post-1-0-75018400-1412790737.png

Once everything has updated, you can now install the JDK.

apt-get install default-jdk

post-1-0-34921500-1412790919.png

You can test to make sure the JDK has been installed by typing in javac in to the terminal.

post-1-0-14319000-1412791125.png


  • Rolandcalm likes this


#13 How to Create a WordPress Website on Ubuntu and Debian

Posted by Wilson18 on 25 May 2014 - 06:56 PM

To install wordpress, we must first create a a database and a user for that database. We can do this by loging into phpmyadmin. When you do so, go in to sql view and enter the following but making sure to change the YOURPASSWORDHERE for a password of your choice:

CREATE DATABASE WordPress;
CREATE USER 'WordPress'@'localhost' IDENTIFIED BY 'YOURPASSWORDHERE';
GRANT ALL PRIVILEGES ON * . * TO 'WordPress'@'localhost' IDENTIFIED BY 'YOURPASSWORDHERE' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `WordPress` . * TO 'WordPress'@'localhost';

Once you have done this, you can go back in to ubuntu terminal and start the download of WordPress. We will be downloading and installing to site1.com. Put this where you would like it to be hosted.

cd /var/www/site1.com
wget http://wordpress.org/latest.tar.gz

When the file has finished downloading, we will need to extract it. we do so with this command

tar -xzvf latest.tar.gz

This will leave you with a folder called wordpress. We now need to go in to that folder and move it to the correct directory. We can do this with the following command.

cd /var/www/site1.com/wordpress
mv * /var/www/site1.com
rmdir /var/www/site1.com/wordpress
cd /var/www/site1.com
rm latest.tar.gz
sudo chmod 777 -R /var/www/*

What this does is it moves everything from the wordpress directory to the parent directory. It then deletes the wordpress directory and the rm latest.tar.gz file. We have also set the permissions so wordpress can edit the files in site. Now we can open up site1.com and configure wordpress.

wordpress.png

When you go through the configuration process, it should look a little like this:

config.png

It should then have created the configuration file. You should now see a button to start the install:

install.png

Fill in the the form with all of the information about your new site… Your almost done! The only thing left we should do now is to set the ftp details so that you can install new things on your site. To do this, we first need to log in to phpmyadmin and create a user in our ftp database. We can do this by going in to the sql view and entering the following:

INSERT INTO `pureftpd`.`ftpd` (
`User` ,
`status` ,
`Password` ,
`Uid` ,
`Gid` ,
`Dir` ,
`ULBandwidth` ,
`DLBandwidth` ,
`comment` ,
`ipaccess` ,
`QuotaSize` ,
`QuotaFiles`
)
VALUES (
'WordPress', '1', MD5( 'password' ) , '2001', '2001', '/var/www/site1.com', '0', '0', '', '*', '0', '0'
);

Now that WordPress has its own ftp user, we will need to edit the wp-config.php file. We will do this through the terminal.

nano /var/www/site1.com/wp-config.php

If you then scroll down to the bottom and add the following lines of code then you should now be done.

define('FTP_USER', 'WordPress');
define('FTP_PASS', 'password');
define('FTP_HOST', 'localhost');

ftp-credentials.png

After you have saved and closed that, assuming you have done everything else specified in this guide then you should have everything sorted and your new website should be perfect.


  • Rolandcalm likes this


#12 How to Change PHP Upload Limit on Ubuntu and Debian

Posted by Wilson18 on 25 May 2014 - 12:41 PM

On your website, you may find that you need to upload large files to it (more then a few MB’s) so it is useful to change phps upload limits. To do this, we first need to find out where the php.ini file is located. We can do this by writing the following file in one of your new web directories.

nano /var/www/php.php
<?php phpinfo() ?>

Once you have done this, Save and exit. visit localhost/php.php and find the following

php-location.png

Once you have found it, you need to remove the file you have just created and open and edit the config file.

rm /var/www/php.php; nano /etc/php5/apache2/php.ini

When you have the file open, you will see there are almost two thousand lines of code. To find what it is we need, I would recommend using the search function. This is done by pressing Ctrl + W

You will need to see where it says:

upload_max_filesize

and

 post_max_size

You will see that at after each of them it says = and then a number. If you change that value to 25M then it should now allow you to upload files up to 25MBs. It should look something like this:

upload_max_filesize = 25M
post_max_size = 25M

php-ini.png

Now, save and exit the file. After this, you will need to restart apache to make sure everything is working.

service apache2 restart

  • Rolandcalm likes this


#111 Getting Involved

Posted by Wilson18 on 02 March 2015 - 12:13 AM

Hi Everyone! My name is Chris and I run a small YouTube channel where I post video tutorials. I am currently sitting around the 500 sub mark and I am looking for more like minded people to help grow with. I am looking for some more YouTubers interested in tech to put in my Featured Channels section in the hope of driving viewers between our channels. I am also looking for more people to get involved on this website.  If you are interested or would like to get involved, please message me or comment below :D My Channel is http://youtube.com/wilson18com  


  • Rolandcalm likes this


#11 How to Set up Virtual FTP with MySQL on Ubuntu and Debian

Posted by Wilson18 on 25 May 2014 - 12:37 PM

In this guide I will be showing you how you can set up ftp access to the sites we have created. This will be managed by a MySQL database so you can easily add and edit users. You could also write a script to automate this.

 

As there is a lot of writing in this guide, I would recommend you log in to your server via ssh using putty as that way you can copy and paste without having to worry about making mistakes. Once you have logged in to you will need to install pureftp. First, we will be switching to root user. Do this by typing

sudo su

and enter your password when it requests it. Next, install pureftp by typing in:

apt-get install pure-ftpd-mysql

You may be asked if you would like to continue, ensure you click Y to continue.

1.jpg

Once that has finished installing, we then create an ftp group (ftpgroup) and user (ftpuser) that all our virtual users will be mapped to. Replace the group- and userid 2001 with a number that is free on your system:

groupadd -g 2001 ftpgroup
useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser

Once we have done this, we need to configure the database that we will be using for the user management. We will do this through PHPMyAdmin. You can access this by opening an internet browser and going to the ipaddress of your server followed by /phpmyadmin. For mine, I will be going to

http://10.0.0.150/phpmyadmin

You will then need to log in to your phpmyadmin.

2.jpg

Once logged in, you will see there is a bar accross the top with a tab saying SQL. Click this.

3.jpg

In the box, type in the following:

CREATE DATABASE pureftpd;

Where it says YOURPASSWORDHERE, please enter a password of your choice. Make sure this is the same in the next two snippets.

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON pureftpd.* TO 'pureftpd'@'localhost' IDENTIFIED BY 'YOURPASSWORDHERE';GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON pureftpd.* TO 'pureftpd'@'localhost.localdomain' IDENTIFIED BY 'YOURPASSWORDHERE';FLUSH PRIVILEGES;

When you have typed it or pasted it in to the box as shown below, click insert. (If you see # MySQL returned an empty result set (i.e. zero rows). on the end of each line, dont worry its fine!)

4.jpg

We will now create the table to store all off the users data including things like their ftp directory, amount of their storage and number of files allowed. To do this, click on the tab at the top saying Databases and click the database called pureftpd.

5.jpg

Once open, click the SQL Tab again at the top and enter this to create the database:

CREATE TABLE ftpd (
User varchar(16) NOT NULL default '',
status enum('0','1') NOT NULL default '0',
Password varchar(64) NOT NULL default '',
Uid varchar(11) NOT NULL default '-1',
Gid varchar(11) NOT NULL default '-1',
Dir varchar(128) NOT NULL default '',
ULBandwidth smallint(5) NOT NULL default '0',
DLBandwidth smallint(5) NOT NULL default '0',
comment tinytext NOT NULL,
ipaccess varchar(15) NOT NULL default '*',
QuotaSize smallint(5) NOT NULL default '0',
QuotaFiles int(11) NOT NULL default 0,
PRIMARY KEY (User),
UNIQUE KEY User (User)
) ENGINE=MyISAM;

Click insert when done. We have finished creating the database and we can now go back on to our server via putty (or directly if you want to type everything out!).

We are going to be editing the pureftpd database information but we will be creating a copy of it just in case we cockup! We do this by typing in:

cp /etc/pure-ftpd/db/mysql.conf /etc/pure-ftpd/db/mysql.conf_orig

This copies the file and pastes it in the same directory with the name mysql.conf_orig.

Next we need to actually edit the file. we do by typing in:

cat /dev/null > /etc/pure-ftpd/db/mysql.confsudo nano /etc/pure-ftpd/db/mysql.conf

This should then open the file. If it is empty then you will need to write/paste this in:

MYSQLSocket /var/run/mysqld/mysqld.sock
#MYSQLServer localhost
#MYSQLPort 3306
MYSQLUser pureftpd
MYSQLPassword YOURPASSWORDHERE
MYSQLDatabase pureftpd
#MYSQLCrypt md5, cleartext, crypt() or password() - md5 is VERY RECOMMENDABLE uppon cleartext
MYSQLCrypt md5
MYSQLGetPW SELECT Password FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetUID SELECT Uid FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetGID SELECT Gid FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetDir SELECT Dir FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetBandwidthUL SELECT ULBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetQTASZ SELECT QuotaSize FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetQTAFS SELECT QuotaFiles FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")

Make sure to change YOURPASSWORDHERE to your chosen password.

Once done, press Ctrl + O to save and Ctrl + X to exit.

We now need to create a few files for the config. Type in the following to do so:

echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone

This will make PureFTPd chroot every virtual user in his home directory so he will not be able to browse directories and files outside his home directory.

Also create the file /etc/pure-ftpd/conf/CreateHomeDir which again simply contains the string yes:

echo "yes" > /etc/pure-ftpd/conf/CreateHomeDir

We now need to resart pureftp to get everything working. We can do so by typing this in:

sudo /etc/init.d/pure-ftpd-mysql restart

By using phpMyadmin, we create the user Test1 with the status 1 (which means his ftp account is active), the password of password (which will be stored encrypted using MySQL’s MD5 function), the UID and GID 2001 (use the userid and groupid of the user/group you created in the first bit), the home directory of /var/www/test1 (the web directory for test1.com which we created in one of our first tutorials), an upload and download bandwidth of 100 KB/sec. (kilobytes per second), and a quota of 50 MB:

INSERT INTO `ftpd` (`User`, `status`, `Password`, `Uid`, `Gid`, `Dir`, `ULBandwidth`, `DLBandwidth`, `comment`, `ipaccess`, `QuotaSize`, `QuotaFiles`) VALUES ('Test1', '1', MD5('password'), '2001', '2001', '/var/www/test1', '100', '100', '', '*', '50', '0');

6.jpg

If you then try and connect with an ftp client such as FileZilla and connect using the information above, you should then be able to connect.

7.jpg

You could also transfer a file and then check on the server and see if it is there after is has uploaded using this command:

ls /var/www/test1

Adding users:

To add users, you could create a php file which you have created yourself (May show you how to do this later!) or by using PHPMyAdmin. you can do this by opening it up and going in to the database and clicking the insert tab at the top.

8.jpg

Whenever you want to create a new user, you have to create an entry in the table ftpd so I will explain the columns of this table here:

a. User: The name of the virtual PureFTPd user (e.g. exampleuser).
b. status: 0 or 1. 0 means the account is disabled, the user cannot login.
c. Password: The password of the virtual user. Make sure you use MySQL’s MD5 function to save the password encrypted as an MD5 string:

9.jpg

d. UID: The userid of the ftp user you created at the end of step two (e.g. 2001).
e. GID: The groupid of the ftp group you created at the end of step two (e.g. 2001).
f. Dir: The home directory of the virtual PureFTPd user (e.g. /var/www/test1). If it does not exist, it will be created when the new user logs in the first time via FTP. The virtual user will be jailed into this home directory, i.e., he cannot access other directories outside his home directory.
g. ULBandwidth: Upload bandwidth of the virtual user in KB/sec. (kilobytes per second). 0 means unlimited.
h. DLBandwidth: Download bandwidth of the virtual user in KB/sec. (kilobytes per second). 0 means unlimited.
i. comment: You can enter any comment here (e.g. for your internal administration) here. Normally you leave this field empty.
j. ipaccess: Enter IP addresses here that are allowed to connect to this FTP account. * means any IP address is allowed to connect.
k. QuotaSize: Storage space in MB (not KB, as in ULBandwidth and DLBandwidth!) the virtual user is allowed to use on the FTP server. 0 means unlimited.
l. QuotaFiles: amount of files the virtual user is allowed to save on the FTP server. 0 means unlimited.

 

All credit for this guide goes to :http://ubuntu-for-hu...d-mysql-on.html


  • Rolandcalm likes this


#110 Future Tutorial Ideas

Posted by Wilson18 on 26 February 2015 - 11:43 PM

Hello Everyone. If you have any ideas for tutorials, please post them below :)

 

Here are some ideas I have. Some of these will be included in a new tutorial series aimed at people who may not have a great technical knowledge and would just like to go over the basics #backtobasics

 

 

Office tips and tricks

  • Managing comments in Word
  • Using photos e.g. positioning, cropping etc

Mac

Windows 

  • Snipping tool - A great way to print screen
  • Symlinks
  • Setup software raid
  • Change DNS

Ubuntu

  • Running office 2013 (In a Virtual Machine)
  • Running previous versions of office in wine

CentOS

  • Postfix to work with Google Apps
  • Media Server
  • Domain controller

Java

  • Creating nodes and a graph
  • Implementing Graph Search algorithms such as Depth First Search, Breadth First Search and A* search
  • NXT code e.g using sensors, differential pilots etc

Other

  • Recycling an old IPhone as an offline media player
  • Increasing productivity with multiple displays
  • Usage stats with WhatPulse
  • Creating your own cloud storage across multiple low power VMs/vps'
  • Raspberry Pi + Receipt Printer 
  • SSL certificate installation
  •  

  • Rolandcalm likes this