centos7 下安装 moodle历史命令(未能包含vim 修改配置文件)

发布时间 2023-12-21 10:20:23作者: 一贴灵
    1  init 0
    2  cd "/data/webapps/moodle"
    3  cd /data/webapps/
    4  ls
    5  ll
    6  cd moodle/
    7  ls
    8  ll
    9  vim lib/outputrenderers.php
   10  ll
   11  cd ../
   12  ll
   13  chmod -R 0777 ./moodle/
   14  ll
   15  touch phpinfo.php
   16  vim phpinfo.php 
   17  cd moodle/
   18  ls
   19  ll
   20  vim version.php 
   21  ll
   22  cd ../
   23  ll
   24  rz -by
   25  ll
   26  unzip moodle-4.0.12.zip 
   27  clear
   28  ll
   29  mv moodle moodle_bak
   30  ll
   31  unzip moodle-4.0.12.zip 
   32  ll
   33  ps aux |grep mysql
   34  mysql -hlocalhost -uroot -p
   35  exit
   36  ps aux |grep nginx
   37  free -m
   38  yum list |grep php
   39  yum list |grep php70
   40  yum list |grep php80
   41  yum list |grep php-fpm
   42  cd ~
   43  ls
   44  ll
   45  wget https://www.php.net/distributions/php-7.3.33.tar.gz
   46  tar -zxvf php-7.3.33.tar.gz 
   47  yum -y install libxml2-devel libcurl-devel libpng-devel freetype-devel
   48  wget https://libzip.org/download/libzip-1.3.2.tar.gz
   49  wget https://libzip.org/download/libzip-1.3.2.tar.gz\
   50  wget https://libzip.org/download/libzip-1.3.2.tar.gz
   51  wget https://libzip.org/download/libzip-1.3.2.tar.gz --no-check-certificate
   52  wget --no-check-certificate https://libzip.org/download/libzip-1.3.2.tar.gz
   53  ll
   54  rz -by
   55  rx "libzip-1.3.2.tar.gz"
   56  rz -E
   57  **0yum list |grep rz
   58  yum list |grep rz
   59  yum -y install lrzsz
   60  rz -by
   61  ll
   62  tar -zxvf libzip-1.3.2.tar.gz 
   63  ll
   64  cd libzip-1.3.2/
   65  ll
   66  ./configure 
   67  make && make install
   68  cd ../
   69  ll
   70  cd php-73
   71  cd php-7.3.33/
   72  ls
   73  ll
   74  ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --enable-mysqlnd --with-pdo-mysql --with-pdo-mysql=mysqlnd --with-mysqli --enable-mbstring --enable-sockets --enable-zip --with-zlib --with-curl --with-openssl --with-gd --with-freetype-dir=/usr/local/freetype --with-mhash --disable-fileinfo
   75  make && make install
   76  cp php.ini-development /data/apps/php7/etc/php.ini
   77  ll
   78  cp php.ini-production /usr/local/php7/etc/php.ini
   79  ll
   80  cd /usr/local/php7/
   81  ls
   82  ll
   83  cd sbin/
   84  ls
   85  ll
   86  php-fpm &
   87  ps aux |grep php
   88  cd ../
   89  ll
   90  cd etc/
   91  ls
   92  ll
   93  mv php-fpm.conf.default php-fpm.conf
   94  ll
   95  /usr/local/php7/sbin/php-fpm &
   96  cd /usr/local/php7/etc/php-fpm.d/
   97  ll
   98  mv www.conf.default www.conf
   99  ll
  100  /usr/local/php7/sbin/php-fpm &
  101  ps aux |grep php
  102  cd ~
  103  ls
  104  ll
  105  wget https://nginx.org/download/nginx-1.18.0.tar.gz
  106  ll
  107  tar -zxvf nginx-1.18.0.tar.gz 
  108  ll
  109  cd nginx-1.18.0/
  110  ls
  111  ll
  112  yum -y install pcre-devel openssl-devel
  113  ./configure --prefix=/usr/local/nginx --with-http_ssl_module
  114  make && make install
  115  /usr/local/nginx/sbin/nginx &
  116  ps aux 
  117  ps aux |grep nginx
  118  cd ../
  119  ls
  120  ll
  121  wget https://download.moodle.org/download.php/stable403/moodle-latest-403.tgz
  122  rz -by
  123  ll
  124  unzip moodle-latest-403.zip 
  125  ll
  126  cd moodle/
  127  ls
  128  ll
  129  cd ../
  130  ll
  131  vim /usr/local/php7/etc/php.ini 
  132  vim /usr/local/nginx/conf/nginx.conf
  133  mkdir /data
  134  mkdir /data/webapps
  135  cd /data/webapps/
  136  ls
  137  cd ~
  138  ls
  139  cd moodle/
  140  ls
  141  cd ../
  142  ll
  143  mv moodle /data/webapps/
  144  cd /data/webapps/
  145  ll
  146  vim /usr/local/nginx/conf/nginx.conf
  147  ps aux |grep nginx
  148  kill 10651
  149  ps aux |grep nginx
  150  /usr/local/nginx/sbin/nginx &
  151  cd moodle/
  152  ls
  153  ll
  154  cp config-dist.php config.php
  155  ll
  156  vim config.php 
  157  /usr/local/php7/bin/php /data/webapps/moodle/admin/cli/install.php
  158  vim /data/webapps/moodle/admin/cli/install.php
  159  ll
  160  vim config.php 
  161  ll
  162  vim config.php 
  163  pwd
  164  cd ../
  165  ll
  166  chmod 777 -R moodle
  167  ll
  168  touch mysqli_connect.php
  169  vim mysqli_connect.php 
  170  /usr/local/php7/bin/php ./mysqli_connect.php 
  171  vim mysqli_connect.php 
  172  /usr/local/php7/bin/php ./mysqli_connect.php 
  173  cd ~
  174  ls
  175  ll
  176  cd php-7.3.33/
  177  ls
  178  ll
  179  cd ext/
  180  ls
  181  ll
  182  cd int
  183  cd intl/
  184  ls
  185  ll
  186  cd ../fileinfo/
  187  cd ../
  188  ll
  189  cd ../
  190  ll
  191  history |grep configure
  192  ps aux |grep php
  193  kill 8018
  194  pwd
  195  make clean
  196  ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --enable-mysqlnd --with-pdo-mysql --with-pdo-mysql=mysqlnd --with-mysqli --enable-mbstring --enable-sockets --enable-zip --with-zlib --with-curl --with-openssl --with-gd --with-freetype-dir=/usr/local/freetype --with-mhash --with-intl --with-fileinfo --with-xmlrpc --with-soap
  197  ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --enable-mysqlnd --with-pdo-mysql --with-pdo-mysql=mysqlnd --with-mysqli --enable-mbstring --enable-sockets --enable-zip --with-zlib --with-curl --with-openssl --with-gd --with-freetype-dir=/usr/local/freetype --with-mhash --enable-intl --enable-fileinfo --enable-soap
  198   yum install glibc-headers gcc-c++ 
  199  ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --enable-mysqlnd --with-pdo-mysql --with-pdo-mysql=mysqlnd --with-mysqli --enable-mbstring --enable-sockets --enable-zip --with-zlib --with-curl --with-openssl --with-gd --with-freetype-dir=/usr/local/freetype --with-mhash --enable-intl --enable-fileinfo --enable-soap
  200  make && make install
  201  cd /usr/local/etc/
  202  ls
  203  ll
  204  cd /usr/local/php7/etc/
  205  ls
  206  ll
  207  /usr/local/php7/sbin/php-fpm &
  208  ps aux |grep php-fpm
  209  df -h
  210  vim /usr/local/nginx/conf/nginx.conf
  211  /usr/local/nginx/sbin/nginx -s reload
  212  exit
  213  ps aux |grep mysql
  214  ps aux |grep nginx
  215  rpm -qa | grep -i mysql
  216  wget https://dev.mysql.com/get/mysql80-community-release-el7-10.noarch.rpm
  217  rpm -ivh mysql80-community-release-el7-10.noarch.rpm
  218  yum-config-manager --disable mysql80-community
  219  yum-config-manager --enable mysql57-community
  220  yum repolist all | grep mysql
  221  yum -y install mysql-community-server
  222  grep 'temporary password' /var/log/mysqld.log
  223  mysql -uroot -p
  224  systemctl status mysqld.service
  225  systemctl start mysqld.service
  226  ps aux |grep mysql
  227  mysql -uroot -p
  228  grep 'temporary password' /var/log/mysqld.log
  229  mysql -uroot -p
  230  free -m
  231  top
  232  cat /proc/memeinfo
  233  cat /proc/meminfo
  234  free -m
  235  mkidr /data/moodledata
  236  mkdir /data/moodledata
  237  chmod 777 -R /data/moodledata
  238  mysql -uroot -p
  239  exit
  240  ls
  241  history

 

242  history > abc.ini

附:nginx.conf

php.ini

www.conf