Howto check the size of PAGESIZE on Linux

Some recent operating systems have their main memory divided into pages and it allows better utilization of memory.

Kernel swap and allocates memory using pages.

You can view the size of a page in bytes, using this command::
# getconf PAGESIZE

Change VSFTPD port

How to change default vsftpd port (TCP port 21)?

vsftpd (Very Secute FTP Daemon) is used by Fedora, Ubuntu, RHEL and other Linux based distros.

Changing default can be a good ideia for security reasons.

Login to your server as root

Open vsftpd.conf file (by default /etc/vsftp/vsftpd.conf or /etc/vsftpd.conf)
# nano vsftpd.conf

Find line that read as follows
listen_port=21

Then, replace port 21 with new port (example 23)
listen_port=231

Save and Exite. Make sure that no other service is usign that port.

Restart vsftpd
# /etc/init.d/vsftpd restart

Add user on FreeBSD using pw

The pw command allow root to add, modify and remove users and groups.

Example:
Adding an user usign add:
# pw useradd -n usern_you_want -s /bin/csh -m
# passwd user_you_want

The optins '-s' and '-m' (s -> Set shell /bin/csh) (-m -> setup home directory /home/user_you_want)

Delete a user usign pw:
# pw userdel -n user_you_want -r

'r' is used to remove the home directory created and all the content.
Note that -r option remove home directory & its contents.

Use help:
# pw useradd help
# man pw

Change MYSQL root Password

Is very easy to change root password on Linux / BSD / Unix systems on propmpt line (shell) using a few commands.

Log in to your server as root

If you are setting mysql root password first time you can use:

Usign mysqladmin
1st way:
# mysqladmin password “password_you_want“

2nd way:
# mysqladmin -u root password “Npassword_you_want“

3rd way:
# mysqladmin -u root -h localhost password “password_you_want“

Use the same way if you want to change the current password:
# mysqladmin -u root password "password_you_want"

Find DNS Servers on Windows Server

Use: Start -> Run
"cmd"

Then execute on msdos prompt:

C:\>ipconfig /all

Or follow this steps:

1) Click on Start button > Settings > Network connections
2) Double click on Local Area Connection
3) Click on Properties button
4) Select Internet Protocol (TCP/IP)
5) Click on Properties button and Look for Preferred DNS Server:

Find DNS servers on Linux

You can simply use that commands to find your DNS servers on a Linux/Unix/BSD based OS:or usign:

# nano /etc/resolv.conf
or using:
# less /etc/resolv.conf

Upgrade 32 to 64-bit Fedora without a system reinstall

If you want to upgrade a machine running Fedora from 32.bit to 64-bit first read this article:

Upgrade from 32-bit to 64-bit Fedora Linux without a system reinstall

"One great thing about Linux is that you can transplant a hard disk from a machine that runs a 32-bit AMD XP processor into a new 64-bit Intel Core 2 machine, and the Linux installation will continue to work. However, if you do this, you'll be running a 32-bit kernel, a C library, and a complete system install on a processor that could happily run 64-bit code. You'll waste even more resources if your new machine has 4GB or more of system memory, and you'll be forced to either not use some of it or run a 32-bit Physical Address Extension (PAE) kernel. Cross-grading to the 64-bit variant of your Linux distribution can help you use your resources more wisely."