admin

Introduction
In this article I describe how to install WordPress (WP) on a general purpose webserver.

Before you begin
The assumption is that you start with a perfect FAMP server as described here.

Procedure
1. Update the ports

# portsnap fetch
# portsnap update

2. Start mysql session

# mysql -uroot -p

Type the password and a MySQL session is started.
Do not end this session, continue with the following commands.

2a. Create WP database

create database mysite;

The name of the database is now mysite, you can change this if you prefer another name.

2b. Create WP database user

create user mysiteusr@localhost identified by ‘secretxyz’;

The name of the user is mysiteusr, you can change this if you would prefer.
You should change the password ‘secretxyz’ in a secret one.

2c. Grant permissions to WP database user

grant all on wpuser.* to mysiteusr@localhost;

2d. Finish the MySQL session

exit;

3. Install WP tarball

# mkdir -p /home/www
# cd /home/www
# fetch http://wordpress.org/latest.tar.gz
# tar zxvf latest.tar.gz
# mv wordpress mysite.com

You should change “mysite.com” with the name you prefer.

4. Fix permissions

# cd /home
# chmod -R www:www  www

5. Edit httpd.conf – enable configuration virtual hosts

# vi /usr/local/etc/apache22/httpd.conf

Search the line with

#Include etc/apache22/extra/httpd-vhosts.conf

and remove the #, so it reads

Include etc/apache22/extra/httpd-vhosts.conf

6. Edit http-vhosts.conf

# cd /usr/local/etc/apache22/extra
# vi httpd-vhosts.conf

Remove the VirtualHost examples (from the first <VirtualHost …> to the last </VirtualHost>.

Type the following lines:

<VirtualHost *:80>
ServerName www.mysite.com
ServerAlias mysite.com
DocumentRoot /home/www/mysite.com
<Directory /home/www/mysite.com>
Optios Indexes FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
AddHandler cgi-script .pl .cgi
AddHandler application/x-httpd-php .php .phtml
</Directory>
</VirtualHost>

6. Restart apache

# /usr/local/etc/rc.d/apache22 restart

7. Make sure www.mymysite.com points to IP of your webserver

There are to ways to finish the installation: the proper way, that makes the website visable to the world. And a non-proper way, to finish the installation quick and dirty.

7a. Proper way: create a DNS A record

Create a A-record for the hostname “www” of your domain “mysite.com” with the value of the IP of your webserver, for instance 46.4.213.133. Please contact the documentation of your DNS-provider for further information. Please note there is a TTL (time to live – delay) and upto an additional 24 hours to take worldwide effect.

7b. Non-proper way: trick with hostfile on your client system

A trick to be able to complete the WP installation and configuration is to add the following line to your hostfile (/etc/hosts for Linux or BSD-like systems):

46.4.213.133            www.mysite.com      mysite.com

You shoud replace 46.4.213.133 with the IP of your webserver and mysite.com with your domainname.

Now you have mapped your domainname to the IP of your webserver, either a proper DNS record or the host-file trick, you are able to finisch the configuration.

Please note that your website is only visible from your client now.

7. Complete your WP installation

Start your favorite browser on your client and visit your domain

http://www.mysite.com

8. Follow the instructions of WP and you’re ready

9. Check if WP works

Visit your website again from your client

http://www.mysite.com

Now you should see a beautiful wordpress home page.

Congratulations!!!

If you didn’t create A DNS A-record your website won’t be visible to the world. Don’t forget to finish this last step as soon as possible. If you did the trick with the hostfile, please delete the line once the DNS record is created. It can cause a lot of confusion later.

Secure Shell or SSH is a protocal that allows logging into a remote machine and executing commands on a remote machine. It uses encryption to provide confidentiality and integrity of data over an unsecured network, such as the Internet.

The ssh program alows you to connect and logs into the specified hostname (with optional username). You must prove Your identity to the remote machine.

Shell Access from Linux / Unix clients
SSH is standard available on most Linux and Unix based systems.

You can start the shell client with the following command:

ssh root@87.253.140.80

You should replace 87.253.140.80 with the IP of your VPS. The ssh client will ask for your credentials for authentication.

In the following screenshot you see an example.

Accessing your VPS with SSH

Shell Access from Windows clients
PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. It is open source software that is available with source code and is developed and supported by a group of volunteers.

PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers.

You can download PuTTY here.

When you start PuTTY the following screen occurs:

Putty start screen

In the field Host Name (or IP address) you need to type the IP of your VPS. After login in the following screen occurs:

Shell screen of PuTTY

We assume that you have installed VNC server on your remote server Please take a look at the corresponding posting for an instruction how to do this.

GUI Access from Linux / Unix client
You can use the program Vncviewer to view and fully interact with your remote server (the “VNC server”). This program is available on most Linux and Unix computers.

For CentOS you can download and install this program with the following command:

yum install vnc

For Ubuntu you can do this with:

apt-get install xvnc4viewer

You can securaly access your remote server with encryption (ssh tunneling) with the following command:

vncviewer -via root@1.1.1.1 localhost:0

You need to replace 1.1.1.1 with the IP of your remote server. The number 0 determines the resolution that will be used. In this case this is 1024×768 with a color-depth of 16.

In the following screenshots you see an example of GUI access to a VPS server running CentOS.

Logging in to your server

GUI Access from Windows clients
For windows client you can use VNC® Viewer Free Edition 4.1 for Windows (or newer). This tools allows you connect to your with a remote VNC server, but for this windows version there is no out of the box support for secure tunneling via SSH. But don’t worry, you can configure Putty to provide this functionality. The following steps explain how to do this.

Preparation

1. Install Putty if not already available (see Shell Access from Windows clients).

2. Enter session information for SSH

Start PuTTY and enter IP

You should replace the number 87.253.140.80 with the IP of your VPS.

3 Select SSH –> Tunnel and enter tunnel information

In the following screenshot we define a tunnel from localhost:5900 to port 5900 of the remote VPS.

Entering tunnel information

4. Press the button Add and the tunnel is in place. Now you are able to connect to your VPS.

5. Press the button Open to start a session.

6. Enter your credentials.

7. Now you are able to connect to your VPS with vncviewer:

Connect to your VPS with vncviewer

Introduction
This article describes how to setup Apache, MySQL and PHP and on a server running FreeBSD. This version is based on FreeBSD 7.3. It is likely to work on newer version without too much difficulty.

Before you begin

1. Standard installation of FreeBSD
This articles assumes you have a working install of FreeBSD 7.3 for i386 logged in as root with the ports collection installed. You can use sysinstall, portsnap or similar to install the ports collections. A FreeBSD VPS usually will have a pre-installed ports collections.

2. Update /usr/ports

# portsnap fetch
# portsnap update

Procedure

1. Installing MySQL

a. Build MySQL from the ports

# cd /usr/ports/databases/mysql51-server
# make install clean -DBATCH

This may take a while. Please relax and enjoy life!

b. Edit /etc/rc.conf

# vi /etc/rc.conf

Add the following line to /etc/rc.conf:

mysql_enable=”YES”

This line will enable mysql and start mysql on boot.

c. Start MySQL manually

Now we will start mysql manually with the following command:

# /usr/local/etc/rc.d/mysql-server start

d. Set password for MySQL

Set the passwor for MySQL with the followingcommand (substitute your own password for ‘your-password’):

# rehash
# mysqladmin -uroot password ‘your-password’

Step 1 completed with success: MySQL is installed!

2. Installing Apache

a. Build Apache from the ports

# cd /usr/ports/www/apache22
# make install clean -DBATCH

b. Edit /etc/rc.conf

Add the following line:

apache22_enable=”YES”

3. Installing PHP

a. Build PHP from the ports

# cd /usr/ports/lang/php5
# make install clean

Make sure the APACHE option (Build apache module) option is ticked when configuring the build. All other options should not be changed. This take a lot of time, another coffee.

b. Install the php5-extensions

# cd /usr/ports/lang/php5-extensions
# make config

Make sure you enable (1) MySQL database support, (2) MySQLi database support, (3) GD library support and (4) ZLIB support. Leave the other default options untouched!

# make install clean -DBATCH

c. Install the php.ini file

# cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini

You could also take the development version php.ini-development if you prefer.

d. Edit your Apache configuration file httpd.conf

# vi /usr/local/etc/apache22/httpd.conf

Add the following lines to the end of the file, just before the include statement:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Search for the line that reads:

DirectoryIndex index.html

and add index.php so it reads

DirectoryIndex index.php index.html

Enable language settings by searching for the line

#Include etc/apache22/extra/httpd-languages.conf

and removing the # comment mark so it reads:

Include etc/apache22/extra/httpd-languages.conf

e. Edit your Apache configuration file httpd-languages.conf

# vi /usr/local/etc/apache22/extra/httpd-languages.conf

Add the following line to the end of the file:

AddDefaultCharset On

f. Add you hostname to /etc/hosts

# vi /etc/hosts

Add your ‘hostname’ and your ‘hostname’.localdomain this file, so it maps to the IP of your machine.

This leads, for instance, to the addition of the following line:

46.4.213.254    freebsdx_vm14     freebsdx_vm14.localdomain

In the example above the hostname is “freebsdx_vm14″ and the IP is 46.4.213.254.

g. Restart sendmail

Restart sendmail for the changes of the hostfile to take effect

# /etc/rc.d/sendmail restart

h. Start Apache

# /usr/local/etc/rc.d/apache22 start

i. Check your connectivity

Start your favorite browser from a computer connected to the internet and visit the URL:

http://<yourip>

Now you should see: “It works!”.

If there are no errors: you’re done. Apache with PHP is installed!

Congratulations. Your perfect FAMP server is up and running!

In this article I describe how to install a GNOME Desktop environment on CentOS with a VNC server. If you install this on your remote CentOS server you are able to login remotely with a beautiful GUI.

The assumption is that you are already able to access your remote server with SSH.

GNOME Desktop Environment for CentOS


Server installation

In the follow paragraph I will explain howto enable the server to login remotely and howto access your server.

Installation Steps on the CentOS server

1. Install X Windows and GNOME

yum groupinstall “X Window System”
yum groupinstall “GNOME Desktop Environment”

2. Change runlevel: starting GUI at boot

vi /etc/inittab

Change
id:3:initdefault:
to
id:5:initdefault:

3. install xinetd

yum install xinetd

4. install vnc-ltsp-config

The vnc-ltsp-config supports the following resolutions:

Nr Port Color-depth Resolution Protocol
0 5900 16 1024×768 tcp
1 5901 16 800×600 tcp
2 5902l 16 640×480 tcp
3 5903 8 1024×768 tcpl
4 5904 8 800×600 tcp
5 5905 8 640×480 tcp

When a vnc-client connects to one of the configured ports, the user will be given a login screen. The sessions will *not* be persistent. When a user logs out, the session is gone. Once the vnc-client closes, the vnc-ltsp-config session will terminate (by default) and all running processes will be killed.

wget http:\\download.fedora.redhat.com/pub/epel5/ARCH/vnc-ltsp-config-4.0-4.el5.noarch.rpm
rpm -ivh vnc-lstsp-config*.rpm

You should change ARCH with your architecture: i386 or x86_64.

4. adapt gdm configuration

vi /etc/gdm/custom.conf

Add the following lines to the sections:
[xdmcp]
Enable=true

[security]
AllowRemoteRoot=true
DissallowTCP=false

5. enabling and starting services

chkconfig xinetd on
chkconfig vncts on
service xinetd restart
gdm

If the command “gdm” doesn’t work you should try gdm-restart.

Now you should be able to access your remote server via a ssh tunnel.


GUI Access from CentOS

You can use the program Vncviewer to view and fully interact with your remote server (the “VNC server”). This program is available on most Linux and Unix computers.

Download and install with the following command:

yum install vnc

You can securaly access your remote server with encryption (ssh tunneling) with the following command:

vncviewer -via root@1.1.1.1 localhost:0

You need to replace 1.1.1.1 with the IP of your remote server. The number 0 determines the resolution that will be used. In this case this is 1024×768 with a color-depth of 16.

PRESS RELEASE: HOOFDDORP, THE NETHERLANDS Monday, September 20,  2010

Fastup, a Dutch hosting provider for business customers specialized in open source, is proud to anounce three Virtual Private Server Hosting Services based on FreeBSD.

The Hosting Service plans start with the Standard VPS Hosting Plan based on 1 CPU, 512 MB, 50 GB Disk space, massive 250 GB monthly traffic and 24/7 support. This plan offers lots of power and traffic at low costs.

For customers who need more power we offer the Professional VPS Hosting Plan. This plan is based on 2xCPU, 2GB RAM, 250GB Disk space, 1000GB montly traffic and 24/7 support.

For customers who need extreme power we offer the Enterprise VPS Hosting Plan. This plan offers 4xCPU, 4GB RAM, 1000GB Disk space and 4000GB monthly traffic and 24/7 support.

The servers run at a large data center in Amsterdam with a 10 Gbit/s connectivity to AMS-IX  (Amsterdam Internet Exchange). Leading edge technology allows us to deliver the speed, stability and security our customers need to run their business applications.

For more information about these plans or to order, please contact our sales team.

About Fastup

Address
Fastup
Marktlaan 11C
2132 DL  Hoofddorp
The Netherlands

Sales Questions
For pre-sales questions or concerns, please email sales@fastup.org

Further information about fastup can be found at http://www.fastup.org.

© 2013 Fastup Suffusion theme by Sayontan Sinha