BCLinux开源软件镜像手册-LAMP运行环境


  • BCLinux Developers

    BCLinux开源软件镜像手册-LAMP运行环境

    产品描述

    本镜像提供的LAMP集成包是全球最经典的PHP运行环境,帮助您在Linux服务器下快速的安装部署PHP应用程序,省去繁琐的配置工作,事半功倍。 LAMP Stack(Linux-Apache-MySQL-PHP)集成包是全球最流行的Web运行环境之一,基于免费、开源软件构建。框架中包括:Linux操作系统,Apache Web服务器软件,MySQL数据库,PHP编程语言等四种核心组件以及其他相关辅助组件。通过组合、优化和兼容性处理,将所有组件打包成一个高性能、高集成性的Web运行环境解决方案包,保证能够兼容运行绝大部分PHP应用程序。

    环境说明

    • 操作系统:BigCloud Enterprise Linux 7
    • 软件列表:
      • httpd-2.4.6
      • mariadb-5.5.50
      • php-5.4.16
      • redis-3.2.1
      • memcached-1.4.15
      • phpMyAdmin-4.4.15
      • pure-ftpd-1.0.42

    软件配置

    • Apache配置文件路径:/etc/httpd
    • Apache网站主目录:/var/www/html
    • Apache主配置文件:/etc/httpd/conf/httpd.conf
    • Mariadb主配置文件:/etc/my.cnf
    • PHP主配置文件:/etc/php.ini
    • Memcached主配置文件:/etc/sysconfig/memcached
    • PHP Memcached扩展配置:/etc/php.d/memcache.ini
    • Redis主配置文件:/etc/redis.conf
    • PHP Redis扩展配置:/etc/php.d/redis.ini
    • Pure-FTPd主配置文件:/etc/pure-ftpd/pure-ftpd.conf

    使用说明

    [root@demo-bclinux-7 ~]# ftp localhost
    Trying ::1...
    Connected to localhost (::1).
    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    220-You are user number 1 of 50 allowed.
    220-Local time is now 17:38. Server port: 21.
    220 You will be disconnected after 15 minutes of inactivity.
    Name (localhost:root): apache
    331 User apache OK. Password required
    Password:
    230 OK. Current directory is /
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    229 Extended Passive mode OK (|||5238|)
    150 Accepted data connection
    drwxr-xr-x    2 0          0                4096 Jun 10  2014 .
    drwxr-xr-x    2 0          0                4096 Jun 10  2014 ..
    -rw-r--r--    1 48         apache             24 Dec 12 17:58 index.php
    226-Options: -a -l
    226 3 matches total
    
    • 默认数据库账号密码:root/bclinux,默认存放目录:/var/lib/mysql
    [root@demo-bclinux-7 ~]# mysql -u root -p
    Enter password:
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 25
    Server version: 5.5.50-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]>
    
    • 调整Memcached最低内存大小:
    [root@demo-bclinux-7 ~]# vim /etc/sysconfig/memcached
    ...
    CACHESIZE="64" => 单位M,默认64M,可调整
    ...
    [root@demo-bclinux-7 ~]# systemctl restart memcached
    
    • 调整Redis最大内存大小:
    [root@demo-bclinux-7 ~]# vim /etc/redis.conf
    ...
    # maxmemory <bytes> => 取消#注释,单位字节,可调整
    ...
    [root@demo-bclinux-7 ~]# systemctl restart redis
    
    • 创建FTP账户:
    [root@demo-bclinux-7 ~]# mkdir -p /data/www
    [root@demo-bclinux-7 ~]# chown ftpuser:ftpgroup /data/www
    [root@demo-bclinux-7 ~]# groupadd ftpgroup
    [root@demo-bclinux-7 ~]# useradd ftpuser -g ftpgroup -d /dev/null -s /sbin/nologin
    [root@demo-bclinux-7 ~]# pure-pw useradd fuser1 -u ftpuser -g ftpgroup -d /data、www
    [root@demo-bclinux-7 ~]# pure-pw mkdb
    [root@demo-bclinux-7 ~]# systemctl restart pure-ftpd
    

    服务管理

    • Apache HTTP Server:
    systemctl { enable | start | status | restart | reload } httpd
    
    • Mariadb:
    systemctl { enable | start | status | restart } mariadb
    
    • Redis:
    systemctl { enable | start | status | restart } redis
    
    • Memcached:
    systemctl { enable | start | status | restart } memcached
    
    • Pure-FTPD:
    systemctl { enable | start | status | restart } pure-ftpd
    

登录后回复
 

与 BC-LINUX 的连接断开,我们正在尝试重连,请耐心等待