This is an old revision of the document!
2019年3月,闻新宇在aliyun上购买了一个为期3年的云主机,然后购买并绑定在了pkumet.live域名上。出于安全和稳定的考虑,这台云主机运行CentOS7。主机硬件参数如下:
The clean OS occupies 1.8G at the very beginning!!! yum update yum upgrade yum install gcc (already installed, actually do nothing) yum install gcc-c++ gcc-gfortran yum install ImageMagick yum install lftp yum install mc tree htop yum install bzip2 (for install anaconda.sh) yum install w3m yum install httpd vi /etc/httpd/conf/httpd.conf ---> LISTEN 8000 vi /etc/httpd/conf.d/userdir.conf ---> comment out "UserDir disabled"; uncomment "UserDir public_html" systemctl status httpd.service systemctl start httpd.service systemctl enable httpd.service systemctl restart httpd.service yum install netcdf nco ncl ncview grads wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh then install Anaconda3-5.3.1-Linux-x86_64.sh at /opt/anaconda3-3.5.1 Before: Filesystem Size Used Avail Use% Mounted on /dev/vda1 40G 2.8G 35G 8% / After: Filesystem Size Used Avail Use% Mounted on /dev/vda1 40G 6.0G 32G 16% / move 'conda init' code from /root/.bashrc to /etc/bashrc for ALL USERS like: #################################### # added by Anaconda3 5.3.1 installer # >>> conda init >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$(CONDA_REPORT_ERRORS=false '/opt/anaconda3-5.3.1/bin/conda' shell.bash hook 2> /dev/null)" if [ $? -eq 0 ]; then \eval "$__conda_setup" else if [ -f "/opt/anaconda3-5.3.1/etc/profile.d/conda.sh" ]; then . "/opt/anaconda3-5.3.1/etc/profile.d/conda.sh" CONDA_CHANGEPS1=true conda activate base else \export PATH="/opt/anaconda3-5.3.1/bin:$PATH" fi fi unset __conda_setup # <<< conda init <<< #################################### generate a conda list in /opt/anaconda3-5.3.1/condalist-20190307 by 'conda list' remove the original installer file to save 638M disk space. add lines at the end of /etc/vimrc: ######################## "set encoding=utf-8 "set number set tabstop=2 "set expandtab set autoindent set encoding=UTF-8 to ensure Chinese input in vim set fileencoding=UTF-8 ######################## yum install php php-pdo ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: php x86_64 5.4.16-46.el7 base 1.4 M php-pdo x86_64 5.4.16-46.el7 base 99 k Installing for dependencies: libzip x86_64 0.10.1-8.el7 base 48 k php-cli x86_64 5.4.16-46.el7 base 2.7 M php-common x86_64 5.4.16-46.el7 base 565 k Transaction Summary ======================================================================================================================== Install 2 Packages (+3 Dependent packages) SINCE THIS DEFAULT VERSION IS PHP5.4, WAY TOO OLD FOR MEDEAWIKI, I HAVE TO REMOVE THEM BY... yum erase php php-pdo php-cli php-common =============================================================================== Install MediaWiki (Ref: https://www.tecmint.com/install-mediawiki-on-centos-7/) =============================================================================== yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum install epel-release yum install yum-utils yum-config-manager --enable remi-php73 yum install php php-pdo php-gd php-mbstring php-xml php-intl systemctl restart httpd chown -R apache:apache /var/www/html/mediawiki-1.33.0/ chown -R apache:apache /var/www/html/wiki chmod 755 /var/www/html/mediawiki-1.33.0/ chmod 755 /var/www/html/wiki/ =============================================================================== Edit /etc/php.ini: upload_max_filesize 100M (original=2M) post_max_size 128M (original=8M) =================================== Install DokuWiki (as group website) AN EASY JOB June 21, 2020 at /var/var/html/group take a look at readme.xwen there modify /etc/php.ini so as to allow upload big file in MediaManager upload_max_filesize = 500M (from 100M) post_max_size = 500M (from 128M) =================================== yum update on June 21, 2020