- 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.
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.
You will be prompted to download the server host key. Click yes.
Login using the usernameCode:root
and press enter.
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.
Congratulations, you should now be logged into your server!
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 followingCode:/sbin/service iptables stop
Which will provide the following output
Now, we run an update using the CentOS “yum” command to ensure everything is up-to-date.Code:yum update
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
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.
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
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
Again, yum will ask to confirm the installCode:y
yum will also ask you to import the GPG-KeyCode:y
And should then install
Now start MySQL.Code:/etc/init.d/mysql start
Secure your MySQL install by runningCode:/usr/bin/mysql_secure_installation
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.
Now restart MySQL.Code:/etc/init.d/mysql restart
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
Differently to the Percona repo, we must manually retreive the GPG key.Code:wget http://fedoraproject.org/static/0608B895.txt
And move it to the right spot.Code:mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
When asked to confirm pressCode:y
And finally install itCode:rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
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'
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
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
Next install the Yum-Replace tool.Code:yum install yum-plugin-replace
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
Now install the OpenLiteSpeed repo.Code:rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm
Install OpenLiteSpeedCode:yum install openlitespeed
Once done, start OpenLiteSpeed with the commandCode:/usr/local/lsws/bin/lswsctrl start
Finally, a little bit of cleanup.Code:yum clean all
Congratulations! LiteSpeed Web Server is now running and you have finished part one of this guide. You may now move on to part 2!
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