Hướng dẫn cài đặt OpenLiteSpeed trên CentOS 6.x | Chia sẽ kiến thức Linux/Unix

728x90 AdSpace

Nổi bật
    Thursday, October 26, 2017

    Hướng dẫn cài đặt OpenLiteSpeed trên CentOS 6.x

    Hướng dẫn cài đặt OpenLiteSpeed trên CentOS 6.x

    Bước 1: Cài đặt gói yum cho OpenLiteSpeed
    # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
    # yum -y install epel-release
    # rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el6.noarch.rpm
    Bước 2: Cài đặt OpenLiteSpeed
    # yum install openlitespeed -y
    Bước 3: Cài đặt PHP cho OpenLiteSpeed
    * Cài đặt PHP 7.1
    #yum -y install lsphp71 lsphp71-mysqlnd lsphp71-process lsphp71-mbstring lsphp71-mcrypt lsphp71-gd lsphp71-opcache lsphp71-bcmath lsphp71-pdo lsphp71-common lsphp71-xml lsphp71-imap lsphp71-json
    * Cài đặt PHP 7.0
    # yum -y install lsphp70  lsphp70-mysqlnd lsphp70-process lsphp70-mbstring lsphp70-mcrypt lsphp70-gd lsphp70-opcache lsphp70-bcmath lsphp70-pdo lsphp70-common lsphp70-xml lsphp70-imap lsphp70-json
    * Cài đặt PHP 5.6
    # yum -y install lsphp56  lsphp56-mysql lsphp56-process lsphp56-mbstring lsphp56-mcrypt lsphp56-gd lsphp56-opcache lsphp56-bcmath lsphp56-pdo lsphp56-common lsphp56-xml lsphp56-imap
    * Cài đặt PHP 5.5
    # yum -y install lsphp55  lsphp55-mysql lsphp55-process lsphp55-mbstring lsphp55-mcrypt lsphp55-gd lsphp55-opcache lsphp55-bcmath lsphp55-pdo lsphp55-common lsphp55-xml lsphp55-imap
    * Cài đặt PHP 5.4
    # yum -y install lsphp54  lsphp54-mysql lsphp54-process lsphp54-mbstring lsphp54-mcrypt lsphp54-gd lsphp54-opcache lsphp54-bcmath lsphp54-pdo lsphp54-common lsphp54-xml lsphp54-imap
    * Cài đặt PHP 5.3
    # yum -y install lsphp53  lsphp53-mysql lsphp53-process lsphp53-mbstring lsphp53-mcrypt lsphp53-gd lsphp53-bcmath lsphp53-pdo lsphp53-common lsphp53-xml lsphp53-imap
    Bước 4: Cài đặt MariaDB/MySQL
    - Cài đặt MySQL
    # yum -y install mysql-server mysql
    # service mysqld start
    # chkconfig mysqld on
    # mysql_secure_installation
    Kiểm tra
    #mysql -u root -p
    Bước 5: Cấu hình OpenLiteSpeed với PHP
    - Cấu hình quản trị OpenLiteSpeed
    # /usr/local/lsws/admin/misc/admpass.sh
    Cho phép OpenLiteSpeed chạy qua firewall port 7080 8080
    # vi /etc/sysconfig/iptables
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 7080 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
    #service iptables restart
    # service lsws start
    # chkconfig lsws on
    Truy cập link:
    https://your_domain:7080 hoặc https://your_ip_server:7080


    - Cấu hình PHP 7.0
    mặc định khi cài xong OpenLiteSpeed sẽ set PHP 5. Chọn Service Configuration -> External Apps. Nhấn Add chọn lsphp70
    Chọn LightSpeed SAPI App
    Chọn Next và thêm vào thông tin như sau:
    12345678910111213141516Name: lsphp70
    Address:    uds://tmp/lshttpd/lsphp.sock
    Max Connections: 35
    Environment: PHP_LSAPI_MAX_REQUESTS=500
                 PHP_LSAPI_CHILDREN=35
    Initial Request Timeout (secs): 60
    Retry Timeout : 0
    Response Buffering: no
    Auto Start: yes
    Command: $SERVER_ROOT/lsphp70/bin/lsphp
    Back Log: 100
    Instances: 1
    Memory Soft Limit (bytes): 2047M
    Memory Hard Limit (bytes):2047M
    Process Soft Limit: 400
    Process Hard Limit: 500

    Tiếp theo chọn tab Script Handler


    Cho phép ứng dụng OpenLiteSpeed chạy qua port 80
    Chọn tab Listeners -> Add
    Tạo port
    Cho phép port 80 qua firewall
    # vi /etc/sysconfig/iptables
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    # service iptables restart
    Khởi động lại OpenLiteSpeed
    Bước 6: Kiểm tra

    Cài đặt phpMyAdmin cho OpenLiteSpeed xem tại: link
    Xem thêm video

    Chúc bạn thành công !
    Hướng dẫn cài đặt OpenLiteSpeed trên CentOS 6.x Reviewed by HAPPY on 9:17 AM Rating: 5 Hướng dẫn cài đặt OpenLiteSpeed trên CentOS 6.x Bước 1 : Cài đặt gói yum cho OpenLiteSpeed # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY...
      Copyright © 2017 - 2027 Chia sẽ kiến thức Linux/Unix All Right Reserved
      Thiết kế bởi HAPPY
      Scroll to Top