1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained Compile/Install OpenLiteSpeed on Debian

Base instructions on compiling and installing OpenLiteSpeed on Debian

  1. Tracy Perry

    Tracy Perry Well-Known Member

    Tracy Perry submitted a new resource:

    Compile/Install OpenLiteSpeed on Debian - Base instructions on compiling and installing OpenLiteSpeed on Debian

    Read more about this resource...
     
  2. Tracy Perry

    Tracy Perry Well-Known Member

    Tracy Perry updated Compile/Install OpenLiteSpeed on Debian with a new update entry:

    Compiling on Debian & (now) Ubuntu 14.04

    Read the rest of this update entry...
     
  3. Adam Howard

    Adam Howard Well-Known Member

    You've skipped a few steps, eh? :p

    /usr/local/lsws/lsphp5/bin/pecl install imagick
    -bash: /usr/local/lsws/lsphp5/bin/pecl: No such file or directory
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    Not really... if you follow the instructions outlined before for Debian it should work. The basic change is the makefile option.
    AND, it would be assumed by most folks you would compile a custom PHP since the default is sorely missing options.
    Of course, it also assumes that have installed the necessary libraries. :D

    EDIT:
    And you didn't see the
    I just added? :ROFLMAO:
     
  5. Adam Howard

    Adam Howard Well-Known Member

    Blah !

    I dislike compiling php from source.

    apt-get install php ... Done :p
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    But OpenLiteSpeed doesn't use PHP that way. It compiles it's own php handler (lsphp5). OLS pulls the source in for you, uses the options you give it and you compile. Some ways I like it better.
     
    Adam Howard likes this.
  7. Adam Howard

    Adam Howard Well-Known Member

    PHP:
    '--with-mysql' '--with-mysqli' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-mbstring' '--with-iconv' '--with-libdir=lib64' '--with-litespeed' '--with-curl' '--enable-zip' '--with-bz2' '--with-jpeg-dir=lib64' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-exif' '--with-openssl' '--with-xmlrpc' '--with-freetype-dir=lib64' '--with-png-dir=lib64' '--enable-inline-optimization' '--enable-xml' '--with-opcache' '- '--with-mcrypt=mcrypt'
    Well your code is missing just a few tad bits that I would have included

    php5-fpm
    php5-intl
    php-pear
    php5-imagick
    php5-imap
    php5-mcrypt
    php5-ming
    php5-ps
    php5-pspell
    php5-recode
    php5-snmp
    php5-sqlite
    php5-tidy
    php5-xsl

    I hate source.... Trying to figure out the correct code to include these.
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    FPM is not needed - that's lsphp5 ....
    imagemagick is done via the PECL command outlined
    imap (for me) is not needed as none of my sites utilize any php that connects via/to imap to read mail
    mcrypt I thought was in there.... and it is, at the end '--with-mcrypt=mcrypt
    pspell is as simple as adding the library for it and adding '--with-pspell' to the compile area
    xsl is (again) as simple as '--with-xsl' to the compile area.

    and do you actually use most of those modules? Most people don't but they are shoved on you via a standard install of PHP.

    Those that are detailed are the common for use with XenForo that are needed. All the rest are NOT needed for standard use.
    Screen Shot 2014-05-01 at 6.12.11 PM.png
     
    Last edited: May 2, 2014
  9. Tracy Perry

    Tracy Perry Well-Known Member

    Adam Howard likes this.
  10. Tracy Perry

    Tracy Perry Well-Known Member

    OpenLiteSpeed 1.3.1 resolved the special requirement it had for compilation on Ubuntu so there is no longer a need to modify the makefile.
     
    Adam Howard likes this.
  11. Adam Howard

    Adam Howard Well-Known Member

    My issue with Open Lite Speed was that it would not play nicely with my rewrite rules (ignoring my htaccess files) and not applying the ones I added into Open Lite Speed's control panel. Of course that was v1.2.9

    Maybe one day I'll revisit it, but for now I'll stick with my Apache / nginx combination
     
  12. Tracy Perry

    Tracy Perry Well-Known Member

    OLS does not use the htaccess directly. Only LiteSpeed can read the .htaccess files in each directory. If you have to have that ability then you have to go with either the free one (with the connection limits) or pay for a license for the appropriate type of LS needed.
    One thing that gets a LOT of people when they are first setting it up (and it got me also) on the rewrites is forgetting to check the option to enable the rewrites.
    Screen Shot 2014-05-07 at 6.59.24 PM.png
     
    SneakyDave likes this.
  13. Adam Howard

    Adam Howard Well-Known Member

    Nope, you'd be wrong if you think I forgot to check that box. I did indeed turn it on, but friendly urls would not function regardless.
     
  14. Tracy Perry

    Tracy Perry Well-Known Member

    They do... just hit any of my sites and you will see that they do. ;)

    Code:
    RewriteCond %{REQUEST_FILENAME} -f [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml) - [NC,L]
            RewriteRule (robots\.txt)$ robots.php [NC,L]
            RewriteRule ^.*$ index.php [NC,L]
    works just fine on all my XenForo sites (and includes the rewrite for the Sitemap add-on),
    Code:
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    works fine on my WordPress blogs. :D
     
    SneakyDave likes this.
  15. Adam Howard

    Adam Howard Well-Known Member

    No idea to the cause then .... Bad install then maybe... If you recall we both had one hell of a time trying to get things to work under that user account (didn't matter if it was nogroup or lsws or www).

    In the end I ran out of time. Needed the new server up and running by midnight tonight... Was not going to be paying for more than one hosting provider.
     
  16. SneakyDave

    SneakyDave Well-Known Member

    Didn't you have the same issue with nginx rewrites? They worked for everybody but you?
     
  17. Adam Howard

    Adam Howard Well-Known Member

    No, nginx works fine.

    Just found that the configuration (not the rewrites) needed to be tweaked with each new update. It reminded me of IP.Board, every version update broke something....

    Of course from what I gather nginx has changed and nginx is a lot more stable (or compatible) and new versions do not necessarily imply having to reconfigure.
     
  18. RoldanLT

    RoldanLT Well-Known Member

    @Tracy Perry Are you using PHP 5.6.4 and ZendOpcache?
    I can't compile PHP 5.6.4 with ZendOpcache using the web based console.
     
  19. Tracy Perry

    Tracy Perry Well-Known Member

    Ayep.. this is with OLS 1.4.3
    Screen Shot 2015-01-19 at 5.37.20 PM.png Screen Shot 2015-01-19 at 5.30.53 PM.png

    Just don't choose the Zend OpCache option in the compile options. It compiles it automatically during a normal compile of PHP (in fact, I think you have to specifically tell it NOT to). I do add an
    Code:
     --with-opcache
    in the compile options though.
    Then to enable it, in your /usr/local/lsws/php/php.ini place (this is for 1.4.3 - the no-debug-non-zts-20131226 is different in 1.3.6). You need to make sure that you do a symlink of the /usr/local/lsws/php/php.ini to /usr/local/lsws/lsphp5/lib/php.ini

    Code:
    zend_extension=/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20131226/opcache.so
    opcache.enable=1
    opcache.memory_consumption=1024
    opcache.interned_strings_buffer=8
    opcache.max_wasted_percentage=5
    opcache.max_accelerated_files=8000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    opcache.enable_cli=0
    opcache.save_comments=1
    opcache.enable_file_override=1
    opcache.validate_timestamps=1
     
    RoldanLT likes this.
  20. RoldanLT

    RoldanLT Well-Known Member

    With your Configure Parameters I got this error on compilation:
    Code:
    checking for FreeType 2... lib64
    checking for T1lib support... no
    checking whether to enable truetype string function in GD... yes
    checking whether to enable JIS-mapped Japanese font support in GD... no
    If configure fails try --with-vpx-dir=<DIR>
    configure: error: jpeglib.h not found.
    **ERROR** Could not configure PHP build
    This is on CentOS 6 by the way.
     

Share This Page