OpenLiteSpeed Kurulumu Öncesi

Prerequisites

  • Your server or VPS is running with the CentOS 6.x minimal install.
  • Root Login Details.
  • Your domain DNS A-records (usually @ and www) are updated to point to your server or VPS IP.

Installation Guide

Open up the Putty client. In the hostname or IP address box, enter the IP of your server. Unless specified otherwise by your web host, you will not need to change any other settings. Click open.

[​IMG]

You will be prompted to download the server host key. Click yes.

[​IMG]

Login using the username

Code:
root

and press enter.

[​IMG]

Enter the password you chose on setting up the server, or the one pre-supplied by your host. Please note, the characters for the password will not be displayed as you type.

[​IMG]

Congratulations, you should now be logged into your server!

[​IMG]

Strangely, depending on your web host’s individual setup, you may have some IP Tables rules, which, may either do nothing at all, or, more annoyingly, block all connections (aside from SSH) by default. In order to make sure they won’t cause any issues during this guide, we will disable them (don’t worry, later on we will add our own rulesets!).

To do this type the following

Code:
/sbin/service iptables stop

[​IMG]

Which will provide the following output

[​IMG]

Now, we run an update using the CentOS “yum” command to ensure everything is up-to-date.

Code:
yum update

[​IMG]

yum will now check what packages installed on your system need updating and provide a list. It will ask for confirmation to continue and update the system.

Code:
y

[​IMG]

yum will now download and install all the updates to your system. This may take several minutes, however, eventually you will get confirmation it has been successful.

[​IMG]

Next we will install Percona as our MySQL server. Using the RPM command we will add the Percona yum repository to the system.

Code:
rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm

[​IMG]

[​IMG]

Now the repository is installed, we can install Percona itself.

Code:
yum install Percona-Server-client-55 Percona-Server-server-55 Percona-Server-devel-55

[​IMG]

Again, yum will ask to confirm the install

Code:
y

[​IMG]

yum will also ask you to import the GPG-Key

Code:
y

[​IMG]

And should then install

[​IMG]

Now start MySQL.

Code:
/etc/init.d/mysql start

[​IMG]

[​IMG]

Secure your MySQL install by running

Code:
/usr/bin/mysql_secure_installation

[​IMG]

Press “Enter” when asked for the MySQL root password and follow the on-screen prompts. Make sure your root MySQL password is a nice and strong one.

[​IMG]

[​IMG]

[​IMG]

[​IMG]

[​IMG]

[​IMG]

Now restart MySQL.

Code:
/etc/init.d/mysql restart

[​IMG]

[​IMG]

Now it’s time to load OpenLiteSpeed, however, before doing that we need to ensure the right packages are installed. First, we will add the EPEL repo.

Code:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

[​IMG]

[​IMG]

Differently to the Percona repo, we must manually retreive the GPG key.

Code:
wget http://fedoraproject.org/static/0608B895.txt

[​IMG]

[​IMG]

And move it to the right spot.

Code:
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[​IMG]

When asked to confirm press

Code:
y

[​IMG]

And finally install it

Code:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[​IMG]

Next, install the tools and RPM’s we need to install OpenLiteSpeed. As per the previous steps, when asked by yum to confirm installs, just press “y”

Code:
yum groupinstall 'Development tools'

[​IMG]

[​IMG]

[​IMG]

Now install the required packages.

Code:
yum install bzip2-devel curl-devel pcre-devel expat-devel libc-client-devel libxml2-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel mhash-devel gd-devel openssl-devel zlib-devel GeoIP-devel

[​IMG]

[​IMG]

[​IMG]

In order to enable SPDY in OpenLiteSpeed we require OpenSSL 1.0.1 or higher, unfortunately this doesn’t come with any base yum repos, so lets install the IUS repo to do that.

Code:
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm

[​IMG]

Next install the Yum-Replace tool.

Code:
yum install yum-plugin-replace

[​IMG]

Now replace and upgrade the OpenSSL version. A warning will be shown, this is normal, press Y to confirm, and the Y to install.

Code:
yum replace openssl --replace-with-openssl10

[​IMG]

[​IMG]

[​IMG]

Now install the OpenLiteSpeed repo.

Code:
rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm

[​IMG]

Install OpenLiteSpeed

Code:
yum install openlitespeed

[​IMG]

Once done, start OpenLiteSpeed with the command

Code:
/usr/local/lsws/bin/lswsctrl start

[​IMG]

Finally, a little bit of cleanup.

Code:
yum clean all

[​IMG]

Congratulations! LiteSpeed Web Server is now running and you have finished part one of this guide. You may now move on to part 2!

TLDR Version
For those who don’t need the visual references and are comfortable with CentOS CLI, here are the commands run with no pictures.

Code:
/sbin/service iptables stop
yum update
rpm -Uhv http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
yum install Percona-Server-client-55 Percona-Server-server-55 Percona-Server-devel-55
/etc/init.d/mysql start
/usr/bin/mysql_secure_installation
/etc/init.d/mysql restart
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://fedoraproject.org/static/0608B895.txt
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
yum groupinstall 'Development tools'
yum install bzip2-devel curl-devel pcre-devel expat-devel libc-client-devel libxml2-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel mhash-devel gd-devel openssl-devel zlib-devel GeoIP-devel
rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm
yum install openlitespeed
/usr/local/lsws/bin/lswsctrl start
yum clean all
Last edited: Dec 24, 2013

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>